]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Setup planes before enabling CRTC to avoid flicker
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 27 Jun 2017 10:18:38 +0000 (13:18 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 3 Aug 2017 13:17:24 +0000 (16:17 +0300)
commit13f0f43192dd440a2b580db63925a6f50348442b
tree626f875b2c838eb9422754cd42f31ecee29da12b
parent64cc2c4feeeb2dcc4d3b4b6200632e77862c6244
drm: rcar-du: Setup planes before enabling CRTC to avoid flicker

Commit 6ce78188ce0e ("drm: rcar-du: Move plane commit code from CRTC
start to CRTC resume") changed the order of the plane commit and CRTC
enable operations to accommodate the runtime PM requirements. However,
this introduced corruption in the first displayed frame, as the CRTC is
now enabled without any plane configured. On Gen2 hardware the first
frame will be black and likely unnoticed, but on Gen3 hardware we end up
starting the display before the VSP compositor, which is more
noticeable.

To fix this, revert the order of the commit operations back, and handle
runtime PM requirements in the CRTC .atomic_begin() and .atomic_enable()
helper operation handlers.

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