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 in amdgpu_benchmark_do_move

Taking the entity lock is required to guarantee the ordering of
execution. The next commit will add a check that the lock is
held.

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
30f2daed 3d9eea6d

+2
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
··· 35 35 struct dma_fence *fence; 36 36 int i, r; 37 37 38 + mutex_lock(&adev->mman.default_entity.lock); 38 39 stime = ktime_get(); 39 40 for (i = 0; i < n; i++) { 40 41 r = amdgpu_copy_buffer(adev, &adev->mman.default_entity, ··· 48 47 if (r) 49 48 goto exit_do_move; 50 49 } 50 + mutex_unlock(&adev->mman.default_entity.lock); 51 51 52 52 exit_do_move: 53 53 etime = ktime_get();