diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2015-06-03 17:17:16 -0300 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2015-06-20 00:32:54 +0900 |
commit | 38000dbb71ded4121b27338a2d41ad060001592a (patch) | |
tree | 8ecf65b65621b30664bbdb141ca6c25e657157e5 /drivers/gpu/drm/exynos/exynos7_drm_decon.c | |
parent | 1e5507cecbf3fdb2bd7914b8ebc396ad23f3da67 (diff) | |
download | op-kernel-dev-38000dbb71ded4121b27338a2d41ad060001592a.zip op-kernel-dev-38000dbb71ded4121b27338a2d41ad060001592a.tar.gz |
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/exynos7_drm_decon.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos7_drm_decon.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index d659ba2..d9798e2 100644 --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c @@ -606,6 +606,7 @@ static void decon_init(struct decon_context *ctx) static void decon_enable(struct exynos_drm_crtc *crtc) { struct decon_context *ctx = crtc->ctx; + int ret; if (!ctx->suspended) return; @@ -614,10 +615,29 @@ static void decon_enable(struct exynos_drm_crtc *crtc) pm_runtime_get_sync(ctx->dev); - clk_prepare_enable(ctx->pclk); - clk_prepare_enable(ctx->aclk); - clk_prepare_enable(ctx->eclk); - clk_prepare_enable(ctx->vclk); + ret = clk_prepare_enable(ctx->pclk); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret); + return; + } + + ret = clk_prepare_enable(ctx->aclk); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret); + return; + } + + ret = clk_prepare_enable(ctx->eclk); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret); + return; + } + + ret = clk_prepare_enable(ctx->vclk); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret); + return; + } decon_init(ctx); |