xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Jan 31 13:26:13 PST 2014


 src/sna/sna_accel.c  |   14 ++++----------
 src/sna/sna_driver.c |    7 +------
 2 files changed, 5 insertions(+), 16 deletions(-)

New commits:
commit 1f9a6156e9240a1efa8785ab5bca0a3b1757d08e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jan 31 20:02:44 2014 +0000

    sna: remove short-circuit for move-to-CPU when damage covers region
    
    The short-circuit path missed translating the damage from drawable space
    into the pixmap (for Composite setups) which may have resulted in
    corruption. The path was also failing to consider the impact of reusing
    an active CPU bo when it could be discarding the unwanted damage and
    reallocating.
    
    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 c903385..613b9c7 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2424,17 +2424,11 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
 		if (flags & MOVE_WRITE)
 			sna_pixmap_free_gpu(sna, priv);
 
-		goto contains_damage;
-	}
-
-	if (priv->cpu &&
-	    priv->cpu_damage &&
-	    sna_damage_contains_box__no_reduce(priv->cpu_damage,
-					       &region->extents)) {
-		DBG(("%s: pixmap=%ld CPU damage contains region\n",
-		     __FUNCTION__, pixmap->drawable.serialNumber));
+		if ((flags & MOVE_READ) == 0 &&
+		    priv->cpu_bo && !priv->cpu_bo->flush &&
+		    __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo))
+			sna_pixmap_free_cpu(sna, priv, false);
 
-contains_damage:
 		sna_pixmap_unmap(pixmap, priv);
 		assert(priv->mapped == MAPPED_NONE);
 		if (pixmap->devPrivate.ptr == NULL &&
commit 539b749416b275d84e05e2a5b62d946903aa3d29
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jan 31 18:02:51 2014 +0000

    sna: Use 24bpp rendering by default for gen2 again
    
    Too many users where unhappy that their software was broken. Too bad the
    same software is also broken at high bit depths as well.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=73877
    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 fd0d3bd..4ecef3c 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -447,7 +447,6 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
 	char buf[1024];
 	rgb defaultWeight = { 0, 0, 0 };
 	EntityInfoPtr pEnt;
-	int preferred_depth;
 	Gamma zeros = { 0.0, 0.0, 0.0 };
 	int fd;
 
@@ -513,11 +512,7 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
 	xf86DrvMsg(scrn->scrnIndex, X_PROBED, "CPU: %s\n",
 		   sna_cpu_features_to_string(sna->cpu_features, buf));
 
-	preferred_depth = sna->info->gen < 030 ? 15 : 24;
-	if (!fb_supports_depth(fd, preferred_depth))
-		preferred_depth = 24;
-
-	if (!xf86SetDepthBpp(scrn, preferred_depth, 0, 0,
+	if (!xf86SetDepthBpp(scrn, 24, 0, 0,
 			     Support32bppFb |
 			     SupportConvert24to32 | PreferConvert24to32))
 		goto cleanup;


More information about the xorg-commit mailing list