summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-02-09 09:57:26 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-02-09 09:57:26 +0000
commit80044e54634d0836694d5aa6f98ce22fe38d367f (patch)
tree65b6d21fddc5c20b30e90ef72a342ee1f44f7686 /src
parentd18cb72a94fad0ee99ab361c21d643c927d29c35 (diff)
sna: Promote to GPU is only partially damaged on the CPU but busy on the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_render.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 6c5d962d..697b8025 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -350,6 +350,11 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
__FUNCTION__));
break;
default:
+ if (kgem_bo_is_busy(priv->gpu_bo)){
+ DBG(("%s: box is partially damaged on the CPU, and the GPU is busy\n",
+ __FUNCTION__));
+ return NULL;
+ }
if (sna_damage_contains_box(priv->gpu_damage,
box) != PIXMAN_REGION_OUT) {
DBG(("%s: box is damaged on the GPU\n",
@@ -454,7 +459,9 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box, bool blt)
w = box->x2 - box->x1;
h = box->y2 - box->y1;
- if (w == pixmap->drawable.width && h == pixmap->drawable.height) {
+ if (priv->cpu_bo && !priv->cpu_bo->flush) {
+ migrate = true;
+ } else if (w == pixmap->drawable.width && h == pixmap->drawable.height) {
migrate = priv->source_count++ > SOURCE_BIAS;
DBG(("%s: migrating whole pixmap (%dx%d) for source (%d,%d),(%d,%d), count %d? %d\n",