drm: rcar-du: Extend CMM HDSE documentation
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Sat, 9 Apr 2022 18:57:06 +0000 (19:57 +0100)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 7 Jul 2022 02:21:54 +0000 (05:21 +0300)
When the CMM is enabled, the HDSE offset is further adjusted to
compensate for consumed pixels.

Explain this further, with an extra comment at the point the offset is
adjusted.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c

index f361a60..23e1aed 100644 (file)
@@ -300,6 +300,11 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
             | DSMR_DIPM_DISP | DSMR_CSPM;
        rcar_du_crtc_write(rcrtc, DSMR, dsmr);
 
+       /*
+        * When the CMM is enabled, an additional offset of 25 pixels must be
+        * subtracted from the HDS (horizontal display start) and HDE
+        * (horizontal display end) registers.
+        */
        hdse_offset = 19;
        if (rcrtc->group->cmms_mask & BIT(rcrtc->index % 2))
                hdse_offset += 25;