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/exynos_mixer.c | |
parent | 1e5507cecbf3fdb2bd7914b8ebc396ad23f3da67 (diff) | |
download | talos-op-linux-38000dbb71ded4121b27338a2d41ad060001592a.tar.gz talos-op-linux-38000dbb71ded4121b27338a2d41ad060001592a.zip |
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_mixer.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 6bab71704bab..1b77fc766051 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -1031,6 +1031,7 @@ static void mixer_enable(struct exynos_drm_crtc *crtc) { struct mixer_context *ctx = crtc->ctx; struct mixer_resources *res = &ctx->mixer_res; + int ret; mutex_lock(&ctx->mixer_mutex); if (ctx->powered) { @@ -1042,12 +1043,32 @@ static void mixer_enable(struct exynos_drm_crtc *crtc) pm_runtime_get_sync(ctx->dev); - clk_prepare_enable(res->mixer); - clk_prepare_enable(res->hdmi); + ret = clk_prepare_enable(res->mixer); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the mixer clk [%d]\n", ret); + return; + } + ret = clk_prepare_enable(res->hdmi); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the hdmi clk [%d]\n", ret); + return; + } if (ctx->vp_enabled) { - clk_prepare_enable(res->vp); - if (ctx->has_sclk) - clk_prepare_enable(res->sclk_mixer); + ret = clk_prepare_enable(res->vp); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the vp clk [%d]\n", + ret); + return; + } + if (ctx->has_sclk) { + ret = clk_prepare_enable(res->sclk_mixer); + if (ret < 0) { + DRM_ERROR("Failed to prepare_enable the " \ + "sclk_mixer clk [%d]\n", + ret); + return; + } + } } mutex_lock(&ctx->mixer_mutex); |