Skip to content

Commit 88b2dcc

Browse files
YuanShanggregkh
authored andcommitted
drm/amdgpu: Retain job->vm in amdgpu_job_prepare_job
commit c00d8b7 upstream. The field job->vm is used in function amdgpu_job_run to get the page table re-generation counter and decide whether the job should be skipped. Specifically, function amdgpu_vm_generation checks if the VM is valid for this job to use. For instance, if a gfx job depends on a cancelled sdma job from entity vm->delayed, then the gfx job should be skipped. Fixes: 26c95e8 ("drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare") Signed-off-by: YuanShang <YuanShang.Mao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ed76936) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a7bb3e1 commit 88b2dcc

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,6 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
387387
dev_err(ring->adev->dev, "Error getting VM ID (%d)\n", r);
388388
goto error;
389389
}
390-
/*
391-
* The VM structure might be released after the VMID is
392-
* assigned, we had multiple problems with people trying to use
393-
* the VM pointer so better set it to NULL.
394-
*/
395-
if (!fence)
396-
job->vm = NULL;
397390
return fence;
398391
}
399392

0 commit comments

Comments
 (0)