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: add missing lock to amdgpu_ttm_access_memory_sdma

Users of ttm entities need to hold the gtt_window_lock before using them
to guarantee proper ordering of jobs.

Cc: stable@vger.kernel.org
Fixes: cb5cc4f573e1 ("drm/amdgpu: improve debug VRAM access performance using sdma")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Pierre-Eric Pelloux-Prayer and committed by
Alex Deucher
4fa94425 5427e32f

+2
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
··· 1486 1486 if (r) 1487 1487 goto out; 1488 1488 1489 + mutex_lock(&adev->mman.gtt_window_lock); 1489 1490 amdgpu_res_first(abo->tbo.resource, offset, len, &src_mm); 1490 1491 src_addr = amdgpu_ttm_domain_start(adev, bo->resource->mem_type) + 1491 1492 src_mm.start; ··· 1501 1500 WARN_ON(job->ibs[0].length_dw > num_dw); 1502 1501 1503 1502 fence = amdgpu_job_submit(job); 1503 + mutex_unlock(&adev->mman.gtt_window_lock); 1504 1504 1505 1505 if (!dma_fence_wait_timeout(fence, false, adev->sdma_timeout)) 1506 1506 r = -ETIMEDOUT;