diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-22 08:56:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-22 08:58:30 +0100 |
commit | 92dbedc6138b923aa473935013ecb0346280c4d3 (patch) | |
tree | 0833d3ee36878eba102a8345578ef1872643182b /src/sna/sna_composite.c | |
parent | 3e1be265cf950976b5929b14a9dad0664deaa2c1 (diff) |
sna: Force the stall before trying to upload into a busy CPU bo
Under the circumstances where we can not instead stream the write into
the GPU bo, we need to use the busy CPU bo.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54978
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r-- | src/sna/sna_composite.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index d3df17d9..60d39cde 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -527,7 +527,7 @@ sna_composite(CARD8 op, get_drawable_dx(dst->pDrawable), get_drawable_dy(dst->pDrawable))); - if (op <= PictOpSrc) { + if (op <= PictOpSrc && priv->cpu_damage) { int16_t x, y; get_drawable_deltas(dst->pDrawable, pixmap, &x, &y); @@ -535,6 +535,10 @@ sna_composite(CARD8 op, pixman_region_translate(®ion, x, y); sna_damage_subtract(&priv->cpu_damage, ®ion); + if (priv->cpu_damage == NULL) { + list_del(&priv->list); + priv->cpu = false; + } if (x|y) pixman_region_translate(®ion, -x, -y); |