xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Aug 18 02:38:14 PDT 2013
src/sna/sna_accel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 4486ae2d829781e32652bce84c08e63ee1960bf0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Aug 18 10:11:49 2013 +0100
sna: Do not force use of the CPU bo if replacing a busy GPU bo
To minimise waiting for the SHM pixmap afterwards.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8409d5e..1f5a18e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4962,7 +4962,7 @@ source_prefer_gpu(struct sna *sna, struct sna_pixmap *priv,
static bool use_shm_bo(struct sna *sna,
struct kgem_bo *bo,
struct sna_pixmap *priv,
- int alu)
+ int alu, bool replaces)
{
if (priv == NULL || priv->cpu_bo == NULL) {
DBG(("%s: no, not attached\n", __FUNCTION__));
@@ -4979,7 +4979,7 @@ static bool use_shm_bo(struct sna *sna,
return true;
}
- if (__kgem_bo_is_busy(&sna->kgem, bo)) {
+ if (!replaces && __kgem_bo_is_busy(&sna->kgem, bo)) {
DBG(("%s: yes, dst is busy\n", __FUNCTION__));
return true;
}
@@ -5227,7 +5227,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
if (bo != dst_priv->gpu_bo)
goto fallback;
- if (use_shm_bo(sna, bo, src_priv, alu)) {
+ if (use_shm_bo(sna, bo, src_priv, alu, replaces)) {
bool ret;
DBG(("%s: region overlaps CPU damage, copy from CPU bo (shm? %d)\n",
More information about the xorg-commit
mailing list