Commit ae56bfbd authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Maxime Ripard

drm/sun4i: backend: Avoid counting YUV planes that use the frontend

Our hardware has a limited number of YUV planes (usually 1) that can be
supported using the backend only. However, YUV planes can also be
supported by the frontend and must then not be counted when checking for
that limitation.

Only count the YUV plane when the frontend is not used.
Signed-off-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-15-paul.kocialkowski@bootlin.com
parent ab698510
...@@ -542,6 +542,11 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine, ...@@ -542,6 +542,11 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
DRM_DEBUG_DRIVER("Using the frontend for plane %d\n", DRM_DEBUG_DRIVER("Using the frontend for plane %d\n",
plane->index); plane->index);
num_frontend_planes++; num_frontend_planes++;
} else {
if (fb->format->is_yuv) {
DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
num_yuv_planes++;
}
} }
DRM_DEBUG_DRIVER("Plane FB format is %s\n", DRM_DEBUG_DRIVER("Plane FB format is %s\n",
...@@ -550,11 +555,6 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine, ...@@ -550,11 +555,6 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE)) if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE))
num_alpha_planes++; num_alpha_planes++;
if (fb->format->is_yuv) {
DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
num_yuv_planes++;
}
DRM_DEBUG_DRIVER("Plane zpos is %d\n", DRM_DEBUG_DRIVER("Plane zpos is %d\n",
plane_state->normalized_zpos); plane_state->normalized_zpos);
......
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