提交 dda9012b 编写于 作者: S Shirish S 提交者: Inki Dae

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: NShirish S <s.shirish@samsung.com>
Signed-off-by: NInki Dae <inki.dae@samsung.com>
上级 428982e7
...@@ -2163,6 +2163,13 @@ static void hdmi_commit(void *ctx) ...@@ -2163,6 +2163,13 @@ static void hdmi_commit(void *ctx)
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); 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); hdmi_conf_apply(hdata);
} }
......
...@@ -776,6 +776,13 @@ static void mixer_win_commit(void *ctx, int win) ...@@ -776,6 +776,13 @@ static void mixer_win_commit(void *ctx, int win)
DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);
mutex_lock(&mixer_ctx->mixer_mutex);
if (!mixer_ctx->powered) {
mutex_unlock(&mixer_ctx->mixer_mutex);
return;
}
mutex_unlock(&mixer_ctx->mixer_mutex);
if (win > 1 && mixer_ctx->vp_enabled) if (win > 1 && mixer_ctx->vp_enabled)
vp_video_buffer(mixer_ctx, win); vp_video_buffer(mixer_ctx, win);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册