]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: remove gk20a_busy() from channel_syncpt_incr()
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 3 Aug 2015 10:16:32 +0000 (15:46 +0530)
committerSachin Nikam <snikam@nvidia.com>
Fri, 7 Aug 2015 06:41:27 +0000 (23:41 -0700)
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/779067
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c

index 4c27f523ef3288c3716a77308f92dff030246b0a..e7c4a7fb209ffe457ca89062550005264b81e808 100644 (file)
@@ -212,36 +212,28 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
        thresh = nvhost_syncpt_incr_max_ext(sp->host1x_pdev, sp->id, 2);
 
        if (register_irq) {
-               err = gk20a_busy(c->g->dev);
-               if (err)
-                       gk20a_err(dev_from_gk20a(c->g),
-                                 "failed to add syncpt interrupt notifier for channel %d",
-                                 c->hw_chid);
-               else {
-                       struct channel_gk20a *referenced = gk20a_channel_get(c);
-
-                       WARN_ON(!referenced);
-                       gk20a_idle(c->g->dev);
-
-                       if (referenced) {
-                               /* note: channel_put() is in
-                                * gk20a_channel_syncpt_update() */
-
-                               err = nvhost_intr_register_notifier(
-                                       sp->host1x_pdev,
-                                       sp->id, thresh,
-                                       gk20a_channel_syncpt_update, c);
-                               if (err)
-                                       gk20a_channel_put(referenced);
-
-                               /* Adding interrupt action should
-                                * never fail. A proper error handling
-                                * here would require us to decrement
-                                * the syncpt max back to its original
-                                * value. */
-                               WARN(err,
-                                    "failed to set submit complete interrupt");
-                       }
+               struct channel_gk20a *referenced = gk20a_channel_get(c);
+
+               WARN_ON(!referenced);
+
+               if (referenced) {
+                       /* note: channel_put() is in
+                        * gk20a_channel_syncpt_update() */
+
+                       err = nvhost_intr_register_notifier(
+                               sp->host1x_pdev,
+                               sp->id, thresh,
+                               gk20a_channel_syncpt_update, c);
+                       if (err)
+                               gk20a_channel_put(referenced);
+
+                       /* Adding interrupt action should
+                        * never fail. A proper error handling
+                        * here would require us to decrement
+                        * the syncpt max back to its original
+                        * value. */
+                       WARN(err,
+                            "failed to set submit complete interrupt");
                }
        }