]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Turn vblank on/off when enabling/disabling CRTC
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 18 Feb 2015 11:14:46 +0000 (13:14 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 3 Mar 2015 14:16:05 +0000 (16:16 +0200)
commit1258185f6d7e909d00a05c97d7d320e0267eeed9
tree4f02df15583c0221e417d036c7e0fa0509536a9e
parentd9c7a76e009ef6f1c4ddce7196c99c6543a1a333
drm: rcar-du: Turn vblank on/off when enabling/disabling CRTC

The DRM core vblank handling mechanism requires drivers to forcefully
turn vblank reporting off when disabling the CRTC, and to restore the
vblank reporting status when enabling the CRTC.

Implement this using the drm_crtc_vblank_on/off helpers. When disabling
vblank we must first wait for page flips to complete, so implement page
flip completion wait as well.

Finally, drm_crtc_vblank_off() must be called at startup to synchronize
the state of the vblank core code with the hardware, which is initially
disabled. This is performed at CRTC creation time, requiring vertical
blanking to be initialized before creating CRTCs.

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