From bb7ed28ab17ce68c71838bc2aa3fd6e2a0a71a15 Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Tue, 1 May 2018 18:11:14 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1706032 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 75357a82..03cfe285 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1406,14 +1406,14 @@ struct gk20a { u32 ltc_count; u32 ltc_streamid; - struct gk20a_channel_worker { + struct gk20a_worker { struct nvgpu_thread poll_task; nvgpu_atomic_t put; struct nvgpu_cond wq; struct nvgpu_list_node items; struct nvgpu_spinlock items_lock; struct nvgpu_mutex start_lock; - } channel_worker; + } channel_worker, clk_arb_worker; struct { void (*open)(struct channel_gk20a *ch); -- cgit v1.2.2