video: tegra: host: disable MPE auto-power-gate
authorMayuresh Kulkarni <mkulkarni@nvidia.com>
Fri, 14 Jan 2011 02:22:43 +0000 (18:22 -0800)
committerColin Cross <ccross@android.com>
Fri, 14 Jan 2011 23:28:19 +0000 (15:28 -0800)
It is seen that auto-power-gate of MPE causes some issues when long run
camera stress test is run. The issue manifest itself in the form of
MPE sync-point not getting triggered from hardware and hence the caller
who is waiting on it hangs up the system.

Disabling auto-power-gate for MPE seems to resolve this issue.

Original work of Jay Cheng <jacheng@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Change-Id: Iaef9f959cbc00dd715352ca637955cd2bea6f355

drivers/video/tegra/host/nvhost_acm.c

index a4bbce2b6f1ddec778c677877644e0579fb93bbe..14b2b5a6b8c1f4bd96ca0a4326467d40b4ca21a2 100644 (file)
@@ -31,6 +31,7 @@
 #define ACM_TIMEOUT 1*HZ
 
 #define DISABLE_3D_POWERGATING
+#define DISABLE_MPE_POWERGATING
 
 void nvhost_module_busy(struct nvhost_module *mod)
 {
@@ -156,6 +157,19 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name,
        }
 #endif
 
+#ifdef DISABLE_MPE_POWERGATING
+       /*
+        * Disable power gating for MPE as it seems to cause issues with
+        * camera record stress tests when run in loop.
+        */
+       if (mod->powergate_id == TEGRA_POWERGATE_MPE) {
+               tegra_powergate_sequence_power_up(mod->powergate_id,
+                       mod->clk[0]);
+               clk_disable(mod->clk[0]);
+               mod->powergate_id = -1;
+       }
+#endif
+
        mutex_init(&mod->lock);
        init_waitqueue_head(&mod->idle);
        INIT_DELAYED_WORK(&mod->powerdown, powerdown_handler);