diff options
author | Vikas Sajjan <vikas.sajjan@linaro.org> | 2013-04-23 07:49:50 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2013-04-29 01:35:31 -0400 |
commit | 11963a638f7ac30f926f4358f7f699828408bb96 (patch) | |
tree | 1923ee45cc7afe62b3689e1a9e6d64a1ee390b4a /drivers/gpu/drm/exynos | |
parent | baa88c8313bfdb5086220cbd962a93617ee85a91 (diff) |
drm/exynos: enable FIMD clocks
Common Clock Framework introduced the need to prepare clocks before
enabling them, otherwise clk_enable() fails. This patch adds clk_prepare_enable
and clk_disable_unprepare() calls to the driver.
This patch also removes clk_disable() from fimd_remove() as it will be done
by pm_runtime_put_sync.
Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 4073430e22c3..746b282b343a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -801,18 +801,18 @@ static int fimd_clock(struct fimd_context *ctx, bool enable) | |||
801 | if (enable) { | 801 | if (enable) { |
802 | int ret; | 802 | int ret; |
803 | 803 | ||
804 | ret = clk_enable(ctx->bus_clk); | 804 | ret = clk_prepare_enable(ctx->bus_clk); |
805 | if (ret < 0) | 805 | if (ret < 0) |
806 | return ret; | 806 | return ret; |
807 | 807 | ||
808 | ret = clk_enable(ctx->lcd_clk); | 808 | ret = clk_prepare_enable(ctx->lcd_clk); |
809 | if (ret < 0) { | 809 | if (ret < 0) { |
810 | clk_disable(ctx->bus_clk); | 810 | clk_disable_unprepare(ctx->bus_clk); |
811 | return ret; | 811 | return ret; |
812 | } | 812 | } |
813 | } else { | 813 | } else { |
814 | clk_disable(ctx->lcd_clk); | 814 | clk_disable_unprepare(ctx->lcd_clk); |
815 | clk_disable(ctx->bus_clk); | 815 | clk_disable_unprepare(ctx->bus_clk); |
816 | } | 816 | } |
817 | 817 | ||
818 | return 0; | 818 | return 0; |
@@ -996,9 +996,6 @@ static int fimd_remove(struct platform_device *pdev) | |||
996 | if (ctx->suspended) | 996 | if (ctx->suspended) |
997 | goto out; | 997 | goto out; |
998 | 998 | ||
999 | clk_disable(ctx->lcd_clk); | ||
1000 | clk_disable(ctx->bus_clk); | ||
1001 | |||
1002 | pm_runtime_set_suspended(dev); | 999 | pm_runtime_set_suspended(dev); |
1003 | pm_runtime_put_sync(dev); | 1000 | pm_runtime_put_sync(dev); |
1004 | 1001 | ||