diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-14 11:05:56 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-02-07 22:53:04 -0500 |
commit | 03f6509df9218c760ae74f41a609233220d33f19 (patch) | |
tree | 4c16f69a8ae54a6ffafd0c285afe165f63cd086b /drivers/gpu/drm/drm_irq.c | |
parent | 1e6d17a5df848cf8e483b689c6295776e9d6d997 (diff) |
drm: Allow vblank support without DRIVER_HAVE_IRQ
Drivers that register interrupt handlers without the DRM core helpers
don't initialize the .irq_enabled field and drm_dev_to_irq() may fail
when called on them. This shouldn't preclude them from implementing
the vblank IOCTL.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 19c01ca3cc76..71f820565637 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -1218,8 +1218,9 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
1218 | int ret; | 1218 | int ret; |
1219 | unsigned int flags, seq, crtc, high_crtc; | 1219 | unsigned int flags, seq, crtc, high_crtc; |
1220 | 1220 | ||
1221 | if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled)) | 1221 | if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
1222 | return -EINVAL; | 1222 | if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled)) |
1223 | return -EINVAL; | ||
1223 | 1224 | ||
1224 | if (vblwait->request.type & _DRM_VBLANK_SIGNAL) | 1225 | if (vblwait->request.type & _DRM_VBLANK_SIGNAL) |
1225 | return -EINVAL; | 1226 | return -EINVAL; |