1 From 1f2718aa829aac2c918f48bad20e686add305819 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Tue, 9 Apr 2019 18:14:44 +0100
4 Subject: [PATCH 601/773] drm: vc4: Need to call drm_crtc_vblank_[on|off] from
7 vblank needs to be enabled and disabled by the driver to avoid the
8 DRM framework complaining in the kernel log.
10 vc4_fkms_disable_vblank needs to signal that we don't want vblank
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
15 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 6 ++++++
16 1 file changed, 6 insertions(+)
18 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
19 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
20 @@ -562,6 +562,8 @@ static void vc4_crtc_mode_set_nofb(struc
22 static void vc4_crtc_disable(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
24 + drm_crtc_vblank_off(crtc);
26 /* Always turn the planes off on CRTC disable. In DRM, planes
27 * are enabled/disabled through the update/disable hooks
28 * above, and the CRTC enable/disable independently controls
29 @@ -577,6 +579,7 @@ static void vc4_crtc_disable(struct drm_
31 static void vc4_crtc_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
33 + drm_crtc_vblank_on(crtc);
34 /* Unblank the planes (if they're supposed to be displayed). */
36 if (crtc->primary->state->fb)
37 @@ -673,6 +676,9 @@ static int vc4_fkms_enable_vblank(struct
39 static void vc4_fkms_disable_vblank(struct drm_crtc *crtc)
41 + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
43 + vc4_crtc->vblank_enabled = false;
46 static const struct drm_crtc_funcs vc4_crtc_funcs = {