Commit b4e3a3e8 authored by Vikas Sajjan's avatar Vikas Sajjan Committed by Inki Dae

drm/exynos: prepare FIMD clocks

While migrating to common clock framework (CCF), I found that the FIMD clocks
were pulled down by the CCF.
If CCF finds any clock(s) which has NOT been claimed by any of the
drivers, then such clock(s) are PULLed low by CCF.

Calling clk_prepare() for FIMD clocks fixes the issue.

This patch also replaces clk_disable() with clk_unprepare() during exit, since
clk_prepare() is called in fimd_probe().
Signed-off-by: default avatarVikas Sajjan <vikas.sajjan@linaro.org>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent dd4d34fd
...@@ -949,6 +949,16 @@ static int fimd_probe(struct platform_device *pdev) ...@@ -949,6 +949,16 @@ static int fimd_probe(struct platform_device *pdev)
return ret; return ret;
} }
ret = clk_prepare(ctx->bus_clk);
if (ret < 0)
return ret;
ret = clk_prepare(ctx->lcd_clk);
if (ret < 0) {
clk_unprepare(ctx->bus_clk);
return ret;
}
ctx->vidcon0 = pdata->vidcon0; ctx->vidcon0 = pdata->vidcon0;
ctx->vidcon1 = pdata->vidcon1; ctx->vidcon1 = pdata->vidcon1;
ctx->default_win = pdata->default_win; ctx->default_win = pdata->default_win;
...@@ -996,8 +1006,8 @@ static int fimd_remove(struct platform_device *pdev) ...@@ -996,8 +1006,8 @@ static int fimd_remove(struct platform_device *pdev)
if (ctx->suspended) if (ctx->suspended)
goto out; goto out;
clk_disable(ctx->lcd_clk); clk_unprepare(ctx->lcd_clk);
clk_disable(ctx->bus_clk); clk_unprepare(ctx->bus_clk);
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
pm_runtime_put_sync(dev); pm_runtime_put_sync(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment