diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-08-03 06:16:32 -0400 |
---|---|---|
committer | Sachin Nikam <snikam@nvidia.com> | 2015-08-07 01:20:22 -0400 |
commit | c27e094002e9d670df45c3b61591a7a9a3a3482d (patch) | |
tree | 58beca29472179f7fe258eda099070e657ea8d7c /drivers | |
parent | a969bc98aeb414444e46a5807617f14410ca416c (diff) |
gpu: nvgpu: remove gk20a_busy() from channel_syncpt_incr()
gk20a_busy() is already called on all the paths to
__gk20a_channel_syncpt_incr() i.e. in gk20a_submit_channel_gpfifo()
hence remove the redundant gk20a_busy() call since it causes
deadlock scenario with VPR resize use case
Bug 200128257
Bug 1645760
Bug 200114947
Bug 200124519
Change-Id: I4cd47b7e7cdc92aaeda17256a99f2ba93833a3b3
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/778341
(cherry picked from commit 5a5dc5b5a9d38a5e8d5c1ca29dc6de425c00b605)
Reviewed-on: http://git-master/r/779070
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index be9f1c70..09814568 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -213,36 +213,28 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, | |||
213 | thresh = nvhost_syncpt_incr_max_ext(sp->host1x_pdev, sp->id, 2); | 213 | thresh = nvhost_syncpt_incr_max_ext(sp->host1x_pdev, sp->id, 2); |
214 | 214 | ||
215 | if (register_irq) { | 215 | if (register_irq) { |
216 | err = gk20a_busy(c->g->dev); | 216 | struct channel_gk20a *referenced = gk20a_channel_get(c); |
217 | if (err) | 217 | |
218 | gk20a_err(dev_from_gk20a(c->g), | 218 | WARN_ON(!referenced); |
219 | "failed to add syncpt interrupt notifier for channel %d", | 219 | |
220 | c->hw_chid); | 220 | if (referenced) { |
221 | else { | 221 | /* note: channel_put() is in |
222 | struct channel_gk20a *referenced = gk20a_channel_get(c); | 222 | * gk20a_channel_syncpt_update() */ |
223 | 223 | ||
224 | WARN_ON(!referenced); | 224 | err = nvhost_intr_register_notifier( |
225 | gk20a_idle(c->g->dev); | 225 | sp->host1x_pdev, |
226 | 226 | sp->id, thresh, | |
227 | if (referenced) { | 227 | gk20a_channel_syncpt_update, c); |
228 | /* note: channel_put() is in | 228 | if (err) |
229 | * gk20a_channel_syncpt_update() */ | 229 | gk20a_channel_put(referenced); |
230 | 230 | ||
231 | err = nvhost_intr_register_notifier( | 231 | /* Adding interrupt action should |
232 | sp->host1x_pdev, | 232 | * never fail. A proper error handling |
233 | sp->id, thresh, | 233 | * here would require us to decrement |
234 | gk20a_channel_syncpt_update, c); | 234 | * the syncpt max back to its original |
235 | if (err) | 235 | * value. */ |
236 | gk20a_channel_put(referenced); | 236 | WARN(err, |
237 | 237 | "failed to set submit complete interrupt"); | |
238 | /* Adding interrupt action should | ||
239 | * never fail. A proper error handling | ||
240 | * here would require us to decrement | ||
241 | * the syncpt max back to its original | ||
242 | * value. */ | ||
243 | WARN(err, | ||
244 | "failed to set submit complete interrupt"); | ||
245 | } | ||
246 | } | 238 | } |
247 | } | 239 | } |
248 | 240 | ||