drm: Only update final vblank count when precise ts is available
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 <1e0b3b0517a6c13598ed894fc921c5c62f243c44@gmail.com>
Cc: Mario Kleiner <1e0b3b0517a6c13598ed894fc921c5c62f243c44@gmail.com>
Cc: Matt Roper <f1605a76cb9f6387d99228a0a9260318379b62de@intel.com>
Cc: Ville Syrjälä <cd6e8d405ca90be3a03d5427c5b24fbd2d68dcc4@linux.intel.com>
Reviewed-by: Mario Kleiner <1e0b3b0517a6c13598ed894fc921c5c62f243c44@gmail.com>
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs