From 61b263d83222cd5d2ff3d2d5d699b07ebdf44288 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 10 Oct 2017 10:45:54 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1575778 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c') 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, dbg_session->is_pg_disabled = false; dbg_session->is_timeout_disabled = false; - init_waitqueue_head(&dbg_session->dbg_events.wait_queue); + nvgpu_cond_init(&dbg_session->dbg_events.wait_queue); nvgpu_init_list_node(&dbg_session->ch_list); err = nvgpu_mutex_init(&dbg_session->ch_list_lock); if (err) @@ -286,7 +286,7 @@ unsigned int gk20a_dbg_gpu_dev_poll(struct file *filep, poll_table *wait) gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, ""); - poll_wait(filep, &dbg_s->dbg_events.wait_queue, wait); + poll_wait(filep, &dbg_s->dbg_events.wait_queue.wq, wait); gk20a_dbg_session_nvgpu_mutex_acquire(dbg_s); @@ -337,7 +337,7 @@ void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch) dbg_s->dbg_events.num_pending_events++; - wake_up_interruptible_all(&dbg_s->dbg_events.wait_queue); + nvgpu_cond_broadcast_interruptible(&dbg_s->dbg_events.wait_queue); } } -- cgit v1.2.2