diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-02-21 13:57:03 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-03-06 16:27:54 +0100 |
commit | fd00c4ee76f0b509ce79ffbc1f5a682fbdd84efd (patch) | |
tree | b5ba583a0c9b6ef28504b135227faec5dbd4d9af /drivers/gpu | |
parent | 5af894bd20fa16970378cae8ff55917294e0d9dd (diff) | |
download | linux-fd00c4ee76f0b509ce79ffbc1f5a682fbdd84efd.tar.gz linux-fd00c4ee76f0b509ce79ffbc1f5a682fbdd84efd.tar.bz2 linux-fd00c4ee76f0b509ce79ffbc1f5a682fbdd84efd.zip |
drm/sun4i: crtc: Call drm_crtc_vblank_on / drm_crtc_vblank_off
Make sure that the CRTC code will call the enable/disable_vblank hooks.
Otherwise, since the refcounting will be off, we might end up in a
situation where the vblank management functions are called while the CRTC
is off.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180221125703.4595-3-maxime.ripard@bootlin.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_crtc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c index 5decae0069d0..78cbc3145e44 100644 --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c @@ -93,6 +93,8 @@ static void sun4i_crtc_atomic_disable(struct drm_crtc *crtc, DRM_DEBUG_DRIVER("Disabling the CRTC\n"); + drm_crtc_vblank_off(crtc); + sun4i_tcon_set_status(scrtc->tcon, encoder, false); if (crtc->state->event && !crtc->state->active) { @@ -113,6 +115,8 @@ static void sun4i_crtc_atomic_enable(struct drm_crtc *crtc, DRM_DEBUG_DRIVER("Enabling the CRTC\n"); sun4i_tcon_set_status(scrtc->tcon, encoder, true); + + drm_crtc_vblank_on(crtc); } static void sun4i_crtc_mode_set_nofb(struct drm_crtc *crtc) |