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

Chris Wilson ickle at kemper.freedesktop.org
Thu May 30 07:15:48 PDT 2013


 src/sna/sna_accel.c   |    3 +--
 src/sna/sna_display.c |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 3a9975729c665cd09a33e33eab608350aaee8160
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu May 30 14:15:23 2013 +0100

    sna: Restore GPU promotion for large fills
    
    Fix another regression from
    commit ef9dc6fae585d5616446eedc1e6e91173f4064c1 [2.21.7]
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Mon May 20 11:08:51 2013 +0100
    
        sna: Undo a few more overwritten operations upon a bo
    
    The REPLACES predicate was meant to complement the existing tests, not
    be compulsory.
    
    Found whilst investigating why performance seemed to have dropped off in
    Phoronix's benchmarks.
    
    Reported-by: Michael Larabel <michael at phoronix.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 3e3e75c..7cdc8fc 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -12223,8 +12223,7 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect)
 			hint |= REPLACES;
 		if (priv->cpu_damage == NULL) {
 			if (priv->gpu_bo &&
-			    hint & REPLACES &&
-			    box_inplace(pixmap, &region.extents)) {
+			    (hint & REPLACES || box_inplace(pixmap, &region.extents))) {
 				DBG(("%s: promoting to full GPU\n",
 				     __FUNCTION__));
 				assert(priv->gpu_bo->proxy == NULL);
commit 08b33ba8f12bb4bc425ca1bc40e2660e446e2c65
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu May 30 14:57:56 2013 +0100

    sna: Assert that an existing scanout is the desired size
    
    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 6cade44..3231ca0 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -145,6 +145,25 @@ uint32_t sna_crtc_to_plane(xf86CrtcPtr crtc)
 	return to_sna_crtc(crtc)->plane;
 }
 
+#ifndef NDEBUG
+static void gem_close(int fd, uint32_t handle);
+static void assert_scanout(struct kgem *kgem, struct kgem_bo *bo,
+			   int width, int height)
+{
+	struct drm_mode_fb_cmd info;
+
+	assert(bo->scanout);
+
+	VG_CLEAR(info);
+	info.fb_id = bo->delta;
+
+	assert(drmIoctl(kgem->fd, DRM_IOCTL_MODE_GETFB, &info) == 0);
+	gem_close(kgem->fd, info.handle);
+
+	assert(width == info.width && height == info.height);
+}
+#endif
+
 static unsigned get_fb(struct sna *sna, struct kgem_bo *bo,
 		       int width, int height)
 {
@@ -157,6 +176,7 @@ static unsigned get_fb(struct sna *sna, struct kgem_bo *bo,
 	if (bo->delta) {
 		DBG(("%s: reusing fb=%d for handle=%d\n",
 		     __FUNCTION__, bo->delta, bo->handle));
+		assert_scanout(&sna->kgem, bo, width, height);
 		return bo->delta;
 	}
 


More information about the xorg-commit mailing list