diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-25 16:03:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-12 19:09:05 -0400 |
commit | 888fbbda21af9ed9b47527cdc0b853c4397005d0 (patch) | |
tree | de30fc72733ad7a5e0c8c847cc2e3d5ebab8c9ea /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | 5cbfb69b7ee41507e0ca24c0bc8c7da446784267 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1469764
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Lakshmanan M <lm@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ | |||
24 | 24 | ||
25 | #include <nvgpu/lock.h> | 25 | #include <nvgpu/lock.h> |
26 | #include <nvgpu/timers.h> | 26 | #include <nvgpu/timers.h> |
27 | #include <nvgpu/cond.h> | ||
27 | 28 | ||
28 | struct gk20a; | 29 | struct gk20a; |
29 | struct gr_gk20a; | 30 | struct gr_gk20a; |
@@ -169,7 +170,7 @@ struct channel_gk20a { | |||
169 | struct nvgpu_spinlock ref_obtain_lock; | 170 | struct nvgpu_spinlock ref_obtain_lock; |
170 | bool referenceable; | 171 | bool referenceable; |
171 | atomic_t ref_count; | 172 | atomic_t ref_count; |
172 | wait_queue_head_t ref_count_dec_wq; | 173 | struct nvgpu_cond ref_count_dec_wq; |
173 | #if GK20A_CHANNEL_REFCOUNT_TRACKING | 174 | #if GK20A_CHANNEL_REFCOUNT_TRACKING |
174 | /* | 175 | /* |
175 | * Ring buffer for most recent refcount gets and puts. Protected by | 176 | * Ring buffer for most recent refcount gets and puts. Protected by |