diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-11 10:35:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-11 11:05:16 +0100 |
commit | d9bf6f3fecb3d691937da086a5270334c6c0e69a (patch) | |
tree | cefc9a01aaf52006594f23c62dd382ccf42e3d76 | |
parent | 277e6ab84bb0c692358a34a76e7962c64efb0362 (diff) |
sna: Prefer to operate inplace on the GPU rather than stall on the CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 55b64514..563712c8 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1593,6 +1593,11 @@ static inline bool pixmap_inplace(struct sna *sna, return has_coherent_map(sna, priv->gpu_bo, flags); } + if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) { + DBG(("%s: yes, has CPU bo and is active on CPU\n", __FUNCTION__)); + return true; + } + if (priv->cpu_bo && priv->cpu) { DBG(("%s: no, has CPU bo and was last active on CPU, presume future CPU activity\n", __FUNCTION__)); return false; |