video: tegra: host: Don't use KEPLER_C syncpt incr
Robert Morell [Wed, 11 Jun 2014 15:52:42 +0000 (08:52 -0700)]
This is a partial revert of commit a571ce594: "video: tegra: host: Use
KEPLER_C syncpt incr".

That commit seems to be causing MMU faults from host under some
workloads.  The root cause isn't fully understood yet, but reverting
to the old behavior should be safe.

Bug 1497928

Change-Id: I5b464d40c57deb95ca4890240213685968bf94a1
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Reviewed-on: http://git-master/r/422283
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

drivers/video/tegra/host/gk20a/channel_gk20a.c

index efb1c69..bf15be9 100644 (file)
@@ -1528,8 +1528,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
         * sure the fence represents work completion.  In that case
         * issue a wait-for-idle before the syncpoint increment.
         */
-       wfi_cmd = !!(flags & NVHOST_SUBMIT_GPFIFO_FLAGS_FENCE_GET)
-               && c->obj_class != KEPLER_C;
+       wfi_cmd = !!(flags & NVHOST_SUBMIT_GPFIFO_FLAGS_FENCE_GET);
 
        /* Invalidate tlb if it's dirty...                                   */
        /* TBD: this should be done in the cmd stream, not with PRIs.        */
@@ -1671,26 +1670,16 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
                c->last_submit_fence.wfi          = wfi_cmd;
 
                trace_nvhost_ioctl_ctrl_syncpt_incr(fence->syncpt_id);
-               if (c->obj_class == KEPLER_C) {
-                       /* setobject KEPLER_C */
-                       incr_cmd->ptr[j++] = 0x20010000;
-                       incr_cmd->ptr[j++] = KEPLER_C;
-                       /* syncpt incr */
-                       incr_cmd->ptr[j++] = 0x200100B2;
-                       incr_cmd->ptr[j++] = fence->syncpt_id | (0x1 << 20)
-                               | (0x1 << 16);
-               } else {
-                       if (wfi_cmd)
-                               add_wfi_cmd(incr_cmd, &j);
-                       /* syncpoint_a */
-                       incr_cmd->ptr[j++] = 0x2001001C;
-                       /* payload, ignored */
-                       incr_cmd->ptr[j++] = 0;
-                       /* syncpoint_b */
-                       incr_cmd->ptr[j++] = 0x2001001D;
-                       /* syncpt_id, incr */
-                       incr_cmd->ptr[j++] = (fence->syncpt_id << 8) | 0x1;
-               }
+               if (wfi_cmd)
+                       add_wfi_cmd(incr_cmd, &j);
+               /* syncpoint_a */
+               incr_cmd->ptr[j++] = 0x2001001C;
+               /* payload, ignored */
+               incr_cmd->ptr[j++] = 0;
+               /* syncpoint_b */
+               incr_cmd->ptr[j++] = 0x2001001D;
+               /* syncpt_id, incr */
+               incr_cmd->ptr[j++] = (fence->syncpt_id << 8) | 0x1;
 
                c->gpfifo.cpu_va[c->gpfifo.put].entry0 =
                        u64_lo32(incr_cmd->gva);