summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWen Yi <wyi@nvidia.com>2011-05-17 13:49:28 -0700
committerNiket Sirsi <nsirsi@nvidia.com>2011-07-22 16:29:31 -0700
commit00aa9d18ae1e3c5cb26cc036467e93cfbd04d72a (patch)
treea0c0f302ba749067bca412e0250479a6f4b132cc
parent742bb4012fae6396b10dc5be13d7ee384a14c501 (diff)
video: tegra: host: change acm timeout to 40 ms
The cursor in Android application flashes about 1 hz and the duty cycle for this kind of 3D activity should be far smaller than 1 second. To save power set acm timeout to 25 ms. 40 ms (4 in jiffies) is selected to prevent jitter of 30 fps video capture. BUG 824299 (cherry picked from http://git-master/r/31905) Change-Id: Ibab9949d18c464119886ecefa016fbb963eeb2b7 Reviewed-on: http://git-master/r/37279 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Sun Kyu Choi <sunkyuc@nvidia.com> Reviewed-by: Joshua Cha <joshuac@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index c2152287506f..bde5a7f9ffc8 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -30,7 +30,7 @@
#include "dev.h"
-#define ACM_TIMEOUT 1*HZ
+#define ACM_TIMEOUT_MSEC 40
#define DISABLE_3D_POWERGATING
#define DISABLE_MPE_POWERGATING
@@ -88,7 +88,8 @@ void nvhost_module_idle_mult(struct nvhost_module *mod, int refs)
mutex_lock(&mod->lock);
if (atomic_sub_return(refs, &mod->refcount) == 0) {
BUG_ON(!mod->powered);
- schedule_delayed_work(&mod->powerdown, ACM_TIMEOUT);
+ schedule_delayed_work(&mod->powerdown,
+ msecs_to_jiffies(ACM_TIMEOUT_MSEC));
kick = true;
}
mutex_unlock(&mod->lock);
@@ -226,7 +227,7 @@ void nvhost_module_suspend(struct nvhost_module *mod, bool system_suspend)
debug_not_idle(mod);
ret = wait_event_timeout(mod->idle, is_module_idle(mod),
- ACM_TIMEOUT + msecs_to_jiffies(500));
+ msecs_to_jiffies(ACM_TIMEOUT_MSEC+500));
if (ret == 0)
nvhost_debug_dump();