]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Peek at the current counter/timestamp for vblank queries
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Mar 2017 20:20:30 +0000 (20:20 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 29 Mar 2017 11:02:22 +0000 (14:02 +0300)
commitbe0d3855fe88f9ad05ee945327f812fd59b487dc
tree37dcc14d876462e12ebc7e5f5d0d8576ef888d2a
parentb757e07aa9754df402fa4c14168afefe2071d7fc
drm: Peek at the current counter/timestamp for vblank queries

Bypass all the spinlocks and return the last timestamp and counter from
the last vblank if the driver delcares that it is accurate (and stable
across on/off), and the vblank is currently enabled.

This is dependent upon the both the hardware and driver to provide the
proper barriers to facilitate reading our bookkeeping outside of the
vblank interrupt and outside of the explicit vblank locks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Dave Airlie <airlied@redhat.com>,
Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317202030.24410-4-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/drm_irq.c