From 5daec5173ed273d038bf7aa435f9aac0efba4bc6 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 22 Aug 2015 11:45:18 +0100 Subject: [PATCH] sna/dri2: Do not attempt to queue an off-screen vblank if the primary is off Even though the kernel reports and error and we skip the queuing, we have information to avoid the roundtrip through the kernel. Signed-off-by: Chris Wilson --- src/sna/sna_dri2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index d5eeb072..3592dd56 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -3336,9 +3336,9 @@ blit: } skip: DBG(("%s: unable to show frame, unblocking client\n", __FUNCTION__)); - if (crtc == NULL && draw->type != DRAWABLE_PIXMAP) + if (crtc == NULL && (sna->flags & SNA_NO_WAIT) == 0) crtc = sna_primary_crtc(sna); - if (crtc && (sna->flags & SNA_NO_WAIT) == 0) { + if (crtc && sna_crtc_is_on(crtc)) { if (info == NULL) info = sna_dri2_add_event(sna, draw, client, crtc); if (info != dri2_chain(draw))