aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorShirish S <s.shirish@samsung.com>2013-01-23 22:03:18 -0500
committerInki Dae <inki.dae@samsung.com>2013-01-25 14:38:46 +0900
commitdda9012b2ad98f0ed124ea1f44b82f8b2288f697 (patch)
tree589dd10b71dc55312474e53dd72b3f2c66b27ce7 /drivers/gpu/drm/exynos/exynos_hdmi.c
parent428982e70ad1a6dbd583d6fb4f896595dac382e1 (diff)
drm/exynos: add check for the device power status
V2: Add mutex protection, while read. The hdmi and mixer win_commit calls currently are not checking the status of IP before updating the respective registers, this patch adds this check. Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 32c04a696a5..fbab3c46860 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2163,6 +2163,13 @@ static void hdmi_commit(void *ctx)
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
+ mutex_lock(&hdata->hdmi_mutex);
+ if (!hdata->powered) {
+ mutex_unlock(&hdata->hdmi_mutex);
+ return;
+ }
+ mutex_unlock(&hdata->hdmi_mutex);
+
hdmi_conf_apply(hdata);
}