From: Mayuresh Kulkarni Date: Fri, 14 Jan 2011 02:22:43 +0000 (-0800) Subject: video: tegra: host: disable MPE auto-power-gate X-Git-Tag: firefly_0821_release~9833^2~58^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cea5c11234ecf4692aae8cf27a4d0c8008c703a0;p=firefly-linux-kernel-4.4.55.git video: tegra: host: disable MPE auto-power-gate 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 Signed-off-by: Mayuresh Kulkarni Change-Id: Iaef9f959cbc00dd715352ca637955cd2bea6f355 --- diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index a4bbce2b6f1d..14b2b5a6b8c1 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -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);