diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-05 03:31:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-05 03:31:12 +0100 |
commit | 7e8060f837475c85cc061ba4a5388140cd227613 (patch) | |
tree | 8775332218abce2bc3ab58e3763665a7beb6ae02 /src | |
parent | c32bb286dc9a489232030f6abe9076411fbcecfd (diff) |
sna: Do not force GPU allocation if CPU bo is already busy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_accel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 13bd978f..794086c6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2260,8 +2260,8 @@ sna_drawable_use_bo(DrawablePtr drawable, goto use_cpu_bo; } - if (priv->cpu_damage && !box_inplace(pixmap, box)) { - DBG(("%s: damaged with a small operation, will not force allocation\n", + if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) { + DBG(("%s: already using CPU bo, will not force allocation\n", __FUNCTION__)); goto use_cpu_bo; } @@ -2271,6 +2271,12 @@ sna_drawable_use_bo(DrawablePtr drawable, goto use_cpu_bo; } + if (priv->cpu_damage && !box_inplace(pixmap, box)) { + DBG(("%s: damaged with a small operation, will not force allocation\n", + __FUNCTION__)); + goto use_cpu_bo; + } + flags = MOVE_WRITE | MOVE_READ; if (prefer_gpu & FORCE_GPU) flags |= __MOVE_FORCE; |