Patch "drm/vblank: Fix flip event vblank count" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/vblank: Fix flip event vblank count
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-vblank-fix-flip-event-vblank-count.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
632c6e4edef17c40bba3be67c980d959790d142fMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Tue, 10 Oct 2017 16:33:22 +0300
Subject: drm/vblank: Fix flip event vblank count
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ville Syrjälä <[email protected]>
commit 632c6e4edef17c40bba3be67c980d959790d142f upstream.
On machines where the vblank interrupt fires some time after the start of vblank (or we just manage to race with the vblank interrupt handler) we will currently stuff a stale vblank counter value into the flip event, and thus we'll prematurely complete the flip.
Switch over to drm_crtc_accurate_vblank_count() to make sure we have an up to date counter value, crucially also remember to add the +1 so that the delayed vblank interrupt won't complete the flip prematurely.
--- drivers/gpu/drm/drm_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_vblank.c +1 -1
@@ -869,7 +869,7 @@ void drm_crtc_arm_vblank_event(struct drassert_spin_locked (&dev->event_lock); e->pipe = pipe; - e->event.sequence =drm_vblank_count (dev, pipe); + e->event.sequence =drm_crtc_accurate_vblank_count (crtc) +1 ; e->event.crtc_id = crtc->base.id;list_add_tail (&e->base.link, &dev->vblank_event_list); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/drm-edid-don-t-send-non-zero-yq-in-avi-infoframe-for-hdmi-1.x-sinks.patch queue-4.14/drm-vblank-fix-flip-event-vblank-count.patch queue-4.14/drm-vblank-tune-drm_crtc_accurate_vblank_count-warn-down-to-a-debug.patch