diff options
author | G, Manjunath Kondaiah <manjugk@ti.com> | 2010-10-29 16:19:10 +0530 |
---|---|---|
committer | G, Manjunath Kondaiah <manjugk@ti.com> | 2010-10-29 16:19:32 +0530 |
commit | 29e973b87c89e22a8ee95ee38afb0039a395d50d (patch) | |
tree | 0709d8db8e4e1fd445c944d0b157104d35b5e50f /drivers/video/omap2/dss/dss.c | |
parent | 08e5ff41d66926d88ef166ca53f6972753fbb360 (diff) | |
parent | 80b87dcb1b6167f303e617fdb7c70d814b2468d5 (diff) |
Merge branch 'Display changes' into L24.11ti-2.6.35-omap4-L24.11-p1
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 3469e38d4fb0..a9f61bd038ec 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -134,6 +134,13 @@ void dss_restore_context(void) #undef SR #undef RR +/* + * OMAP4 does not allow aggressive DSS clock cutting, so we must keep the + * clocks enabled during display use. These next two methods on OMAP4 + * increment and decrement the global mainclk counter. The needed opt + * clocks are enabled once during bootup and then handled by the pm + * framework. + */ bool dss_get_mainclk_state() { return dss.mainclk_state; @@ -141,20 +148,22 @@ bool dss_get_mainclk_state() int dss_mainclk_enable() { + int ret = 0; + if (!dss.mainclk_state) { - pm_runtime_get_sync(&dss.pdev->dev); - dss.mainclk_state = true; - return 0; + ret = pm_runtime_get_sync(&dss.pdev->dev); + if (ret >= 0) + dss.mainclk_state = true; } - return -EINVAL; + return ret; } void dss_mainclk_disable() { if (dss.mainclk_state) { - pm_runtime_put_sync(&dss.pdev->dev); dss.mainclk_state = false; + pm_runtime_put_sync(&dss.pdev->dev); } } |