Fixing subject this time.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ramirez Luna, Omar
Sent: Tuesday, November 03, 2009 5:08 PM
To: Linux OMAP
Subject: [PATCH 1/6] DSPBRIDGE: Lower power transtion timeout

Given system latency and low timer resolutions, device
driver timeout needs to be cut to report any error, while
transitioning to OFF mode.

In the best case scenario, the transition should be immediate,
but in the worst scenario it could take up to ~400 ms,
even tough the driver defines the waiting loop to be 200 ms.

Signed-off-by: Omar Ramirez Luna <[email protected]>
---
 drivers/dsp/bridge/wmd/_tiomap_util.h   |    7 +++++--
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/_tiomap_util.h 
b/drivers/dsp/bridge/wmd/_tiomap_util.h
index 8f1e515..bd1b571 100644
--- a/drivers/dsp/bridge/wmd/_tiomap_util.h
+++ b/drivers/dsp/bridge/wmd/_tiomap_util.h
@@ -31,8 +31,11 @@
 /* Time out Values in uSeconds*/
 #define TIHELEN_ACKTIMEOUT  10000
 
-/* Time out for power state transition (in msecs) */
-#define PWRSTST_TIMEOUT                1500
+/*
+ * Time out for power state transition (in msecs), due to system
+ * latencies and HZ resolution this timer can vary.
+ */
+#define PWRSTST_TIMEOUT                200
 
 /*  Time delay for HOM->SAM transition. */
 #define  WAIT_SAM   1000000    /* in usec (1000 millisec) */
diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c 
b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 0c2f2fd..2eb379f 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -248,7 +248,7 @@ DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN 
u32 dwCmd,
                        &pwrState);
 
        /* Wait for DSP to move into target power state */
-       while ((pwrState != targetPwrState) && --timeout) {
+       while ((pwrState != targetPwrState) && timeout--) {
                if (msleep_interruptible(10)) {
                        pr_err("Waiting for DSP to Suspend interrupted\n");
                        return DSP_EFAIL;
-- 
1.6.2.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to