summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_atomic_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2020-05-27 14:11:34 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-05-29 13:58:11 +0300
commit6015002ece38dac85a373f041e0302781de7474b (patch)
tree3d7308ef59d128562e6c3bd6e25f89ecc28393ac /drivers/gpu/drm/drm_atomic_helper.c
parent269cb04a40231a9a37e43f67cdfcdd7171c6bbc2 (diff)
downloadlinux-6015002ece38dac85a373f041e0302781de7474b.tar.xz
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
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 85d163f16801..a1898c58ae3c 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1097,7 +1097,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
else if (funcs->dpms)
funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
- if (!(dev->irq_enabled && dev->num_crtcs))
+ if (!drm_dev_has_vblank(dev))
continue;
ret = drm_crtc_vblank_get(crtc);