xf86-video-intel: 6 commits - src/legacy/i810 src/sna/gen2_render.c src/sna/sna_accel.c src/sna/sna_blt.c src/sna/sna_display.c src/sna/sna_glyphs.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Aug 16 12:48:51 PDT 2012


 src/legacy/i810/i810_video.c |    4 ++--
 src/sna/gen2_render.c        |    1 +
 src/sna/sna_accel.c          |    2 +-
 src/sna/sna_blt.c            |    3 ---
 src/sna/sna_display.c        |    3 +++
 src/sna/sna_glyphs.c         |    6 ++++--
 6 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 5675c36e0dca92b8d24235d82cd0e87f82fdc7b0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:44:32 2012 +0100

    sna: Check for failure to pin the front buffer
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 431b5de..b35a7cc 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -964,6 +964,9 @@ static struct kgem_bo *sna_crtc_attach(xf86CrtcPtr crtc)
 		DBG(("%s: attaching to framebuffer\n", __FUNCTION__));
 		sna_crtc_disable_shadow(sna, sna_crtc);
 		bo = sna_pixmap_pin(sna->front);
+		if (bo == NULL)
+			return NULL;
+
 		if (!get_fb(sna, bo, scrn->virtualX, scrn->virtualY))
 			return NULL;
 
commit c9db2c74ab3b482489bec63b11df80bb35e21aca
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:42:50 2012 +0100

    sna/gen2: Add break rather than fallthrough
    
    The fall-through in this instance is irrelevant, and the static
    analysers complain for not commenting on the fall-through. Silence the
    analyser by removing the fall-through.
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 153c7ae..ecccbbb 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1774,6 +1774,7 @@ gen2_render_composite(struct sna *sna,
 		goto cleanup_dst;
 	case 0:
 		gen2_composite_solid_init(sna, &tmp->src, 0);
+		break;
 	case 1:
 		if (mask == NULL && tmp->src.bo &&
 		    sna_blt_composite__convert(sna,
commit e0abbc3ccafb51d6b2114e1c7d6dc2eda3a8c1f4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:40:17 2012 +0100

    i810: Query PortPriv for the surface properties
    
    Avoid the NULL deferences.
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/legacy/i810/i810_video.c b/src/legacy/i810/i810_video.c
index 4ebad66..bbaa3ce 100644
--- a/src/legacy/i810/i810_video.c
+++ b/src/legacy/i810/i810_video.c
@@ -1283,7 +1283,7 @@ I810GetSurfaceAttribute(
     Atom attribute,
     INT32 *value
 ){
-    return I810GetPortAttribute(pScrn, attribute, value, NULL);
+    return I810GetPortAttribute(pScrn, attribute, value, GET_PORT_PRIVATE(pScrn));
 }
 
 static int
@@ -1292,7 +1292,7 @@ I810SetSurfaceAttribute(
     Atom attribute,
     INT32 value
 ){
-    return I810SetPortAttribute(pScrn, attribute, value, NULL);
+    return I810SetPortAttribute(pScrn, attribute, value, GET_PORT_PRIVATE(pScrn));
 }
 
 
commit c09518f98d5c533860b084506d9ee2c819cca52f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:32:53 2012 +0100

    sna: Fix assignment inside assertion (should be an equality check)
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    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 661dde0..b403597 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -13899,7 +13899,7 @@ bool sna_accel_init(ScreenPtr screen, struct sna *sna)
 	screen->UninstallColormap = miUninstallColormap;
 	screen->ListInstalledColormaps = miListInstalledColormaps;
 	screen->ResolveColor = miResolveColor;
-	assert(screen->StoreColors = PictureStoreColors);
+	assert(screen->StoreColors == PictureStoreColors);
 	screen->StoreColors = sna_store_colors;
 	screen->BitmapToRegion = fbBitmapToRegion;
 
commit 7d3e4328d4f4421178377933ca98fb80daa85c76
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:32:11 2012 +0100

    sna/glyphs: Fix potential leak of glyph extents (for many lists of many formats)
    
    Reported-by: Zdenek Kabelac <zkabelac at redhat.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index db9af14..8cbe39c 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1173,8 +1173,10 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs)
 		extents.x2 = 0;
 		extents.y2 = 0;
 
-		if (format->format != list->format->format)
-			return NULL;
+		if (format->format != list->format->format) {
+			format = NULL;
+			goto out;
+		}
 
 		x += list->xOff;
 		y += list->yOff;
commit 9b00c82df78cb8820c0e32fbecc7c933eed81d52
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 20:30:52 2012 +0100

    sna: Remember alpha-fixup for BLT upload
    
    Still dubious whether this is truly beneficial...
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 77fca3d..2d7a4aa 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1439,9 +1439,6 @@ prepare_blt_put(struct sna *sna,
 	assert(src->devKind);
 	assert(src->devPrivate.ptr);
 
-	if (alpha_fixup)
-		return false; /* XXX */
-
 	if (alpha_fixup) {
 		op->u.blt.pixel = alpha_fixup;
 		op->blt   = blt_put_composite_with_alpha;


More information about the xorg-commit mailing list