drm: rcar-du: Support interlaced video output through vsp1
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fri, 3 Aug 2018 11:37:30 +0000 (12:37 +0100)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 14 Sep 2018 10:54:03 +0000 (13:54 +0300)
Use the newly exposed VSP1 interface to enable interlaced frame support
through the VSP1 LIF pipelines.

The DSMR register is updated to set the ODEV flag on interlaced
pipelines, thus defining an interlaced stream as having the ODD field
located in the second half (BOTTOM) of the frame buffer.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_vsp.c

index 578047986a299896446881dd2b98839108acf742..4b7cf6cf0c57b733e54651b4ac0a43737c845a7b 100644 (file)
@@ -285,6 +285,7 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
        /* Signal polarities */
        value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
              | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
+             | ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? DSMR_ODEV : 0)
              | DSMR_DIPM_DISP | DSMR_CSPM;
        rcar_du_crtc_write(rcrtc, DSMR, value);
 
index e991642afa4f275d10727a0e5eb1743f7ec8577c..4480243813ecd00e973426c94f2763c307b29b33 100644 (file)
@@ -48,6 +48,7 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
        struct vsp1_du_lif_config cfg = {
                .width = mode->hdisplay,
                .height = mode->vdisplay,
+               .interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE,
                .callback = rcar_du_vsp_complete,
                .callback_data = crtc,
        };