drm: use drm_dev_has_vblank more
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 May 2020 11:11:34 +0000 (13:11 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 29 May 2020 10:58:11 +0000 (12:58 +0200)
commit6015002ece38dac85a373f041e0302781de7474b
tree3d7308ef59d128562e6c3bd6e25f89ecc28393ac
parent269cb04a40231a9a37e43f67cdfcdd7171c6bbc2
drm: use drm_dev_has_vblank more

For historical reasons it's called dev->num_crtcs, which is rather
confusing ever since kms was added. But now we have a nice helper, so
let's use it for better readability!

Only code change is in atomic helpers: vblank support means that
dev->irq_enabled must be set too. Another one of these quirky things
... But since it's implied we can simplify that check.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200527111134.1571781-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_vblank.c