diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index 57419ca..89da0b9 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -541,6 +541,16 @@ int drm_wait_vblank(struct drm_device *dev, void *data, return ret; seq = drm_vblank_count(dev, crtc); + if (dev->vblank_inmodeset[crtc]) { + if (flags & _DRM_VBLANK_SIGNAL) + ret = -EBUSY; + else { + vblwait->request.type &= ~_DRM_VBLANK_RELATIVE; + vblwait->reply.sequence = seq; + } + goto done; + } + switch (vblwait->request.type & _DRM_VBLANK_TYPES_MASK) { case _DRM_VBLANK_RELATIVE: vblwait->request.sequence += seq;