summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-25 16:51:27 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-16 13:24:57 -0400
commit80a6291c9c5e373a3a534ba100b616b6789fb568 (patch)
tree20a5c5c3c1ea0933fa9db6af61a89c2ebd027ae0 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent7bc97ca7d5e0cee265014ce5fd682858c3b63629 (diff)
gpu: nvgpu: Use nvgpu_cond in semaphore wq
Change semaphore wait queue to use nvgpu_cond instead of Linux wait queue. JIRA NVGPU-14 Change-Id: I3be5097ded168300b4480e986218d9f4fd6104b1 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1469852 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 65dc1c72..536ca9f3 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -252,7 +252,7 @@ void gk20a_channel_abort_clean_up(struct channel_gk20a *ch)
252 nvgpu_mutex_release(&ch->joblist.cleanup_lock); 252 nvgpu_mutex_release(&ch->joblist.cleanup_lock);
253 253
254 if (released_job_semaphore) 254 if (released_job_semaphore)
255 wake_up_interruptible_all(&ch->semaphore_wq); 255 nvgpu_cond_broadcast_interruptible(&ch->semaphore_wq);
256 256
257 /* 257 /*
258 * When closing the channel, this scheduled update holds one ref which 258 * When closing the channel, this scheduled update holds one ref which
@@ -850,7 +850,7 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
850 * an address space bound and allocate a gpfifo and grctx. */ 850 * an address space bound and allocate a gpfifo and grctx. */
851 851
852 init_waitqueue_head(&ch->notifier_wq); 852 init_waitqueue_head(&ch->notifier_wq);
853 init_waitqueue_head(&ch->semaphore_wq); 853 nvgpu_cond_init(&ch->semaphore_wq);
854 854
855 ch->update_fn = NULL; 855 ch->update_fn = NULL;
856 ch->update_fn_data = NULL; 856 ch->update_fn_data = NULL;
@@ -2783,7 +2783,8 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events)
2783 struct channel_gk20a *c = g->fifo.channel+chid; 2783 struct channel_gk20a *c = g->fifo.channel+chid;
2784 if (gk20a_channel_get(c)) { 2784 if (gk20a_channel_get(c)) {
2785 if (atomic_read(&c->bound)) { 2785 if (atomic_read(&c->bound)) {
2786 wake_up_interruptible_all(&c->semaphore_wq); 2786 nvgpu_cond_broadcast_interruptible(
2787 &c->semaphore_wq);
2787 if (post_events) { 2788 if (post_events) {
2788 if (gk20a_is_channel_marked_as_tsg(c)) { 2789 if (gk20a_is_channel_marked_as_tsg(c)) {
2789 struct tsg_gk20a *tsg = 2790 struct tsg_gk20a *tsg =