aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2018-11-23 04:24:46 -0500
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-11-27 03:51:54 -0500
commitae56bfbdad9b1996037a7209321cfb2ef49ea563 (patch)
treea7f5d173ea821c37b71c74efd7fe7e07e4096862
parentab6985108a53d531f0abaf06529ba148403d187d (diff)
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: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-15-paul.kocialkowski@bootlin.com
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_backend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index 52caf561da0e..2a9569f16c81 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -542,6 +542,11 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
542 DRM_DEBUG_DRIVER("Using the frontend for plane %d\n", 542 DRM_DEBUG_DRIVER("Using the frontend for plane %d\n",
543 plane->index); 543 plane->index);
544 num_frontend_planes++; 544 num_frontend_planes++;
545 } else {
546 if (fb->format->is_yuv) {
547 DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
548 num_yuv_planes++;
549 }
545 } 550 }
546 551
547 DRM_DEBUG_DRIVER("Plane FB format is %s\n", 552 DRM_DEBUG_DRIVER("Plane FB format is %s\n",
@@ -550,11 +555,6 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine,
550 if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE)) 555 if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE))
551 num_alpha_planes++; 556 num_alpha_planes++;
552 557
553 if (fb->format->is_yuv) {
554 DRM_DEBUG_DRIVER("Plane FB format is YUV\n");
555 num_yuv_planes++;
556 }
557
558 DRM_DEBUG_DRIVER("Plane zpos is %d\n", 558 DRM_DEBUG_DRIVER("Plane zpos is %d\n",
559 plane_state->normalized_zpos); 559 plane_state->normalized_zpos);
560 560