]> git.itanic.dy.fi Git - linux-stable/commit
drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 15 Sep 2023 08:53:48 +0000 (10:53 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 16 Oct 2023 09:47:47 +0000 (11:47 +0200)
commitc285aac128edadd42ba165df2aa28f22dbaeb602
tree594ec3faba3ae2772cc9567e7680a1ca3872caa6
parentb1ce7fe4c4368886db5b838ee53a253e60b5abbf
drm: renesas: shmobile: 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.

Note that 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
blank initialization to be moved before creating CRTCs.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/e5833e5706b7792bfca8e6e56fc154a7c3e0574f.1694767209.git.geert+renesas@glider.be
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c