diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c index e147f3eda..acc299f3b 100644 --- a/hw/xfree86/drivers/modesetting/present.c +++ b/hw/xfree86/drivers/modesetting/present.c @@ -329,12 +329,13 @@ ms_present_check_flip(RRCrtcPtr crtc, no_flip: /* Export some info about TearFree if Present can't flip anyway */ - if (reason && ms->drmmode.tearfree_enable) { + if (reason) { xf86CrtcPtr xf86_crtc = crtc->devPrivate; drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private; drmmode_tearfree_ptr trf = &drmmode_crtc->tearfree; - if (trf->buf[0].px) { + /* Check if TearFree is active on this CRTC and tell Present about it */ + if (trf->buf[0].px && scrn->vtSema && xf86_crtc_on(xf86_crtc)) { if (trf->flip_seq) /* The driver has a TearFree flip pending */ *reason = PRESENT_FLIP_REASON_DRIVER_TEARFREE_FLIPPING;