mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 09:18:04 +02:00
Remove DRIVER_IRQ_VBL(2).
If the driver doesn't support vertical blank interrupts, it won't call drm_vblank_init(), and dev->num_crtcs will be 0. Also fix an off-by-one test against dev->num_crtcs.
This commit is contained in:
parent
fbee089aca
commit
0f5334be2b
3 changed files with 5 additions and 9 deletions
|
|
@ -100,10 +100,8 @@
|
|||
#define DRIVER_HAVE_DMA 0x20
|
||||
#define DRIVER_HAVE_IRQ 0x40
|
||||
#define DRIVER_IRQ_SHARED 0x80
|
||||
#define DRIVER_IRQ_VBL 0x100
|
||||
#define DRIVER_DMA_QUEUE 0x200
|
||||
#define DRIVER_FB_DMA 0x400
|
||||
#define DRIVER_IRQ_VBL2 0x800
|
||||
#define DRIVER_DMA_QUEUE 0x100
|
||||
#define DRIVER_FB_DMA 0x200
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ int drm_modeset_ctl(DRM_IOCTL_ARGS)
|
|||
}
|
||||
|
||||
crtc = modeset.arg;
|
||||
if (crtc > dev->num_crtcs) {
|
||||
if (crtc >= dev->num_crtcs) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -474,8 +474,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
|
|||
flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
|
||||
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
|
||||
|
||||
if (!drm_core_check_feature(dev, (flags & _DRM_VBLANK_SECONDARY) ?
|
||||
DRIVER_IRQ_VBL2 : DRIVER_IRQ_VBL))
|
||||
if (crtc >= dev->num_crtcs)
|
||||
return -EINVAL;
|
||||
|
||||
drm_update_vblank_count(dev, crtc);
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ static struct drm_driver driver = {
|
|||
*/
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR | */
|
||||
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL |
|
||||
DRIVER_IRQ_VBL2,
|
||||
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
|
||||
.load = i915_driver_load,
|
||||
.firstopen = i915_driver_firstopen,
|
||||
.lastclose = i915_driver_lastclose,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue