From 1c96bc6942cdae7f4e90563687da7d068aea90bc Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 1 Apr 2016 14:44:46 +0530 Subject: gpu: nvgpu: add lock for fences All pre/post fence accesses in last_submit are currently protected by submit lock In order to remove the submit lock, move all fence accesses under own lock i.e. fence_lock Bug 200187553 Change-Id: I0132d1933dc92db8c5ed8c9311e49a030aa2d38c Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1120409 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index d8951b94..74c920e4 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -152,9 +152,9 @@ struct channel_gk20a { bool cmds_pending; struct { - /* These fences should be accessed with submit_lock held. */ struct gk20a_fence *pre_fence; struct gk20a_fence *post_fence; + struct mutex fence_lock; } last_submit; void (*remove_support)(struct channel_gk20a *); -- cgit v1.2.2