drm: Only update final vblank count when precise ts is available
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 10 Sep 2014 15:36:09 +0000 (17:36 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 11 Sep 2014 11:32:05 +0000 (13:32 +0200)
commit855d30b402b91f09c90f65c34ec91debaae8cf3a
tree49dc14e33919cf232cc37b49666cc21d317885db
parentab8905f1c6a74d695c6096791ec4b349bc985b8a
drm: Only update final vblank count when precise ts is available

Drivers without a hardware vblank counter simply can't account for the
vblanks that happened while the vblank interrupt was off. To check
this grab a vblank timestamp and if the result is dubious follow the
normal save-and-disable logic.

Drivers should prevent this by setting vblank_disable_allowed = false,
but since running vblank interrupts constantly is not good for power
consumption most drivers lie. Testing for precise vblank timestamps is
the next best thing we can check for.

Suggested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_irq.c
This page took 0.030422 seconds and 5 git commands to generate.