]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Don't update vblank timestamp when the counter didn't change
authorMario Kleiner <mario.kleiner.de@gmail.com>
Sat, 13 Sep 2014 16:25:54 +0000 (18:25 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Sep 2014 10:09:22 +0000 (12:09 +0200)
commit965e78adaa4900a8f7cb70e627fb8dd4ca0b691a
tree88971e62a2687641d9036acf8dfc5f8633723687
parent3aad327eaab832c7d631ecf3f6e06ddc05a44cb9
drm: Don't update vblank timestamp when the counter didn't change

If we already have a timestamp for the current vblank counter, don't
update it with a new timestmap. Small errors can creep in between two
timestamp queries for the same vblank count, which could be confusing to
userspace when it queries the timestamp for the same vblank sequence
number twice.

This problem gets exposed when the vblank disable timer is not used
(or is set to expire quickly) and thus we can get multiple vblank
disable<->enable transition during the same frame which would all
attempt to update the timestamp with the latest estimate.

Testcase: igt/kms_flip/flip-vs-expired-vblank
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
v2:Mario: Trivial rebase on top of current drm-next (13-Sep-2014)
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c