xf86-video-intel: 2 commits - src/sna/sna_display.c src/sna/sna_driver.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Apr 18 23:56:28 PDT 2014
src/sna/sna_display.c | 43 ++++++++++++++++++++++++-------------------
src/sna/sna_driver.c | 5 ++++-
2 files changed, 28 insertions(+), 20 deletions(-)
New commits:
commit 58a757b64927d8e27c4ac38cc15f8291037ec905
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 18 09:28:02 2014 +0100
sna: Do not reuse physical cursors for the kernel is broken, harder
commit 154f7e9668bffdf565b6914a3a3e5bdfe17aa1b9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 18 09:28:02 2014 +0100
sna: Do not reuse physical cursors for the kernel is broken
was insufficient as it ended up reusing a stale cursor that was still
attached, and so after updating the cursor the second pipe found itself
with a valid cursor. Hey presto, we had a shared physical cursor, once
again demonstrating the buggy kernel.
This time, disable all cursor reuse except for the once currently
attached to the pipe - this should prevent all sharing.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77351
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 a356e7f..ab5b529 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3170,34 +3170,39 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc)
sna->cursor.ref->bits->argb!=NULL));
rotation = crtc->transform_in_use ? crtc->rotation : RR_Rotate_0;
- for (cursor = sna->cursor.cursors; cursor; cursor = cursor->next) {
- if (cursor->serial == sna->cursor.serial && cursor->rotation == rotation && cursor->image) {
- __DBG(("%s: reusing handle=%d, serial=%d, rotation=%d, size=%d\n",
- __FUNCTION__, cursor->handle, cursor->serial, cursor->rotation, cursor->size));
- assert(cursor->size == sna->cursor.size);
- return cursor;
- }
- }
-
size = sna->cursor.size;
- for (cursor = sna->cursor.cursors; cursor; cursor = cursor->next) {
- if (cursor->alloc >= 4*size*size && cursor->rotation == rotation) {
- __DBG(("%s: stealing handle=%d, serial=%d, rotation=%d, alloc=%d\n",
- __FUNCTION__, cursor->handle, cursor->serial, cursor->rotation, cursor->alloc));
- assert(cursor->serial != sna->cursor.serial);
- break;
+ if (cursor && cursor->alloc < 4*size*size)
+ cursor = NULL;
+
+ if (sna->kgem.gen >= 033) { /* Don't allow phys cursor sharing */
+ for (cursor = sna->cursor.cursors; cursor; cursor = cursor->next) {
+ if (cursor->serial == sna->cursor.serial && cursor->rotation == rotation) {
+ __DBG(("%s: reusing handle=%d, serial=%d, rotation=%d, size=%d\n",
+ __FUNCTION__, cursor->handle, cursor->serial, cursor->rotation, cursor->size));
+ assert(cursor->size == sna->cursor.size);
+ return cursor;
+ }
}
- }
- if (cursor == NULL) {
for (cursor = sna->cursor.cursors; cursor; cursor = cursor->next) {
- if (cursor->alloc >= 4*size*size && cursor->serial != sna->cursor.serial) {
+ if (cursor->alloc >= 4*size*size && cursor->rotation == rotation) {
__DBG(("%s: stealing handle=%d, serial=%d, rotation=%d, alloc=%d\n",
__FUNCTION__, cursor->handle, cursor->serial, cursor->rotation, cursor->alloc));
- assert(cursor->rotation != rotation);
+ assert(cursor->serial != sna->cursor.serial);
break;
}
}
+
+ if (cursor == NULL) {
+ for (cursor = sna->cursor.cursors; cursor; cursor = cursor->next) {
+ if (cursor->alloc >= 4*size*size && cursor->serial != sna->cursor.serial) {
+ __DBG(("%s: stealing handle=%d, serial=%d, rotation=%d, alloc=%d\n",
+ __FUNCTION__, cursor->handle, cursor->serial, cursor->rotation, cursor->alloc));
+ assert(cursor->rotation != rotation);
+ break;
+ }
+ }
+ }
}
if (cursor == NULL) {
commit fb0ed43cbc6f34bde670ab846e7ba9e7dbf9b660
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Apr 18 20:55:49 2014 +0100
sna: Refine detection of when shadow is active during BlockHandler
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 51f224e..5f88513 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -632,7 +632,10 @@ static bool has_shadow(struct sna *sna)
if (!sna->mode.shadow_damage)
return false;
- return RegionNotEmpty(DamageRegion(sna->mode.shadow_damage));
+ if (RegionNil(DamageRegion(sna->mode.shadow_damage)))
+ return false;
+
+ return sna->mode.shadow_flip == 0;
}
static void
More information about the xorg-commit
mailing list