]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vblank: Fix flip event vblank count
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 10 Oct 2017 13:33:22 +0000 (16:33 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 12 Oct 2017 14:34:28 +0000 (17:34 +0300)
commitf5ed49f3fcae0986f70d7c06c7458548e83f7146
treec763379cbd95e337a67cb450d787d548c3b02cff
parentfcd15475d2b6a1652a06331dc46425838ef002a3
drm/vblank: Fix flip event vblank count

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.

Cc: stable@vger.kernel.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171010133322.24029-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
drivers/gpu/drm/drm_vblank.c