diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-04 20:58:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-05 11:00:25 +0100 |
commit | 7cf670228eec058a97f6450df46a1a47cb080583 (patch) | |
tree | 2d8cd86777933649d65391ffcd52401754ee3f8a /src/sna/sna_accel.c | |
parent | 209d120dbf9b32d3b96a0f857e4f658f6a554c02 (diff) |
sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.
v2:
commit 226a58bc592d4ed305b7ad0e460f1ee2548e0ddf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Apr 4 20:58:24 2015 +0100
sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
Tried to fix it by disabling SourceValidate. However, it a direct hook
into the Damage code by miSprite that triggers the copy. Since there
appears to be no way to intervene, we just mark that copy as internal
and ignore it.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r-- | src/sna/sna_accel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2626988f..f76447bd 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -7207,6 +7207,9 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc, if (gc->planemask == 0) return NULL; + if (sna->ignore_copy_area) + return NULL; + DBG(("%s: src=(%d, %d)x(%d, %d)+(%d, %d) -> dst=(%d, %d)+(%d, %d); alu=%d, pm=%lx, depth=%d\n", __FUNCTION__, src_x, src_y, width, height, src->x, src->y, |