xf86-video-intel: 3 commits - src/sna/sna_dri2.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Aug 22 04:08:34 PDT 2015


 src/sna/sna_dri2.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5daec5173ed273d038bf7aa435f9aac0efba4bc6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 22 11:45:18 2015 +0100

    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 <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index d5eeb07..3592dd5 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))
commit 275d8b039a5e2e9937c4015355dddd57a301c028
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 22 11:43:11 2015 +0100

    sna/dri2: Report an error if WaitMSC/GetMSC are called without any CRTCs
    
    On a headless or hosted system, we do not have any CRTC on which to
    report or queue the vblank. Reporting a BadDrawable is evil (as clients
    never expect the error) but is better than crashing the Xserver.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index accbef6..d5eeb07 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -3389,6 +3389,9 @@ sna_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
 	/* Drawable not displayed, make up a *monotonic* value */
 	if (crtc == NULL)
 		crtc = sna_primary_crtc(sna);
+	if (crtc == NULL)
+		return FALSE;
+
 	if (sna_query_vblank(sna, crtc, &vbl) == 0)
 		sna_crtc_record_vblank(crtc, &vbl);
 
@@ -3427,7 +3430,7 @@ sna_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc
 	if (crtc == NULL)
 		crtc = sna_primary_crtc(sna);
 	if (crtc == NULL)
-		goto out_complete;
+		return FALSE;
 
 	current_msc = get_current_msc(sna, draw, crtc);
 
@@ -3473,8 +3476,6 @@ sna_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc
 out_free_info:
 	sna_dri2_event_free(info);
 out_complete:
-	if (crtc == NULL)
-		crtc = sna_primary_crtc(sna);
 	swap = sna_crtc_last_swap(crtc);
 	DRI2WaitMSCComplete(client, draw,
 			    draw_current_msc(draw, crtc, swap->msc),
commit c26cfbcc0c46e05de887ddb750240f16f34029a8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 22 10:28:32 2015 +0100

    sna/dri2: Fix back buffer reuse for simple blits
    
    Along the blit swap path, we expect the buffer to not be scanout
    compatible and not have the same pitch as the front buffer. The reuse
    logic failed to take this into account!
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e393f09..accbef6 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -262,8 +262,6 @@ sna_dri2_get_back(struct sna *sna,
 
 	reuse = size == get_private(back)->size;
 	if (reuse)
-		reuse = front_pitch(draw) == back->pitch;
-	if (reuse)
 		reuse = get_private(back)->bo->scanout == use_scanout(sna, draw, priv);
 	DBG(("%s: reuse backbuffer? %d\n", __FUNCTION__, reuse));
 	if (reuse) {


More information about the xorg-commit mailing list