Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: dump ip state before reset for each ip

Invoke the dump_ip_state function for each ip before
the asic resets and save the register values for
debugging via devcoredump.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sunil Khatri and committed by
Alex Deucher
e043a35d c8732c80

+7
+7
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 5353 5353 struct amdgpu_device *tmp_adev = NULL; 5354 5354 bool need_full_reset, skip_hw_reset, vram_lost = false; 5355 5355 int r = 0; 5356 + uint32_t i; 5356 5357 5357 5358 /* Try reset handler method first */ 5358 5359 tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device, ··· 5361 5360 5362 5361 if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags)) 5363 5362 amdgpu_reset_reg_dumps(tmp_adev); 5363 + 5364 + /* Trigger ip dump before we reset the asic */ 5365 + for (i = 0; i < tmp_adev->num_ip_blocks; i++) 5366 + if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state) 5367 + tmp_adev->ip_blocks[i].version->funcs->dump_ip_state( 5368 + (void *)tmp_adev); 5364 5369 5365 5370 reset_context->reset_device_list = device_list_handle; 5366 5371 r = amdgpu_reset_perform_reset(tmp_adev, reset_context);