xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_composite.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Sep 4 14:41:08 PDT 2012
src/sna/kgem.c | 6 ++++++
src/sna/sna_composite.c | 19 ++++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
New commits:
commit 7895416eabfc5bd361d0d0ff92c570e2f6af47e0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 4 20:30:53 2012 +0100
sna: Rearrange use_cpu() tests for composite ops to avoid syncing CPU bo
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 65dae9c..d3df17d 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -423,8 +423,8 @@ static void apply_damage(struct sna_composite_op *op, RegionPtr region)
static inline bool use_cpu(PixmapPtr pixmap, struct sna_pixmap *priv,
CARD8 op, INT16 width, INT16 height)
{
- if (too_small(priv))
- return true;
+ if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo))
+ return false;
if (DAMAGE_IS_ALL(priv->cpu_damage) &&
(op > PictOpSrc ||
@@ -432,7 +432,10 @@ static inline bool use_cpu(PixmapPtr pixmap, struct sna_pixmap *priv,
height < pixmap->drawable.height))
return true;
- return false;
+ if (priv->gpu_bo)
+ return false;
+
+ return (priv->create & KGEM_CAN_CREATE_GPU) == 0;
}
void
@@ -501,14 +504,15 @@ sna_composite(CARD8 op,
priv = sna_pixmap(pixmap);
if (priv == NULL) {
- DBG(("%s: fallback as destination is unattached\n",
- __FUNCTION__));
+ DBG(("%s: fallback as destination pixmap=%ld is unattached\n",
+ __FUNCTION__, pixmap->drawable.serialNumber));
goto fallback;
}
if (use_cpu(pixmap, priv, op, width, height) &&
!picture_is_gpu(src) && !picture_is_gpu(mask)) {
- DBG(("%s: fallback, dst is too small (or completely damaged)\n", __FUNCTION__));
+ DBG(("%s: fallback, dst pixmap=%ld is too small (or completely damaged)\n",
+ __FUNCTION__, pixmap->drawable.serialNumber));
goto fallback;
}
@@ -814,7 +818,8 @@ sna_composite_rectangles(CARD8 op,
priv = sna_pixmap(pixmap);
if (priv == NULL || too_small(priv)) {
- DBG(("%s: fallback, too small or not attached\n", __FUNCTION__));
+ DBG(("%s: fallback, dst pixmap=%ld too small or not attached\n",
+ __FUNCTION__, pixmap->drawable.serialNumber));
goto fallback;
}
commit ad57ac07a273bf376b74884de47d8ee1e7129fb8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 4 20:06:49 2012 +0100
sna: Flush the batch before a render operation if the GPU is idle
Experiment with pushing those first commands earlier.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 229a799..8d38308 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3568,6 +3568,12 @@ bool kgem_check_bo(struct kgem *kgem, ...)
}
va_end(ap);
+ DBG(("%s: num_pages=+%d, num_exec=+%d\n",
+ __FUNCTION__, num_pages, num_exec));
+
+ if (kgem->nexec && kgem_is_idle(kgem))
+ return false;
+
if (!num_pages)
return true;
More information about the xorg-commit
mailing list