Skip to content

Commit 06a7d35

Browse files
BobBeckettgregkh
authored andcommitted
drm/imx: notify drm core before sending event during crtc disable
commit 78c68e8 upstream. Notify drm core before sending pending events during crtc disable. This fixes the first event after disable having an old stale timestamp by having drm_crtc_vblank_off update the timestamp to now. This was seen while debugging weston log message: Warning: computed repaint delay is insane: -8212 msec This occurred due to: 1. driver starts up 2. fbcon comes along and restores fbdev, enabling vblank 3. vblank_disable_fn fires via timer disabling vblank, keeping vblank seq number and time set at current value (some time later) 4. weston starts and does a modeset 5. atomic commit disables crtc while it does the modeset 6. ipu_crtc_atomic_disable sends vblank with old seq number and time Fixes: a474478 ("drm/imx: fix crtc vblank state regression") Signed-off-by: Robert Beckett <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ea68394 commit 06a7d35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/imx/ipuv3-crtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
7676
drm_atomic_helper_disable_planes_on_crtc(old_crtc_state, false);
7777
ipu_dc_disable(ipu);
7878

79+
drm_crtc_vblank_off(crtc);
80+
7981
spin_lock_irq(&crtc->dev->event_lock);
8082
if (crtc->state->event) {
8183
drm_crtc_send_vblank_event(crtc, crtc->state->event);
8284
crtc->state->event = NULL;
8385
}
8486
spin_unlock_irq(&crtc->dev->event_lock);
85-
86-
drm_crtc_vblank_off(crtc);
8787
}
8888

8989
static void imx_drm_crtc_reset(struct drm_crtc *crtc)

0 commit comments

Comments
 (0)