drm/imx: ipuv3-plane: fix planar YUV 4:2:0 support
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 23 Feb 2016 09:22:52 +0000 (10:22 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 31 Mar 2016 09:23:32 +0000 (11:23 +0200)
The driver already advertises multi-planar YUV support, but
previously the U/V offset and stride setup was missing.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/ipuv3-plane.c

index 70455d2f56ebc0a45297b7a5bbc7ddc18e0b4392..79df1847a365a95eefc249552d1e9a823a6e30b6 100644 (file)
@@ -312,6 +312,18 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
        if (interlaced)
                ipu_cpmem_interlaced_scan(ipu_plane->ipu_ch, fb->pitches[0]);
 
+       if (fb->pixel_format == DRM_FORMAT_YUV420) {
+               ipu_cpmem_set_yuv_planar_full(ipu_plane->ipu_ch,
+                                             ipu_plane->stride[1],
+                                             ipu_plane->u_offset,
+                                             ipu_plane->v_offset);
+       } else if (fb->pixel_format == DRM_FORMAT_YVU420) {
+               ipu_cpmem_set_yuv_planar_full(ipu_plane->ipu_ch,
+                                             ipu_plane->stride[1],
+                                             ipu_plane->v_offset,
+                                             ipu_plane->u_offset);
+       }
+
        ipu_plane->w = src_w;
        ipu_plane->h = src_h;
 
This page took 0.025986 seconds and 5 git commands to generate.