summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-01-12 08:21:37 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-02-05 11:07:10 -0500
commit8b665ac6b2984e07a290d5ecbcec2c93ec973c65 (patch)
treed830257de402437766711d7c0dddcb358dde1668 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parent2ca20e14ba1358b1ca32329bfb16a98de631642e (diff)
gpu: nvgpu: move clean up of jobs to separate worker
We currently clean up the jobs in gk20a_channel_update() which is called from nvhost worker thread Instead of doing this, schedule another delayed worker thread clean_up_work to clean up the jobs (with delay of 1 jiffies) Keep update_gp_get() in channel_update() and not in delayed worker since this will help in better book keeping of gp_get Also, this scheduling will help delay job clean-up so that more number of jobs are batched for clean up and hence less time is consumed by worker Bug 1718092 Change-Id: If3b94b6aab93c92da4cf0d1c74aaba756f4cd838 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/931701 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 0f796ffe..4aea9d19 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -80,6 +80,12 @@ struct channel_gk20a_poll_events {
80 int num_pending_events; 80 int num_pending_events;
81}; 81};
82 82
83struct channel_gk20a_clean_up {
84 struct mutex lock;
85 bool scheduled;
86 struct delayed_work wq;
87};
88
83/* this is the priv element of struct nvhost_channel */ 89/* this is the priv element of struct nvhost_channel */
84struct channel_gk20a { 90struct channel_gk20a {
85 struct gk20a *g; /* set only when channel is active */ 91 struct gk20a *g; /* set only when channel is active */
@@ -133,6 +139,7 @@ struct channel_gk20a {
133 u32 timeout_gpfifo_get; 139 u32 timeout_gpfifo_get;
134 140
135 struct channel_gk20a_timeout timeout; 141 struct channel_gk20a_timeout timeout;
142 struct channel_gk20a_clean_up clean_up;
136 143
137 bool cmds_pending; 144 bool cmds_pending;
138 struct { 145 struct {