]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Prevent invalid use of vblank_disable_immediate. (v2)
authorMario Kleiner <mario.kleiner.de@gmail.com>
Mon, 4 May 2015 04:29:45 +0000 (06:29 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 4 May 2015 09:11:21 +0000 (11:11 +0200)
commit60191488be51b5b54296acaf229dc517645fec91
tree7743ce306c8c94f3daee06a4768dad0aac052c9b
parent7b6c1d0a86ed2c9eb673f7b2b7335aacdf0c5c33
drm: Prevent invalid use of vblank_disable_immediate. (v2)

For a kms driver to support immediate disable of vblank
irq's reliably without introducing off by one errors or
other mayhem for clients, it must not only support a
hardware vblank counter query, but also high precision
vblank timestamping, so vblank count and timestamp can be
instantaneously reinitialzed to valid values. Additionally
the exposed hardware counter must behave as if it is
incrementing at leading edge of vblank to avoid off by
one errors during reinitialization of the counter while
the display happens to be inside or close to vblank.

Check during drm_vblank_init that a driver which claims to
be capable of vblank_disable_immediate at least supports
high precision timestamping and prevent use of instant
disable if that isn't present as a minimum requirement.

v2: Changed from DRM_ERROR to DRM_INFO and made message
    more clear, as suggested by Michel Dänzer.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c