From 80a6291c9c5e373a3a534ba100b616b6789fb568 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 25 Apr 2017 13:51:27 -0700 Subject: 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 Reviewed-on: http://git-master/r/1469852 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') 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) nvgpu_mutex_release(&ch->joblist.cleanup_lock); if (released_job_semaphore) - wake_up_interruptible_all(&ch->semaphore_wq); + nvgpu_cond_broadcast_interruptible(&ch->semaphore_wq); /* * 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, * an address space bound and allocate a gpfifo and grctx. */ init_waitqueue_head(&ch->notifier_wq); - init_waitqueue_head(&ch->semaphore_wq); + nvgpu_cond_init(&ch->semaphore_wq); ch->update_fn = NULL; ch->update_fn_data = NULL; @@ -2783,7 +2783,8 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) struct channel_gk20a *c = g->fifo.channel+chid; if (gk20a_channel_get(c)) { if (atomic_read(&c->bound)) { - wake_up_interruptible_all(&c->semaphore_wq); + nvgpu_cond_broadcast_interruptible( + &c->semaphore_wq); if (post_events) { if (gk20a_is_channel_marked_as_tsg(c)) { struct tsg_gk20a *tsg = -- cgit v1.2.2