From 888fbbda21af9ed9b47527cdc0b853c4397005d0 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 25 Apr 2017 13:03:38 -0700 Subject: gpu: nvgpu: Use nvgpu_cond for channel refcount Use nvgpu_cond for waiting for all channel accesses to finalize before closing a channel, and for signalling for the same event. JIRA NVGPU-14 Change-Id: Ifac14ad9afe5c44d4443b4a4a94a4d0ad2ea7053 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1469764 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker Reviewed-by: Lakshmanan M GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 3 ++- 1 file changed, 2 insertions(+), 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 3312f8f1..ea77985e 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -24,6 +24,7 @@ #include #include +#include struct gk20a; struct gr_gk20a; @@ -169,7 +170,7 @@ struct channel_gk20a { struct nvgpu_spinlock ref_obtain_lock; bool referenceable; atomic_t ref_count; - wait_queue_head_t ref_count_dec_wq; + struct nvgpu_cond ref_count_dec_wq; #if GK20A_CHANNEL_REFCOUNT_TRACKING /* * Ring buffer for most recent refcount gets and puts. Protected by -- cgit v1.2.2