summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
diff options
context:
space:
mode:
authorSourab Gupta <sourabg@nvidia.com>2018-05-01 08:41:14 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-07 07:42:52 -0400
commitbb7ed28ab17ce68c71838bc2aa3fd6e2a0a71a15 (patch)
treeb91cdc8f08692c8193207ba15345930b4bd1a000 /drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
parent35ec3008310c50b4a35a391371f4baff2e023a4e (diff)
gpu: nvgpu: add worker for clk arb work handling
Implement a worker thread to replace the workqueue based handling for clk arbiter update callbacks. The work items scheduled with the thread are of two types, update_vf_table and arb_update. Previously, there were two workqueues for handling these two work struct's separately. Now the single worker thread would process these two events. If a work item of a particular type is scheduled to be run on the worker, another instance of same type won't be scheduled, which mirrors the linux workqueue behavior. This also removes dependency on linux workqueues/work struct and makes code portable to be used by QNX also. Jira VQRM-3741 Change-Id: Ic27ce718c62c7d7c3f8820fbd1db386a159e28f2 Signed-off-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1706032 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
index 6d09b4b8..039f65f8 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c
@@ -424,8 +424,7 @@ int nvgpu_clk_arb_commit_request_fd(struct gk20a *g,
424 nvgpu_spinlock_acquire(&session->session_lock); 424 nvgpu_spinlock_acquire(&session->session_lock);
425 nvgpu_list_add(&dev->node, &session->targets); 425 nvgpu_list_add(&dev->node, &session->targets);
426 nvgpu_spinlock_release(&session->session_lock); 426 nvgpu_spinlock_release(&session->session_lock);
427 if (arb->update_work_queue) 427 nvgpu_clk_arb_worker_enqueue(g, &arb->update_arb_work_item);
428 queue_work(arb->update_work_queue, &arb->update_fn_work);
429 428
430fdput_fd: 429fdput_fd:
431 fdput(fd); 430 fdput(fd);