tegra: host: Disable MPE power gating
Terje Bergstrom [Fri, 12 Aug 2011 10:25:57 +0000 (13:25 +0300)]
Disable MPE power gating until power gating race has been fixed.

Bug 857044

Original-Change-Id: I92a5adf608ee302fb23413c6ef60d3478c0779d7
Reviewed-on: http://git-master/r/46943
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

Rebase-Id: Rae65b78f6a831457b17c6ebcdd02a13c7d90160d

drivers/video/tegra/host/nvhost_acm.c

index fe105c1..b042aa1 100644 (file)
@@ -352,6 +352,11 @@ static bool _3d_powergating_disabled(void)
        return 1;
 }
 
+/* MPE power gating disabled as it causes syncpt hangs */
+static bool _mpe_powergating_disabled(void)
+{
+       return 1;
+}
 #if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
 int nvhost_module_get_rate(struct nvhost_module *mod, unsigned long *rate,
                            int index)
@@ -505,16 +510,22 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name,
        } else if (strcmp(name, "mpe") == 0)
                mod->powergate_id = TEGRA_POWERGATE_MPE;
 
+       if (mod->powergate_id == TEGRA_POWERGATE_MPE
+               && _mpe_powergating_disabled()) {
+               tegra_unpowergate_partition(mod->powergate_id);
+               mod->powergate_id = -1;
+       }
+
        if (mod->powergate_id == TEGRA_POWERGATE_3D
                && _3d_powergating_disabled()) {
                tegra_unpowergate_partition(mod->powergate_id);
                mod->powergate_id = -1;
 
 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
-       if (mod->powergate_id2 == TEGRA_POWERGATE_3D1) {
-               tegra_unpowergate_partition(mod->powergate_id2);
-               mod->powergate_id2 = -1;
-       }
+               if (mod->powergate_id2 == TEGRA_POWERGATE_3D1) {
+                       tegra_unpowergate_partition(mod->powergate_id2);
+                       mod->powergate_id2 = -1;
+               }
 #endif
        }