OSDN Git Service

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 5780479..4b7cf6c 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 e991642..4480243 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,
        };