drm: Don't test for IRQ support in VBLANK ioctls
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 25 Jun 2021 08:21:59 +0000 (10:21 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 29 Jun 2021 09:03:39 +0000 (11:03 +0200)
commit1e4cd78ed4932b08bc839392fa6784e03d8f9619
tree3aad29e1fbb4800e484a36bef74a2311aa7eee59
parentb2ffa2c25bba2b2a5cb550e621eead5467944a74
drm: Don't test for IRQ support in VBLANK ioctls

For KMS drivers, replace the IRQ check in VBLANK ioctls with a check for
vblank support. IRQs might be enabled wthout vblanking being supported.

This change also removes the DRM framework's only dependency on IRQ state
for non-legacy drivers. For legacy drivers with userspace modesetting,
the original test remains in drm_wait_vblank_ioctl().

v4:
* avoid preprocessor ifdef in drm_wait_vblank_ioctl()
  (Jani, Thierry)
v3:
* optimize test in drm_wait_vblank_ioctl() for KMS case (Liviu)
* update docs for drm_irq_uninstall()
v2:
* keep the old test for legacy drivers in
  drm_wait_vblank_ioctl() (Daniel)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210625082222.3845-5-tzimmermann@suse.de
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_vblank.c