Skip to content

Commit ea13707

Browse files
ahrehmanalexdeucher
authored andcommitted
drm/amdgpu: Skip the coredump collection on reset during driver reload
In passthrough environment, the driver triggers the mode-1 reset on reload. The reset causes the core dump collection which is delayed task and prevents driver from unloading until it is completed. Since we do not need to collect data on "reset on reload" case, we can skip core dump collection. v2: Use the same flag to avoid calling amdgpu_reset_reg_dumps as well. Signed-off-by: Ahmad Rehman <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ca0afa2 commit ea13707

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5357,7 +5357,9 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
53575357
/* Try reset handler method first */
53585358
tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
53595359
reset_list);
5360-
amdgpu_reset_reg_dumps(tmp_adev);
5360+
5361+
if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags))
5362+
amdgpu_reset_reg_dumps(tmp_adev);
53615363

53625364
reset_context->reset_device_list = device_list_handle;
53635365
r = amdgpu_reset_perform_reset(tmp_adev, reset_context);
@@ -5430,7 +5432,8 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
54305432

54315433
vram_lost = amdgpu_device_check_vram_lost(tmp_adev);
54325434

5433-
amdgpu_coredump(tmp_adev, vram_lost, reset_context);
5435+
if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags))
5436+
amdgpu_coredump(tmp_adev, vram_lost, reset_context);
54345437

54355438
if (vram_lost) {
54365439
DRM_INFO("VRAM is lost due to GPU reset!\n");

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,7 @@ static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work)
24812481

24822482
/* Use a common context, just need to make sure full reset is done */
24832483
set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags);
2484+
set_bit(AMDGPU_SKIP_COREDUMP, &reset_context.flags);
24842485
r = amdgpu_do_asic_reset(&device_list, &reset_context);
24852486

24862487
if (r) {

drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ enum AMDGPU_RESET_FLAGS {
3232

3333
AMDGPU_NEED_FULL_RESET = 0,
3434
AMDGPU_SKIP_HW_RESET = 1,
35+
AMDGPU_SKIP_COREDUMP = 2,
3536
};
3637

3738
struct amdgpu_reset_context {

0 commit comments

Comments
 (0)