xf86-video-intel: 2 commits - src/sna/sna_cpu.c src/sna/sna_glyphs.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jun 3 07:37:03 PDT 2013


 src/sna/sna_cpu.c    |    6 ++++--
 src/sna/sna_glyphs.c |   10 ++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 6dacaddb6a28670a52cead4b62c056a8acde8f3a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 3 15:34:37 2013 +0100

    sna: Always populate the CPU features string
    
    So that we don't print random contents of the stack on ancient 32-bit
    CPUs with no extended instruction sets.
    
    References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1186800
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index 489bf6c..c96b21f 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -108,7 +108,9 @@ char *sna_cpu_features_to_string(unsigned features, char *line)
 	char *ret = line;
 
 #ifdef __x86_64__
-	line += sprintf (line, ", x86-64");
+	line += sprintf (line, "x86-64");
+#else
+	line += sprintf (line, "x86");
 #endif
 
 	if (features & SSE2)
@@ -126,5 +128,5 @@ char *sna_cpu_features_to_string(unsigned features, char *line)
 	if (features & AVX2)
 		line += sprintf (line, ", avx2");
 
-	return ret + 2;
+	return ret;
 }
commit 8a88c01c3737a3570628600b1ab51938f82e226d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 3 14:14:09 2013 +0100

    sna: Make copying the glyph size more compact
    
    The assembly was ugly with an unwarranted AGU stall.
    
    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 3e2d79b..62415c8 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -85,6 +85,7 @@
 #define N_STACK_GLYPHS 512
 
 #define glyph_valid(g) *((uint32_t *)&(g)->info.width)
+#define glyph_copy_size(r, g) *(uint32_t *)&(r)->width = *(uint32_t *)&g->info.width
 
 #if HAS_DEBUG_FULL
 static void _assert_pixmap_contains_box(PixmapPtr pixmap, BoxPtr box, const char *function)
@@ -632,10 +633,8 @@ glyphs_to_dst(struct sna *sna,
 				r.dst.y = y - glyph->info.y;
 				r.src.x = r.dst.x + src_x;
 				r.src.y = r.dst.y + src_y;
-				r.mask.x = priv.coordinate.x;
-				r.mask.y = priv.coordinate.y;
-				r.width  = glyph->info.width;
-				r.height = glyph->info.height;
+				r.mask = priv.coordinate;
+				glyph_copy_size(&r, glyph);
 
 				DBG(("%s: glyph=(%d, %d)x(%d, %d), unclipped\n",
 				     __FUNCTION__,
@@ -1164,8 +1163,7 @@ next_image:
 				r.mask = r.src;
 				r.dst.x = x - glyph->info.x;
 				r.dst.y = y - glyph->info.y;
-				r.width  = glyph->info.width;
-				r.height = glyph->info.height;
+				glyph_copy_size(&r, glyph);
 				tmp.blt(sna, &tmp, &r);
 
 next_glyph:


More information about the xorg-commit mailing list