aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2016-08-05 05:55:18 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-08-11 04:31:13 -0400
commit5be5dd38d4628fdbff7359f235f7cdf0cf9655f1 (patch)
tree884f0bd5dd1829c07d80a6dd9f1715a8b6a60984
parent2406b296a3a80ba1c78707f205556f2388d474ff (diff)
drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane
Historically, only RGB framebuffers could be assigned to the primary plane. This changed with universal plane support. Since no colorspace conversion was set up for the IPUv3 full plane, assigning YUV frame buffers to the primary plane caused incorrect output. Fix this by enabling color space conversion also for the primary plane. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r--drivers/gpu/drm/imx/ipuv3-plane.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 6276bb834b4f..d3845989a29d 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -545,15 +545,13 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
545 return; 545 return;
546 } 546 }
547 547
548 ics = ipu_drm_fourcc_to_colorspace(fb->format->format);
548 switch (ipu_plane->dp_flow) { 549 switch (ipu_plane->dp_flow) {
549 case IPU_DP_FLOW_SYNC_BG: 550 case IPU_DP_FLOW_SYNC_BG:
550 ipu_dp_setup_channel(ipu_plane->dp, 551 ipu_dp_setup_channel(ipu_plane->dp, ics, IPUV3_COLORSPACE_RGB);
551 IPUV3_COLORSPACE_RGB,
552 IPUV3_COLORSPACE_RGB);
553 ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true); 552 ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
554 break; 553 break;
555 case IPU_DP_FLOW_SYNC_FG: 554 case IPU_DP_FLOW_SYNC_FG:
556 ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format);
557 ipu_dp_setup_channel(ipu_plane->dp, ics, 555 ipu_dp_setup_channel(ipu_plane->dp, ics,
558 IPUV3_COLORSPACE_UNKNOWN); 556 IPUV3_COLORSPACE_UNKNOWN);
559 /* Enable local alpha on partial plane */ 557 /* Enable local alpha on partial plane */