xf86-video-intel: src/sna/sna_accel.c src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Oct 5 00:15:07 PDT 2014


 src/sna/sna_accel.c   |   12 ++++++++----
 src/sna/sna_display.c |    8 ++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit e50e1bb3fd2fd20cce580841b20a3e47c7111ee9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Oct 5 08:12:52 2014 +0100

    sna: Only use copy redisplay fast path if we have a source GPU bo
    
    Odd as it may seem, but we can end up attempting to copy from a source
    CRTC pixmap that is not on the GPU. Here we need to use the heavyweight
    path to handle its composition normally.
    
    Reported-by: Christoph Haag <haagch at frickel.club>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4462207..02ff0c7 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -938,6 +938,8 @@ create_pixmap_hdr(struct sna *sna, ScreenPtr screen,
 		pixmap->refcnt = 1;
 	}
 
+	DBG(("%s: pixmap=%ld, width=%d, height=%d, usage=%d\n", __FUNCTION__,
+	     pixmap->drawable.serialNumber, width, height, usage));
 	pixmap->drawable.width = width;
 	pixmap->drawable.height = height;
 	pixmap->usage_hint = usage;
@@ -1105,13 +1107,14 @@ sna_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave, void **fd_handle)
 		struct kgem_bo *bo;
 		BoxRec box;
 
-		DBG(("%s: removing tiling %d, and aligning pitch  for %dx%d pixmap=%ld\n",
-		     __FUNCTION__, priv->gpu_bo->tiling,
+		DBG(("%s: removing tiling %d, and aligning pitch %d for %dx%d pixmap=%ld\n",
+		     __FUNCTION__, priv->gpu_bo->tiling, priv->gpu_bo->pitch,
 		     pixmap->drawable.width, pixmap->drawable.height,
 		     pixmap->drawable.serialNumber));
 
 		if (priv->pinned) {
-			DBG(("%s: can't convert pinned bo\n", __FUNCTION__));
+			DBG(("%s: can't convert pinned %x bo\n", __FUNCTION__,
+			     priv->pinned));
 			return FALSE;
 		}
 
@@ -1222,7 +1225,8 @@ sna_create_pixmap_shared(struct sna *sna, ScreenPtr screen,
 	PixmapPtr pixmap;
 	struct sna_pixmap *priv;
 
-	DBG(("%s: depth=%d\n", __FUNCTION__, depth));
+	DBG(("%s: width=%d, height=%d, depth=%d\n",
+	     __FUNCTION__, width, height, depth));
 
 	/* Create a stub to be attached later */
 	pixmap = create_pixmap_hdr(sna, screen,
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index b1144bb..72c6ef5 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6559,10 +6559,17 @@ inline static DrawablePtr crtc_source(xf86CrtcPtr crtc, int16_t *sx, int16_t *sy
 {
 	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
 	if (sna_crtc->slave_pixmap) {
+		DBG(("%s: using slave pixmap=%ld, offset (%d, %d)\n",
+		     __FUNCTION__,
+		     sna_crtc->slave_pixmap->drawable.serialNumber,
+		 -crtc->x, -crtc->y));
 		*sx = -crtc->x;
 		*sy = -crtc->y;
 		return &sna_crtc->slave_pixmap->drawable;
 	} else {
+		DBG(("%s: using Screen pixmap=%ld)\n",
+		     __FUNCTION__,
+		     to_sna(crtc->scrn)->front->drawable.serialNumber));
 		*sx = *sy = 0;
 		return &to_sna(crtc->scrn)->front->drawable;
 	}
@@ -6793,6 +6800,7 @@ sna_crtc_redisplay(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo *bo)
 	}
 
 	if (crtc->filter == NULL &&
+	    priv->gpu_bo &&
 	    sna_transform_is_integer_translation(&crtc->crtc_to_framebuffer,
 						 &tx, &ty)) {
 		DrawableRec tmp;


More information about the xorg-commit mailing list