xf86-video-intel: 7 commits - src/sna/gen6_render.c src/sna/sna_accel.c src/sna/sna_dri.c src/sna/sna_driver.c src/sna/sna_glyphs.c src/sna/sna.h src/sna/sna_render.c src/sna/sna_trapezoids.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Mar 9 01:46:55 PST 2012


 src/sna/gen6_render.c    |    7 +++++--
 src/sna/sna.h            |    1 -
 src/sna/sna_accel.c      |    2 +-
 src/sna/sna_dri.c        |    3 ++-
 src/sna/sna_driver.c     |    4 ++++
 src/sna/sna_glyphs.c     |    2 +-
 src/sna/sna_render.c     |    5 ++++-
 src/sna/sna_trapezoids.c |   19 +++++++++----------
 8 files changed, 26 insertions(+), 17 deletions(-)

New commits:
commit c25a3f7f46010660f441070ab7b9d5d1bc39ed0d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 9 09:43:46 2012 +0000

    sna/dri: Only delivered a delayed flip if the drawable is still on the root
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 92132d6..ccaf40f 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1053,7 +1053,8 @@ static void sna_dri_flip_event(struct sna *sna,
 				      flip->drawable_id,
 				      serverClient,
 				      M_ANY, DixWriteAccess) == Success) {
-			if (!sna_dri_flip_continue(sna, drawable, flip)) {
+			if (can_flip(sna, drawable, flip->front, flip->back) &&
+			    !sna_dri_flip_continue(sna, drawable, flip)) {
 				DRI2SwapComplete(flip->client, drawable,
 						 0, 0, 0,
 						 DRI2_BLIT_COMPLETE,
commit 93846b468e778440549ef0cae171c7fe9678ed9a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 9 09:43:24 2012 +0000

    sna/traps: Remove some dead code
    
    This function was never used in this implementation, remove it.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 727b4d2..e28c669 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -483,15 +483,6 @@ cell_list_rewind(struct cell_list *cells)
 	cells->cursor = &cells->head;
 }
 
-/* Rewind the cell list if its cursor has been advanced past x. */
-inline static void
-cell_list_maybe_rewind(struct cell_list *cells, int x)
-{
-	struct cell *tail = cells->cursor;
-	if (tail->x > x)
-		cell_list_rewind (cells);
-}
-
 static void
 cell_list_init(struct cell_list *cells)
 {
commit 90c995736555ce14b08b69a42832d9774ba58304
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 9 00:37:32 2012 +0000

    sna: Emit a INFO when compiled with debugging enabled
    
    It is useful to know and to receive confirmation that you have
    successfully compiled and executed the driver with debugging enabled.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index ddacfd1..7cf3ef1 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -1074,6 +1074,10 @@ void sna_init_scrn(ScrnInfoPtr scrn, int entity_num)
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
 		   "SNA compiled: %s\n", BUILDER_DESCRIPTION);
 #endif
+#if HAVE_EXTRA_DEBUG
+	xf86DrvMsg(scrn->scrnIndex, X_INFO,
+		   "SNA compiled with debugging enabled\n");
+#endif
 
 	DBG(("%s\n", __FUNCTION__));
 	DBG(("pixman version: %s\n", pixman_version_string()));
commit 2e194f33db0437ea2f25c22efdad9552aefcab2f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Mar 8 18:07:22 2012 +0000

    sna/traps: Fix the initialisation of the error term for vertical mono edges
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 8e735ef..727b4d2 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -776,7 +776,7 @@ polygon_add_line(struct polygon *polygon,
 	if (dx == 0) {
 		e->vertical = true;
 		e->x.quo = p1->x;
-		e->x.rem = 0;
+		e->x.rem = -dy;
 		e->dxdy.quo = 0;
 		e->dxdy.rem = 0;
 	} else {
commit 635c604b787625f93763001951f8bdf66482c682
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Mar 8 18:06:51 2012 +0000

    sna/traps: Unroll insertion sort
    
    As the compiler cannot know the loop is bounded by a sentinel, manually
    unroll it.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 33ea3bb..8e735ef 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -556,6 +556,14 @@ cell_list_find(struct cell_list *cells, int x)
 			break;
 
 		tail = tail->next;
+		if (tail->next->x > x)
+			break;
+
+		tail = tail->next;
+		if (tail->next->x > x)
+			break;
+
+		tail = tail->next;
 	} while (1);
 
 	if (tail->x != x)
commit a087430ad99c06e79249d2cdd019cb8bf7f955d3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Mar 8 17:13:39 2012 +0000

    sna/gen6: Replace the memset with explict initialisation
    
    The profiles told me to kill it...
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 764b629..8a8cdd8 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -3705,8 +3705,6 @@ gen6_render_fill_boxes(struct sna *sna,
 	     __FUNCTION__, pixel, n,
 	     box[0].x1, box[0].y1, box[0].x2, box[0].y2));
 
-	memset(&tmp, 0, sizeof(tmp));
-
 	tmp.op = op;
 
 	tmp.dst.pixmap = dst;
@@ -3714,16 +3712,21 @@ gen6_render_fill_boxes(struct sna *sna,
 	tmp.dst.height = dst->drawable.height;
 	tmp.dst.format = format;
 	tmp.dst.bo = dst_bo;
+	tmp.dst.x = tmp.dst.y = 0;
 
 	tmp.src.bo = sna_render_get_solid(sna, pixel);
 	tmp.src.filter = SAMPLER_FILTER_NEAREST;
 	tmp.src.repeat = SAMPLER_EXTEND_REPEAT;
 
 	tmp.mask.bo = NULL;
+	tmp.mask.filter = SAMPLER_FILTER_NEAREST;
+	tmp.mask.repeat = SAMPLER_EXTEND_NONE;
 
 	tmp.is_affine = TRUE;
 	tmp.floats_per_vertex = 3;
 	tmp.floats_per_rect = 9;
+	tmp.has_component_alpha = FALSE;
+	tmp.need_magic_ca_pass = FALSE;
 
 	tmp.u.gen6.wm_kernel = GEN6_WM_KERNEL_NOMASK;
 	tmp.u.gen6.nr_surfaces = 2;
commit 61226cd41faf320f79ee4bd72dc77163079da853
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Mar 8 13:41:58 2012 +0000

    sna: Fix handling of large glyphs following large and shared buffer work
    
    Part of the large buffer handling was to move the decision making about
    whether to create GPU bo for a pixmap to creation time. The single
    instance where we change our minds later is involving large glyphs which
    we choose not to cache.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna.h b/src/sna/sna.h
index 8340345..441b24e 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -684,7 +684,6 @@ memcpy_xor(const void *src, void *dst, int bpp,
 
 #define SNA_CREATE_FB 0x10
 #define SNA_CREATE_SCRATCH 0x11
-#define SNA_CREATE_GLYPH 0x12
 
 inline static bool is_power_of_two(unsigned x)
 {
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 08ee537..5aad88b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -764,7 +764,7 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen,
 	}
 
 	if (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE)
-		goto fallback;
+		flags &= ~KGEM_CAN_CREATE_GPU;
 
 force_create:
 	pad = PixmapBytePad(width, depth);
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 2733a1a..1c536c8 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -315,7 +315,7 @@ glyph_cache(ScreenPtr screen,
 		PixmapPtr pixmap = (PixmapPtr)glyph_picture->pDrawable;
 		assert(glyph_picture->pDrawable->type == DRAWABLE_PIXMAP);
 		if (pixmap->drawable.depth >= 8) {
-			pixmap->usage_hint = SNA_CREATE_GLYPH;
+			pixmap->usage_hint = 0;
 			sna_pixmap_force_to_gpu(pixmap, MOVE_READ);
 		}
 		return FALSE;
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 421c7ff..d1e3500 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -378,8 +378,11 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
 		bool upload;
 
 		priv = sna_pixmap(pixmap);
-		if (!priv)
+		if (!priv) {
+			DBG(("%s: not migrating unattached pixmap\n",
+			     __FUNCTION__));
 			return false;
+		}
 
 		upload = true;
 		if ((priv->create & KGEM_CAN_CREATE_GPU) == 0 ||


More information about the xorg-commit mailing list