amd: rename mid_command_buffer_preemption_enabled -> register_shadowing_required
authorMarek Olšák <marek.olsak@amd.com>
Tue, 6 Jun 2023 17:22:50 +0000 (13:22 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 17 Jun 2023 23:42:20 +0000 (23:42 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>

src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h
src/amd/vulkan/radv_device.c
src/gallium/drivers/radeonsi/si_cp_reg_shadowing.c

index 57579c3..d5607fb 100644 (file)
@@ -962,7 +962,7 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info)
    info->has_sparse_vm_mappings = info->gfx_level >= GFX7;
    info->has_scheduled_fence_dependency = info->drm_minor >= 28;
    info->has_gang_submit = info->drm_minor >= 49;
-   info->mid_command_buffer_preemption_enabled = device_info.ids_flags & AMDGPU_IDS_FLAGS_PREEMPTION;
+   info->register_shadowing_required = device_info.ids_flags & AMDGPU_IDS_FLAGS_PREEMPTION;
    info->has_tmz_support = has_tmz_support(dev, info, device_info.ids_flags);
    info->kernel_has_modifiers = has_modifiers(fd);
    info->uses_kernel_cu_mask = false; /* Not implemented in the kernel. */
@@ -1738,8 +1738,7 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f)
    fprintf(f, "    has_stable_pstate = %u\n", info->has_stable_pstate);
    fprintf(f, "    has_scheduled_fence_dependency = %u\n", info->has_scheduled_fence_dependency);
    fprintf(f, "    has_gang_submit = %u\n", info->has_gang_submit);
-   fprintf(f, "    mid_command_buffer_preemption_enabled = %u\n",
-           info->mid_command_buffer_preemption_enabled);
+   fprintf(f, "    register_shadowing_required = %u\n", info->register_shadowing_required);
    fprintf(f, "    has_fw_based_shadowing = %u\n", info->has_fw_based_shadowing);
    if (info->has_fw_based_shadowing) {
       fprintf(f, "        * shadow size: %u (alignment: %u)\n",
index 26df541..5b4edb2 100644 (file)
@@ -204,7 +204,7 @@ struct radeon_info {
    bool has_pcie_bandwidth_info;
    bool has_stable_pstate;
    /* Whether SR-IOV is enabled or amdgpu.mcbp=1 was set on the kernel command line. */
-   bool mid_command_buffer_preemption_enabled;
+   bool register_shadowing_required;
    bool has_tmz_support;
    bool kernel_has_modifiers;
 
index e4c6100..05b9cb0 100644 (file)
@@ -783,7 +783,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
    device->overallocation_disallowed = overallocation_disallowed;
    mtx_init(&device->overallocation_mutex, mtx_plain);
 
-   if (physical_device->rad_info.mid_command_buffer_preemption_enabled ||
+   if (physical_device->rad_info.register_shadowing_required ||
        device->instance->debug_flags & RADV_DEBUG_SHADOW_REGS)
       device->uses_shadow_regs = true;
 
index 09b2ee8..e8e38e0 100644 (file)
@@ -21,7 +21,7 @@ static void si_set_context_reg_array(struct radeon_cmdbuf *cs, unsigned reg, uns
 void si_init_cp_reg_shadowing(struct si_context *sctx)
 {
    if (sctx->has_graphics &&
-       (sctx->screen->info.mid_command_buffer_preemption_enabled ||
+       (sctx->screen->info.register_shadowing_required ||
         sctx->screen->debug_flags & DBG(SHADOW_REGS))) {
       if (sctx->screen->info.has_fw_based_shadowing) {
          sctx->shadowing.registers =