summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-25 16:54:58 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-05 16:53:13 -0400
commit0ebe462c130108a027f85bcb6736fed2ef74204e (patch)
treedb2a81adb9fbf8d7dd605b6931cbb8fff075ec01 /drivers/gpu/nvgpu/gk20a
parent673dd971600b26131c0afdb221e13c080da022fd (diff)
gpu: nvgpu: Use nvgpu_cond in notifier wq
Change notifier wait queue to use nvgpu_cond instead of Linux wait queue. JIRA NVGPU-14 Change-Id: I197a0ef6c0a2331ca0dbb3480bdb89d45ba73020 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1469853 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 13abed95..fad6b6af 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -867,7 +867,7 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
867 /* The channel is *not* runnable at this point. It still needs to have 867 /* The channel is *not* runnable at this point. It still needs to have
868 * an address space bound and allocate a gpfifo and grctx. */ 868 * an address space bound and allocate a gpfifo and grctx. */
869 869
870 init_waitqueue_head(&ch->notifier_wq); 870 nvgpu_cond_init(&ch->notifier_wq);
871 nvgpu_cond_init(&ch->semaphore_wq); 871 nvgpu_cond_init(&ch->semaphore_wq);
872 872
873 ch->update_fn = NULL; 873 ch->update_fn = NULL;
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 4bca4edb..a636e13c 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -19,7 +19,6 @@
19#define CHANNEL_GK20A_H 19#define CHANNEL_GK20A_H
20 20
21#include <linux/stacktrace.h> 21#include <linux/stacktrace.h>
22#include <linux/wait.h>
23#include <nvgpu/list.h> 22#include <nvgpu/list.h>
24 23
25#include <nvgpu/lock.h> 24#include <nvgpu/lock.h>
@@ -218,7 +217,7 @@ struct channel_gk20a {
218 217
219 struct priv_cmd_queue priv_cmd_q; 218 struct priv_cmd_queue priv_cmd_q;
220 219
221 wait_queue_head_t notifier_wq; 220 struct nvgpu_cond notifier_wq;
222 struct nvgpu_cond semaphore_wq; 221 struct nvgpu_cond semaphore_wq;
223 222
224 u32 timeout_accumulated_ms; 223 u32 timeout_accumulated_ms;
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 46560a56..9141264b 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1358,7 +1358,7 @@ static void gk20a_fifo_set_has_timedout_and_wake_up_wqs(struct gk20a *g,
1358 wmb(); 1358 wmb();
1359 /* unblock pending waits */ 1359 /* unblock pending waits */
1360 nvgpu_cond_broadcast_interruptible(&refch->semaphore_wq); 1360 nvgpu_cond_broadcast_interruptible(&refch->semaphore_wq);
1361 wake_up(&refch->notifier_wq); 1361 nvgpu_cond_broadcast_interruptible(&refch->notifier_wq);
1362 } 1362 }
1363} 1363}
1364 1364
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 2cf55119..f8e05818 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5873,7 +5873,7 @@ static int gk20a_gr_handle_notify_pending(struct gk20a *g,
5873 nvgpu_mutex_release(&ch->cyclestate.cyclestate_buffer_mutex); 5873 nvgpu_mutex_release(&ch->cyclestate.cyclestate_buffer_mutex);
5874#endif 5874#endif
5875 gk20a_dbg_fn(""); 5875 gk20a_dbg_fn("");
5876 wake_up(&ch->notifier_wq); 5876 nvgpu_cond_broadcast_interruptible(&ch->notifier_wq);
5877 return 0; 5877 return 0;
5878} 5878}
5879 5879