aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>2011-07-04 02:06:47 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-19 02:11:12 -0400
commitec19b9e0fa808d82ad996d73358a5b06a565b78b (patch)
treeb852ca01de1699eff920b4aae3d59d3decd1ef7d /drivers/video/sh_mobile_lcdcfb.c
parent176737782e8360f1e577264c7aaeb691a7cbbfdd (diff)
fbdev: sh_mobile_meram: Enable/disable MERAM along with LCDC
The MERAM reference counts should be tied to the two LCDC devices (LCD/HDMI) so that when they are enable/disabled, the MERAM is as well. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index b048417247e8..2f921ad18559 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -259,6 +259,8 @@ static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
259 pm_runtime_get_sync(priv->dev); 259 pm_runtime_get_sync(priv->dev);
260 if (priv->dot_clk) 260 if (priv->dot_clk)
261 clk_enable(priv->dot_clk); 261 clk_enable(priv->dot_clk);
262 if (priv->meram_dev && priv->meram_dev->pdev)
263 pm_runtime_get_sync(&priv->meram_dev->pdev->dev);
262 } 264 }
263} 265}
264 266
@@ -267,6 +269,8 @@ static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
267 if (atomic_sub_return(1, &priv->hw_usecnt) == -1) { 269 if (atomic_sub_return(1, &priv->hw_usecnt) == -1) {
268 if (priv->dot_clk) 270 if (priv->dot_clk)
269 clk_disable(priv->dot_clk); 271 clk_disable(priv->dot_clk);
272 if (priv->meram_dev && priv->meram_dev->pdev)
273 pm_runtime_put_sync(&priv->meram_dev->pdev->dev);
270 pm_runtime_put(priv->dev); 274 pm_runtime_put(priv->dev);
271 } 275 }
272} 276}