Commit 5e68fef2 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Inki Dae

drm/exynos: mixer: unify a check for video-processor window

Always use macro instead of hard-coded '2' value in conditions related
to video processor window. Additional checks are not needed, because
video layer is registered only when video processor is available.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 26a7af3e
...@@ -438,7 +438,7 @@ static void mixer_cfg_layer(struct mixer_context *ctx, unsigned int win, ...@@ -438,7 +438,7 @@ static void mixer_cfg_layer(struct mixer_context *ctx, unsigned int win,
MXR_LAYER_CFG_GRP1_VAL(priority), MXR_LAYER_CFG_GRP1_VAL(priority),
MXR_LAYER_CFG_GRP1_MASK); MXR_LAYER_CFG_GRP1_MASK);
break; break;
case 2: case VP_DEFAULT_WIN:
if (ctx->vp_enabled) { if (ctx->vp_enabled) {
vp_reg_writemask(res, VP_ENABLE, val, VP_ENABLE_ON); vp_reg_writemask(res, VP_ENABLE, val, VP_ENABLE_ON);
mixer_reg_writemask(res, MXR_CFG, val, mixer_reg_writemask(res, MXR_CFG, val,
...@@ -990,7 +990,7 @@ static void mixer_update_plane(struct exynos_drm_crtc *crtc, ...@@ -990,7 +990,7 @@ static void mixer_update_plane(struct exynos_drm_crtc *crtc,
if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags)) if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags))
return; return;
if (plane->index > 1 && mixer_ctx->vp_enabled) if (plane->index == VP_DEFAULT_WIN)
vp_video_buffer(mixer_ctx, plane); vp_video_buffer(mixer_ctx, plane);
else else
mixer_graph_buffer(mixer_ctx, plane); mixer_graph_buffer(mixer_ctx, plane);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment