drm: rcar-du: Fix CRTC timings when CMM is used
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 29 Nov 2021 01:10:46 +0000 (03:10 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 6 Dec 2021 16:19:48 +0000 (18:19 +0200)
commitf0ce591dc9a97067c6e783a2eaccd22c5476144d
treeb7aeff3b847f69128bc2aabcb74e7f616290ca9e
parent42d95d1b3a9c649bf5ee881fee5938e00126479a
drm: rcar-du: Fix CRTC timings when CMM is used

When the CMM is enabled, an offset of 25 pixels must be subtracted from
the HDS (horizontal display start) and HDE (horizontal display end)
registers. Fix the timings calculation, and take this into account in
the mode validation.

This fixes a visible horizontal offset in the image with VGA monitors.
HDMI monitors seem to be generally more tolerant to incorrect timings,
but may be affected too.

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