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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Retain job->vm in amdgpu_job_prepare_job

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: 26c95e838e63 ("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 ed76936c6b10b547c6df4ca75412331e9ef6d339)
Cc: stable@vger.kernel.org

authored by

YuanShang and committed by
Alex Deucher
c00d8b79 1c8dc3e0

-7
-7
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
··· 365 365 dev_err(ring->adev->dev, "Error getting VM ID (%d)\n", r); 366 366 goto error; 367 367 } 368 - /* 369 - * The VM structure might be released after the VMID is 370 - * assigned, we had multiple problems with people trying to use 371 - * the VM pointer so better set it to NULL. 372 - */ 373 - if (!fence) 374 - job->vm = NULL; 375 368 return fence; 376 369 } 377 370