Skip to content

Commit

Permalink
drm/amdgpu: fix amdgpu_coredump
Browse files Browse the repository at this point in the history
The VM pointer might already be outdated when that function is called.
Use the PASID instead to gather the information instead.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Christian König authored and Alex Deucher committed Dec 18, 2024
1 parent d1ebe30 commit 57f812d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,10 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,
coredump->skip_vram_check = skip_vram_check;
coredump->reset_vram_lost = vram_lost;

if (job && job->vm) {
struct amdgpu_vm *vm = job->vm;
if (job && job->pasid) {
struct amdgpu_task_info *ti;

ti = amdgpu_vm_get_task_info_vm(vm);
ti = amdgpu_vm_get_task_info_pasid(adev, job->pasid);
if (ti) {
coredump->reset_task_info = *ti;
amdgpu_vm_put_task_info(ti);
Expand Down

0 comments on commit 57f812d

Please sign in to comment.