diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-07-11 05:05:49 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-19 02:22:28 -0400 |
commit | f1ad90da5c0fcb8841cc5e6d66c56f4005d8c960 (patch) | |
tree | 4388339e0fc590f27816ada7a16be8c284949b77 /drivers/video/sh_mobile_lcdcfb.c | |
parent | 91142bfe98d2a4e52969e12aa0e48e48505bcee2 (diff) |
fbdev: sh_mobile_lcdc: Turn dot clock on before resuming from runtime PM
Resuming from runtime PM restores all LCDC registers. If the dot clock
is off at that time display panning information will be corrupted.
Turn the dot clock on before resuming from runtime PM. Similarly,
turn the clock off after suspending the LCDC.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 2f921ad18559..913515908c52 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -256,9 +256,9 @@ struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = { | |||
256 | static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv) | 256 | static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv) |
257 | { | 257 | { |
258 | if (atomic_inc_and_test(&priv->hw_usecnt)) { | 258 | if (atomic_inc_and_test(&priv->hw_usecnt)) { |
259 | pm_runtime_get_sync(priv->dev); | ||
260 | if (priv->dot_clk) | 259 | if (priv->dot_clk) |
261 | clk_enable(priv->dot_clk); | 260 | clk_enable(priv->dot_clk); |
261 | pm_runtime_get_sync(priv->dev); | ||
262 | if (priv->meram_dev && priv->meram_dev->pdev) | 262 | if (priv->meram_dev && priv->meram_dev->pdev) |
263 | pm_runtime_get_sync(&priv->meram_dev->pdev->dev); | 263 | pm_runtime_get_sync(&priv->meram_dev->pdev->dev); |
264 | } | 264 | } |
@@ -267,11 +267,11 @@ static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv) | |||
267 | static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv) | 267 | static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv) |
268 | { | 268 | { |
269 | if (atomic_sub_return(1, &priv->hw_usecnt) == -1) { | 269 | if (atomic_sub_return(1, &priv->hw_usecnt) == -1) { |
270 | if (priv->dot_clk) | ||
271 | clk_disable(priv->dot_clk); | ||
272 | if (priv->meram_dev && priv->meram_dev->pdev) | 270 | if (priv->meram_dev && priv->meram_dev->pdev) |
273 | pm_runtime_put_sync(&priv->meram_dev->pdev->dev); | 271 | pm_runtime_put_sync(&priv->meram_dev->pdev->dev); |
274 | pm_runtime_put(priv->dev); | 272 | pm_runtime_put(priv->dev); |
273 | if (priv->dot_clk) | ||
274 | clk_disable(priv->dot_clk); | ||
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||