]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: fix amdgpu_coredump
authorChristian König <christian.koenig@amd.com>
Thu, 12 Dec 2024 15:29:18 +0000 (16:29 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2024 17:39:07 +0000 (12:39 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c

index 946c48829f1970724654efec2eabf37ceb3b3013..824f9da5b6cea9c95f46e4268cb914589ea3b088 100644 (file)
@@ -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);