diff options
| author | Shirish S <s.shirish@samsung.com> | 2013-01-23 22:03:18 -0500 |
|---|---|---|
| committer | Inki Dae <inki.dae@samsung.com> | 2013-01-25 00:38:46 -0500 |
| commit | dda9012b2ad98f0ed124ea1f44b82f8b2288f697 (patch) | |
| tree | 589dd10b71dc55312474e53dd72b3f2c66b27ce7 | |
| parent | 428982e70ad1a6dbd583d6fb4f896595dac382e1 (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>
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 7 | ||||
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 32c04a696a59..fbab3c468603 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) | |||
| 2163 | 2163 | ||
| 2164 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 2164 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
| 2165 | 2165 | ||
| 2166 | mutex_lock(&hdata->hdmi_mutex); | ||
| 2167 | if (!hdata->powered) { | ||
| 2168 | mutex_unlock(&hdata->hdmi_mutex); | ||
| 2169 | return; | ||
| 2170 | } | ||
| 2171 | mutex_unlock(&hdata->hdmi_mutex); | ||
| 2172 | |||
| 2166 | hdmi_conf_apply(hdata); | 2173 | hdmi_conf_apply(hdata); |
| 2167 | } | 2174 | } |
| 2168 | 2175 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 1ff2d7a045b5..c414584bfbae 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
| @@ -776,6 +776,13 @@ static void mixer_win_commit(void *ctx, int win) | |||
| 776 | 776 | ||
| 777 | DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); | 777 | DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); |
| 778 | 778 | ||
| 779 | mutex_lock(&mixer_ctx->mixer_mutex); | ||
| 780 | if (!mixer_ctx->powered) { | ||
| 781 | mutex_unlock(&mixer_ctx->mixer_mutex); | ||
| 782 | return; | ||
| 783 | } | ||
| 784 | mutex_unlock(&mixer_ctx->mixer_mutex); | ||
| 785 | |||
| 779 | if (win > 1 && mixer_ctx->vp_enabled) | 786 | if (win > 1 && mixer_ctx->vp_enabled) |
| 780 | vp_video_buffer(mixer_ctx, win); | 787 | vp_video_buffer(mixer_ctx, win); |
| 781 | else | 788 | else |
