xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_accel.c src/sna/sna_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Feb 13 09:37:26 PST 2013
src/sna/kgem.c | 4 +++-
src/sna/sna_accel.c | 10 +++-------
src/sna/sna_render.c | 13 +++++--------
3 files changed, 11 insertions(+), 16 deletions(-)
New commits:
commit f2a64dbdfceac985d235c4873f52013633d6cfd8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 13 17:15:46 2013 +0000
sna: Avoid stalling on a SHM upload when otherwise idle
Fixes regresion from
commit 09ea1f4402b3bd0e411b90eb5575b3ff066d7356
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jan 10 16:26:24 2013 +0000
sna: Prefer to use the GPU for copies from SHM onto tiled destinations
As the stalls on IVB 64-bit machines at least greatly offset the
benefits. As those earlier measurements were made on the same IVB
machine but running in 32-bit mode, I need to double-check whether or
not this is another 32-bit peculiarity.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 9f27461..e0f804e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4737,7 +4737,9 @@ void kgem_bo_sync__cpu(struct kgem *kgem, struct kgem_bo *bo)
void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write)
{
assert(bo->proxy == NULL);
- kgem_bo_submit(kgem, bo);
+
+ if (write || bo->needs_flush)
+ kgem_bo_submit(kgem, bo);
if (bo->domain != DOMAIN_CPU) {
struct drm_i915_gem_set_domain set_domain;
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 134b72f..12f078e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4138,17 +4138,14 @@ static bool use_shm_bo(struct sna *sna,
DBG(("%s: yes, complex alu=%d\n", __FUNCTION__, alu));
return true;
}
- if (bo->tiling) {
- DBG(("%s:, yes, dst tiled=%d\n", __FUNCTION__, bo->tiling));
- return true;
- }
if (__kgem_bo_is_busy(&sna->kgem, bo)) {
DBG(("%s: yes, dst is busy\n", __FUNCTION__));
return true;
}
- if (__kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) {
+ if (priv->cpu_bo->needs_flush &&
+ __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) {
DBG(("%s: yes, src is busy\n", __FUNCTION__));
return true;
}
@@ -4378,8 +4375,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
src_priv == NULL &&
sna->kgem.has_userptr &&
box_inplace(src_pixmap, ®ion->extents) &&
- ((sna->kgem.has_llc && bo->tiling && !bo->scanout) ||
- __kgem_bo_is_busy(&sna->kgem, bo))) {
+ __kgem_bo_is_busy(&sna->kgem, bo)) {
struct kgem_bo *src_bo;
bool ok = false;
commit 4bf51ec7bcc7818fbee8643a88aebee0362691b2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 13 16:32:18 2013 +0000
Revert "sna: Avoid promoting SHM CPU bo to GPU to maintain coherence with SHM clients"
This reverts commit f743cd5734ca502aa8bdb0e1327fe84d6ce82755.
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 69ac21c..d9affcb 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -324,14 +324,6 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
return NULL;
}
- if (priv->shm) {
- DBG(("%s: shm CPU bo, avoiding promotion to GPU\n",
- __FUNCTION__));
- assert(!priv->flush);
- sna_add_flush_pixmap(sna, priv, priv->cpu_bo);
- return priv->cpu_bo;
- }
-
if (priv->cpu_bo->snoop && priv->source_count > SOURCE_BIAS) {
DBG(("%s: promoting snooped CPU bo due to reuse\n",
__FUNCTION__));
@@ -400,6 +392,11 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box, bool blt)
}
}
+ if (priv->shm) {
+ assert(!priv->flush);
+ sna_add_flush_pixmap(sna, priv, priv->cpu_bo);
+ }
+
DBG(("%s for box=(%d, %d), (%d, %d)\n",
__FUNCTION__, box->x1, box->y1, box->x2, box->y2));
++priv->source_count;
More information about the xorg-commit
mailing list