diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-25 16:09:47 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-16 12:14:28 -0400 |
commit | 301965fb77b3dc97445957712b82ce430eaa17e3 (patch) | |
tree | c0baf9db9312bfa7b0ff27214e2497649768dbbe /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 4f0436de19939e7b00d4032e5c58a7095c9e7b7a (diff) |
gpu: nvgpu: Use nvgpu_cond in channel worker
Change the channel worker to use nvgpu_cond instead of Linux wait
queue.
JIRA NVGPU-14
Change-Id: Iac856dca2acfa80065f5d2fd542cd2a6278333a4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1469850
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lakshmanan M <lm@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 0d615d65..65dc1c72 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1689,7 +1689,7 @@ static int __gk20a_channel_worker_wakeup(struct gk20a *g) | |||
1689 | */ | 1689 | */ |
1690 | 1690 | ||
1691 | put = atomic_inc_return(&g->channel_worker.put); | 1691 | put = atomic_inc_return(&g->channel_worker.put); |
1692 | wake_up(&g->channel_worker.wq); | 1692 | nvgpu_cond_signal(&g->channel_worker.wq); |
1693 | 1693 | ||
1694 | return put; | 1694 | return put; |
1695 | } | 1695 | } |
@@ -1783,8 +1783,8 @@ static int gk20a_channel_poll_worker(void *arg) | |||
1783 | while (!nvgpu_thread_should_stop(&worker->poll_task)) { | 1783 | while (!nvgpu_thread_should_stop(&worker->poll_task)) { |
1784 | bool got_events; | 1784 | bool got_events; |
1785 | 1785 | ||
1786 | got_events = wait_event_timeout( | 1786 | got_events = NVGPU_COND_WAIT( |
1787 | worker->wq, | 1787 | &worker->wq, |
1788 | __gk20a_channel_worker_pending(g, get), | 1788 | __gk20a_channel_worker_pending(g, get), |
1789 | timeout) > 0; | 1789 | timeout) > 0; |
1790 | 1790 | ||
@@ -1808,7 +1808,7 @@ int nvgpu_channel_worker_init(struct gk20a *g) | |||
1808 | char thread_name[64]; | 1808 | char thread_name[64]; |
1809 | 1809 | ||
1810 | atomic_set(&g->channel_worker.put, 0); | 1810 | atomic_set(&g->channel_worker.put, 0); |
1811 | init_waitqueue_head(&g->channel_worker.wq); | 1811 | nvgpu_cond_init(&g->channel_worker.wq); |
1812 | nvgpu_init_list_node(&g->channel_worker.items); | 1812 | nvgpu_init_list_node(&g->channel_worker.items); |
1813 | nvgpu_spinlock_init(&g->channel_worker.items_lock); | 1813 | nvgpu_spinlock_init(&g->channel_worker.items_lock); |
1814 | snprintf(thread_name, sizeof(thread_name), | 1814 | snprintf(thread_name, sizeof(thread_name), |