diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 93ca65277d3..be71b2849ed 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -1092,6 +1092,12 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info, info->uses_kernel_cu_mask = false; /* Not implemented in the kernel. */ info->has_graphics = info->ip[AMD_IP_GFX].num_queues > 0; + /* On GFX8, the TBA/TMA registers can be configured from the userspace. + * On GFX9+, they are privileged registers and they need to be configured + * from the kernel but it's not suppported yet. + */ + info->has_trap_handler_support = info->gfx_level == GFX8; + info->pa_sc_tile_steering_override = device_info.pa_sc_tile_steering_override; info->max_render_backends = device_info.num_rb_pipes; /* The value returned by the kernel driver was wrong. */ @@ -2010,6 +2016,7 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f) } fprintf(f, " has_tmz_support = %u\n", info->has_tmz_support); + fprintf(f, " has_trap_handler_support = %u\n", info->has_trap_handler_support); for (unsigned i = 0; i < AMD_NUM_IP_TYPES; i++) { if (info->max_submitted_ibs[i]) { fprintf(f, " IP %-7s max_submitted_ibs = %u\n", ac_get_ip_type_string(info, i), diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index 96f40ac7066..d55d73fab87 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -234,6 +234,7 @@ struct radeon_info { /* Whether SR-IOV is enabled or amdgpu.mcbp=1 was set on the kernel command line. */ bool register_shadowing_required; bool has_tmz_support; + bool has_trap_handler_support; bool kernel_has_modifiers; /* If the kernel driver uses CU reservation for high priority compute on gfx10+, it programs