瀏覽代碼

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>
Philipp Zabel 9 年之前
父節點
當前提交
5be5dd38d4
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      drivers/gpu/drm/imx/ipuv3-plane.c

+ 2 - 4
drivers/gpu/drm/imx/ipuv3-plane.c

@@ -545,15 +545,13 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
 		return;
 		return;
 	}
 	}
 
 
+	ics = ipu_drm_fourcc_to_colorspace(fb->format->format);
 	switch (ipu_plane->dp_flow) {
 	switch (ipu_plane->dp_flow) {
 	case IPU_DP_FLOW_SYNC_BG:
 	case IPU_DP_FLOW_SYNC_BG:
-		ipu_dp_setup_channel(ipu_plane->dp,
-					IPUV3_COLORSPACE_RGB,
-					IPUV3_COLORSPACE_RGB);
+		ipu_dp_setup_channel(ipu_plane->dp, ics, IPUV3_COLORSPACE_RGB);
 		ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
 		ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
 		break;
 		break;
 	case IPU_DP_FLOW_SYNC_FG:
 	case IPU_DP_FLOW_SYNC_FG:
-		ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format);
 		ipu_dp_setup_channel(ipu_plane->dp, ics,
 		ipu_dp_setup_channel(ipu_plane->dp, ics,
 					IPUV3_COLORSPACE_UNKNOWN);
 					IPUV3_COLORSPACE_UNKNOWN);
 		/* Enable local alpha on partial plane */
 		/* Enable local alpha on partial plane */