xf86-video-intel: 5 commits - src/sna/gen6_render.c src/sna/gen7_render.c tools/virtual.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Sep 6 01:57:59 PDT 2013


 src/sna/gen6_render.c |    2 +-
 src/sna/gen7_render.c |    2 +-
 tools/virtual.c       |   20 ++++++++++++--------
 3 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit ccd605c492ef3fd657bc40ede3f318e7dddbd7a1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 6 00:33:29 2013 +0100

    intel-virtual-output: Unregister our singleton on a clean shutdown
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 9b6b730..b45f6fd 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -2386,6 +2386,8 @@ static void context_cleanup(struct context *ctx)
 
 	XRRFreeScreenResources(res);
 
+	if (ctx->singleton)
+		XDeleteProperty(dpy, ctx->display->root, ctx->singleton);
 	XCloseDisplay(dpy);
 }
 
commit 3c5caaf0a98c88f6d39be9e78f8427f05975cb0e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 6 00:30:53 2013 +0100

    intel-virtual-output: Only wake up for a change in a visible cursor
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 5decd89..9b6b730 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1071,9 +1071,10 @@ static void display_load_visible_cursor(struct display *display, XFixesCursorIma
 
 	DBG(("%s marking cursor changed\n", DisplayString(display->dpy)));
 	display->cursor_moved++;
-	display->cursor_visible += display->cursor != display->invisible_cursor;
-
-	context_enable_timer(display->ctx);
+	if (display->cursor != display->invisible_cursor) {
+		display->cursor_visible++;
+		context_enable_timer(display->ctx);
+	}
 }
 
 static void display_cursor_move(struct display *display, int x, int y, int visible)
@@ -1107,7 +1108,6 @@ static void display_flush_cursor(struct display *display)
 	}
 
 	XWarpPointer(display->dpy, None, display->root, 0, 0, 0, 0, x, y);
-	display_mark_flush(display);
 
 	cursor = None;
 	if (display->cursor_visible)
@@ -1119,6 +1119,8 @@ static void display_flush_cursor(struct display *display)
 		display->cursor = cursor;
 	}
 
+	display_mark_flush(display);
+
 	display->cursor_moved = 0;
 	display->cursor_visible = 0;
 }
commit 91b1f77da59ab7951e5d9aa09cbc0d2335d4c62a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 6 00:23:37 2013 +0100

    intel-virtual-output: Make the flush for recreating Damage explicit
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 2262e55..5decd89 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1760,7 +1760,6 @@ static int display_init_damage(struct display *display)
 	if (display->damage == 0)
 		return EACCES;
 
-	display->flush = 1;
 	return 0;
 }
 
@@ -1772,7 +1771,8 @@ static void display_reset_damage(struct display *display)
 	if (damage) {
 		XDamageDestroy(display->dpy, display->damage);
 		display->damage = damage;
-		display->flush = 1;
+		XFlush(display->dpy);
+		display->flush = 0;
 	}
 }
 
commit 3979d11677bb4eb54099b9a8d0a28d4807828223
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 5 23:28:16 2013 +0100

    intel-virtual-output: Just request Damage BBox
    
    As we ourselves only track the BBox of damage on the virtual outputs, we
    can ask X to amalgamate the damage events as well.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 4da2f3a..2262e55 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1756,7 +1756,7 @@ static int display_init_damage(struct display *display)
 		return EINVAL;
 	}
 
-	display->damage = XDamageCreate(display->dpy, display->root, XDamageReportRawRectangles);
+	display->damage = XDamageCreate(display->dpy, display->root, XDamageReportBoundingBox);
 	if (display->damage == 0)
 		return EACCES;
 
@@ -1768,7 +1768,7 @@ static void display_reset_damage(struct display *display)
 {
 	Damage damage;
 
-	damage = XDamageCreate(display->dpy, display->root, XDamageReportRawRectangles);
+	damage = XDamageCreate(display->dpy, display->root, XDamageReportBoundingBox);
 	if (damage) {
 		XDamageDestroy(display->dpy, display->damage);
 		display->damage = damage;
commit 0baac6bba72638a69b6cb04c74493ee48e253884
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 5 23:08:40 2013 +0100

    sna/gen6+: Don't request extra caching for use-once upload buffers
    
    As we only use these buffers once, we should not benefit from requesting
    them to be moved into L3/LLC cache - over and above the default
    recommendations we make when creating the buffer. Indeed, this may even
    lead to artefacts if we fail to invalidate those other caches when
    reusing the buffers.
    
    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 1db6c95..52eabca 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1068,7 +1068,7 @@ gen6_bind_bo(struct sna *sna,
 	ss[3] = (gen6_tiling_bits(bo->tiling) |
 		 (bo->pitch - 1) << GEN6_SURFACE_PITCH_SHIFT);
 	ss[4] = 0;
-	ss[5] = is_scanout ? 0 : 3 << 16;
+	ss[5] = (is_scanout || bo->io) ? 0 : 3 << 16;
 
 	kgem_bo_set_binding(bo, format | is_dst << 30 | is_scanout << 31, offset);
 
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index e92a83b..be7dda0 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1283,7 +1283,7 @@ gen7_bind_bo(struct sna *sna,
 		 (height - 1) << GEN7_SURFACE_HEIGHT_SHIFT);
 	ss[3] = (bo->pitch - 1) << GEN7_SURFACE_PITCH_SHIFT;
 	ss[4] = 0;
-	ss[5] = is_scanout ? 0 : is_hsw(sna) ? 5 << 16 : 3 << 16;
+	ss[5] = (is_scanout || bo->io) ? 0 : is_hsw(sna) ? 5 << 16 : 3 << 16;
 	ss[6] = 0;
 	ss[7] = 0;
 	if (is_hsw(sna))


More information about the xorg-commit mailing list