radeonsi/sqtt: add si_se_is_disabled
Based on radv_se_is_disabled. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12899>
This commit is contained in:
parent
a25a6abbd7
commit
9db70eb577
|
@ -66,6 +66,14 @@ si_thread_trace_init_bo(struct si_context *sctx)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
si_se_is_disabled(struct si_context* sctx, unsigned se)
|
||||
{
|
||||
/* No active CU on the SE means it is disabled. */
|
||||
return sctx->screen->info.cu_mask[se][0] == 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
si_emit_thread_trace_start(struct si_context* sctx,
|
||||
struct radeon_cmdbuf *cs,
|
||||
|
@ -82,6 +90,9 @@ si_emit_thread_trace_start(struct si_context* sctx,
|
|||
uint64_t data_va = ac_thread_trace_get_data_va(&sctx->screen->info, sctx->thread_trace, va, se);
|
||||
uint64_t shifted_va = data_va >> SQTT_BUFFER_ALIGN_SHIFT;
|
||||
|
||||
if (si_se_is_disabled(sctx, se))
|
||||
continue;
|
||||
|
||||
/* Target SEx and SH0. */
|
||||
radeon_set_uconfig_reg(cs, R_030800_GRBM_GFX_INDEX,
|
||||
S_030800_SE_INDEX(se) |
|
||||
|
@ -291,6 +302,9 @@ si_emit_thread_trace_stop(struct si_context *sctx,
|
|||
radeon_end();
|
||||
|
||||
for (unsigned se = 0; se < max_se; se++) {
|
||||
if (si_se_is_disabled(sctx, se))
|
||||
continue;
|
||||
|
||||
radeon_begin(cs);
|
||||
|
||||
/* Target SEi and SH0. */
|
||||
|
|
Loading…
Reference in New Issue