diff mbox

[44/72] imx-drm: ipuv3-plane: Fix planar formats

Message ID 1414796095-10107-45-git-send-email-steve_longerbeam@mentor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Longerbeam Oct. 31, 2014, 10:54 p.m. UTC
During a mode set the U/V plane strides and buffer offsets
for planar pixel formats were not being configured in cpmem.
Fix by calling ipu_cpmem_set_yuv_planar() for planar formats.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 drivers/staging/imx-drm/ipuv3-plane.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c
index 365cdfe..edfa72a 100644
--- a/drivers/staging/imx-drm/ipuv3-plane.c
+++ b/drivers/staging/imx-drm/ipuv3-plane.c
@@ -174,6 +174,10 @@  int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
 			fb->pixel_format);
 		return ret;
 	}
+	if (ipu_drm_fourcc_is_planar(fb->pixel_format))
+		ipu_cpmem_set_yuv_planar(ipu_plane->ipu_ch, fb->pixel_format,
+					 fb->pitches[0], crtc_h);
+
 	ipu_cpmem_set_high_priority(ipu_plane->ipu_ch);
 
 	ret = ipu_plane_set_base(ipu_plane, fb, src_x, src_y);