OMAP: DSS: ensure clocks are disabled on failed init
PATCH 1/1 OMAP: DSS: ensure clocks are disabled on failed init
Currently, if init fails for whatever reason, various DSS related clocks will be left enabled and prevent the chip from hitting retention or off-mode.
This patch ensures the clocks are disabled on a failed init.
For this to work, a check had to be added to dispc_save_context() to not save context if it has not yet been initialized.
---
Patch against v2.6.34-rc5.
Discovered when testing n900 with current PM branch + Roger's series for the LCC panel. DPI init fails since it can't find VDDS_DSI regulator, and as a result init fails out and leaves clocks enabled.
drivers/video/omap2/dss/core.c | 1 + drivers/video/omap2/dss/dispc.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
drivers/video/omap2/dss/core.c +1 -0
@@ -584,6 +584,7 @@ static int omap_dss_probe(struct platform_device *pdev)/* XXX fail correctly */ fail0: +dss_clk_disable_all ();return r; }
drivers/video/omap2/dss/dispc.c +3 -0
@@ -195,6 +195,9 @@ void dispc_save_context(void)if (cpu_is_omap24xx ())return ; +if (!dispc.base) +return ; +SR (SYSCONFIG );SR (IRQENABLE );SR (CONTROL );
Signature · 1 line
1.7.0.2
CC Tomi in case he missed this.
Quoted 51 lines · Kevin Hilman
Currently, if init fails for whatever reason, various DSS related clocks will be left enabled and prevent the chip from hitting retention or off-mode.
This patch ensures the clocks are disabled on a failed init.
For this to work, a check had to be added to
dispc_save_context()to not save context if it has not yet been initialized.Signed-off-by Kevin Hilman <[email protected]>---
Patch against v2.6.34-rc5.Discovered when testing n900 with current PM branch + Roger's series for the LCC panel. DPI init fails since it can't find
VDDS_DSIregulator, and as a result init fails out and leaves clocks enabled.drivers/video/omap2/dss/core.c | 1 +
drivers/video/omap2/dss/dispc.c | 3 +++2 files changed, 4 insertions(+), 0 deletions(-)drivers/video/omap2/dss/core.c +0
-0@@ -584,6 +584,7 @@ static int omap_dss_probe(struct platform_device *pdev) /* XXX fail correctly */fail0:
+dss_clk_disable_all();
return r;
}drivers/video/omap2/dss/dispc.c +3
-1@@ -195,6 +195,9 @@ void dispc_save_context(void) if (cpu_is_omap24xx()) return; + if (!dispc.base) + return; + SR(SYSCONFIG); SR(IRQENABLE); SR(CONTROL); --1.7.0.2
Quoted 5 lines
--
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
Hi,
Quoted 1 line · ext Grazvydas Ignotas
CC Tomi in case he missed this.
Thanks =)
Quoted 11 lines
Quoted 8 lines · Kevin Hilman
Currently, if init fails for whatever reason, various DSS related clocks will be left enabled and prevent the chip from hitting retention or off-mode.
This patch ensures the clocks are disabled on a failed init.
For this to work, a check had to be added to
dispc_save_context()to not save context if it has not yet been initialized.
The code in omap_dss_probe() is actually quite broken, as the /* XXX fail correctly */ hints... At least clocks should be put(), debugfs should be uninitialized etc. So this patch is ok quick fix, but I'll try to find time to fix the fail path properly.
Tom
Quoted 48 lines
Quoted 48 lines
Signed-off-by Kevin Hilman <[email protected]>---
Patch against v2.6.34-rc5.Discovered when testing n900 with current PM branch + Roger's series for the LCC panel. DPI init fails since it can't find
VDDS_DSIregulator, and as a result init fails out and leaves clocks enabled.drivers/video/omap2/dss/core.c | 1 + drivers/video/omap2/dss/dispc.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)drivers/video/omap2/dss/core.c +1
-0@@ -584,6 +584,7 @@ static int omap_dss_probe(struct platform_device *pdev)/* XXX fail correctly */ fail0: +dss_clk_disable_all ();return r; }drivers/video/omap2/dss/dispc.c +3
-1@@ -195,6 +195,9 @@ void dispc_save_context(void)if (cpu_is_omap24xx ())return ; +if (!dispc.base) +return ; +SR (SYSCONFIG );SR (IRQENABLE );SR (CONTROL ); --1.7.0.2
--
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
Quoted 16 lines · Tomi Valkeinen
Hi,
Quoted 1 line · ext Grazvydas Ignotas
CC Tomi in case he missed this.
Thanks =)
Quoted 9 lines
Quoted 6 lines · Kevin Hilman
Currently, if init fails for whatever reason, various DSS related clocks will be left enabled and prevent the chip from hitting retention or off-mode.
This patch ensures the clocks are disabled on a failed init.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
For this to work, a check had to be added to
dispc_save_context()to not save context if it has not yet been initialized.The code in
omap_dss_probe()is actually quite broken, as the /* XXX fail correctly */ hints... At least clocks should beput(), debugfs should be uninitialized etc. So this patch is ok quick fix, but I'll try to find time to fix the fail path properly.
Thanks. My main concern of course is that any failed init will ensure clocks are disabled and the modules are able to idle.
Kevin