From: Chunming Zhou Date: Fri, 24 Jul 2015 02:49:47 +0000 (+0800) Subject: drm/amdgpu: protect fence_process from multiple context X-Git-Tag: omap-for-v4.3/fixes-rc1~89^2~22^2~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=176e1ab1b534368d0cd338a010aaea99067c3c6e;p=pandora-kernel.git drm/amdgpu: protect fence_process from multiple context fence_process may be called from kthread, user thread and interrupt context. it is possible to called concurrently, then will wake up fence queue multiple times. Signed-off-by: Chunming Zhou Reviewed-by: Jammy Zhou --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 1b8d05ff88e7..0703fbfd5130 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -869,6 +869,7 @@ struct amdgpu_ring { struct amdgpu_fence_driver fence_drv; struct amd_gpu_scheduler *scheduler; + spinlock_t fence_lock; struct mutex *ring_lock; struct amdgpu_bo *ring_obj; volatile uint32_t *ring; Reading git-diff-tree failed