drm/amdgpu: skip ip dump if devcoredump flag is set
authorSunil Khatri <sunil.khatri@amd.com>
Thu, 25 Apr 2024 10:15:56 +0000 (15:45 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Apr 2024 21:22:44 +0000 (17:22 -0400)
Do not dump the ip registers during driver reload
in passthrough environment.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 869256394136afdab6d88e5738004e2dd66f7f69..861ccff78af954228408efa5832858a0c52f63dd 100644 (file)
@@ -5368,14 +5368,15 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
        tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
                                    reset_list);
 
-       if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags))
+       if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags)) {
                amdgpu_reset_reg_dumps(tmp_adev);
 
-       /* Trigger ip dump before we reset the asic */
-       for (i = 0; i < tmp_adev->num_ip_blocks; i++)
-               if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state)
-                       tmp_adev->ip_blocks[i].version->funcs->dump_ip_state(
-                               (void *)tmp_adev);
+               /* Trigger ip dump before we reset the asic */
+               for (i = 0; i < tmp_adev->num_ip_blocks; i++)
+                       if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state)
+                               tmp_adev->ip_blocks[i].version->funcs
+                               ->dump_ip_state((void *)tmp_adev);
+       }
 
        reset_context->reset_device_list = device_list_handle;
        r = amdgpu_reset_perform_reset(tmp_adev, reset_context);