summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_fimd.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2015-06-03 17:17:16 -0300
committerInki Dae <daeinki@gmail.com>2015-06-20 00:32:54 +0900
commit38000dbb71ded4121b27338a2d41ad060001592a (patch)
tree8ecf65b65621b30664bbdb141ca6c25e657157e5 /drivers/gpu/drm/exynos/exynos_drm_fimd.c
parent1e5507cecbf3fdb2bd7914b8ebc396ad23f3da67 (diff)
downloadlinux-38000dbb71ded4121b27338a2d41ad060001592a.tar.bz2
drm/exynos: add error messages if clks failed to get enabled
Check error and call DRM_ERROR if clk_prepare_enable() fails. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fimd.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 96618534358e..7c8ba614cd44 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -808,6 +808,7 @@ static void fimd_apply(struct fimd_context *ctx)
static void fimd_enable(struct exynos_drm_crtc *crtc)
{
struct fimd_context *ctx = crtc->ctx;
+ int ret;
if (!ctx->suspended)
return;
@@ -816,8 +817,17 @@ static void fimd_enable(struct exynos_drm_crtc *crtc)
pm_runtime_get_sync(ctx->dev);
- clk_prepare_enable(ctx->bus_clk);
- clk_prepare_enable(ctx->lcd_clk);
+ ret = clk_prepare_enable(ctx->bus_clk);
+ if (ret < 0) {
+ DRM_ERROR("Failed to prepare_enable the bus clk [%d]\n", ret);
+ return;
+ }
+
+ ret = clk_prepare_enable(ctx->lcd_clk);
+ if (ret < 0) {
+ DRM_ERROR("Failed to prepare_enable the lcd clk [%d]\n", ret);
+ return;
+ }
/* if vblank was enabled status, enable it again. */
if (test_and_clear_bit(0, &ctx->irq_flags))