diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-10-10 01:15:54 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-16 16:35:04 -0400 |
commit | 61b263d83222cd5d2ff3d2d5d699b07ebdf44288 (patch) | |
tree | 07ef35fb427dc2f93741ed9193673b6da2872bb7 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |
parent | 30b9cbe35a2a0adc4e3a65b033dc0f61046783ea (diff) |
gpu: nvgpu: replace wait_queue_head_t with nvgpu_cond
Replace existing usages of wait_queue_head_t with struct nvgpu_cond and
using the corresponding APIs in order to reduce Linux dependencies in NVGPU.
JIRA NVGPU-205
Change-Id: I85850369c3c47d3e1704e4171b1d172361842423
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1575778
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index c2885807..135cb1e9 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -158,7 +158,7 @@ static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, | |||
158 | dbg_session->is_pg_disabled = false; | 158 | dbg_session->is_pg_disabled = false; |
159 | dbg_session->is_timeout_disabled = false; | 159 | dbg_session->is_timeout_disabled = false; |
160 | 160 | ||
161 | init_waitqueue_head(&dbg_session->dbg_events.wait_queue); | 161 | nvgpu_cond_init(&dbg_session->dbg_events.wait_queue); |
162 | nvgpu_init_list_node(&dbg_session->ch_list); | 162 | nvgpu_init_list_node(&dbg_session->ch_list); |
163 | err = nvgpu_mutex_init(&dbg_session->ch_list_lock); | 163 | err = nvgpu_mutex_init(&dbg_session->ch_list_lock); |
164 | if (err) | 164 | if (err) |
@@ -286,7 +286,7 @@ unsigned int gk20a_dbg_gpu_dev_poll(struct file *filep, poll_table *wait) | |||
286 | 286 | ||
287 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, ""); | 287 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, ""); |
288 | 288 | ||
289 | poll_wait(filep, &dbg_s->dbg_events.wait_queue, wait); | 289 | poll_wait(filep, &dbg_s->dbg_events.wait_queue.wq, wait); |
290 | 290 | ||
291 | gk20a_dbg_session_nvgpu_mutex_acquire(dbg_s); | 291 | gk20a_dbg_session_nvgpu_mutex_acquire(dbg_s); |
292 | 292 | ||
@@ -337,7 +337,7 @@ void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch) | |||
337 | 337 | ||
338 | dbg_s->dbg_events.num_pending_events++; | 338 | dbg_s->dbg_events.num_pending_events++; |
339 | 339 | ||
340 | wake_up_interruptible_all(&dbg_s->dbg_events.wait_queue); | 340 | nvgpu_cond_broadcast_interruptible(&dbg_s->dbg_events.wait_queue); |
341 | } | 341 | } |
342 | } | 342 | } |
343 | 343 | ||