xf86-video-intel: 2 commits - src/sna/gen6_render.c src/sna/gen7_render.c src/sna/gen8_render.c src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jan 28 21:54:57 PST 2014
src/sna/gen6_render.c | 4 +++-
src/sna/gen7_render.c | 4 +++-
src/sna/gen8_render.c | 4 +++-
src/sna/sna_display.c | 36 ++++++++++++++++++++++++++++++------
4 files changed, 39 insertions(+), 9 deletions(-)
New commits:
commit 872468a059e164235527d1501940b2740d3da2ff
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 29 05:40:00 2014 +0000
sna/gen6+: Encourage inplace uploads for Composite
First try using the blt path for a potential inplace upload for a
simple composite operation copying from a ShmPixmap.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index a117bf8..cf417d4 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1901,7 +1901,9 @@ try_blt(struct sna *sna,
if (src->pDrawable) {
bo = __sna_drawable_peek_bo(src->pDrawable);
- if (bo && bo->rq)
+ if (bo == NULL)
+ return true;
+ else if (bo->rq)
return RQ_IS_BLT(bo->rq);
}
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index eec6d65..f15e057 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2182,7 +2182,9 @@ try_blt(struct sna *sna,
if (src->pDrawable) {
bo = __sna_drawable_peek_bo(src->pDrawable);
- if (bo && bo->rq)
+ if (bo == NULL)
+ return true;
+ else if (bo->rq)
return RQ_IS_BLT(bo->rq);
}
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index fcc37ab..25fd528 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -1933,7 +1933,9 @@ try_blt(struct sna *sna,
if (src->pDrawable) {
bo = __sna_drawable_peek_bo(src->pDrawable);
- if (bo && bo->rq)
+ if (bo == NULL)
+ return true;
+ else if (bo->rq)
return RQ_IS_BLT(bo->rq);
}
commit 4b73a0ea22b43807c0118f4d7e9dcac3f0626463
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 29 05:32:25 2014 +0000
sna: Skip undamaged TearFree redisplays
If we have not had cause to flush the wait_for_shadow buffer during the
course of the rendering, then we never wrote to the backbuffer and its
contents are still identical to the current frontbuffer. So if the
wait_for_shadow is still flagged as required on the scanout, we know we
can safely discard the redisplay request.
References: https://bugs.freedesktop.org/show_bug.cgi?id=70905
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index cf3e576..00eab32 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4492,8 +4492,10 @@ void sna_mode_redisplay(struct sna *sna)
if (!sna->mode.shadow_damage)
return;
- DBG(("%s: posting shadow damage? %d\n",
- __FUNCTION__, !RegionNil(DamageRegion(sna->mode.shadow_damage))));
+ DBG(("%s: posting shadow damage? %d (flips pending? %D)\n",
+ __FUNCTION__,
+ !RegionNil(DamageRegion(sna->mode.shadow_damage)),
+ sna->mode.shadow_flip));
assert((sna->flags & SNA_IS_HOSTED) == 0);
assert(sna->mode.shadow_active);
@@ -4554,8 +4556,19 @@ void sna_mode_redisplay(struct sna *sna)
priv = sna_pixmap(sna->front);
assert(priv != NULL);
- if (priv->move_to_gpu)
+ if (priv->move_to_gpu) {
+ if (priv->move_to_gpu == wait_for_shadow) {
+ /* No damage written to new scanout
+ * (backbuffer), ignore redisplay request
+ * and continue with the current intact
+ * scanout (frontbuffer).
+ */
+ RegionEmpty(region);
+ return;
+ }
+
(void)priv->move_to_gpu(sna, priv, 0);
+ }
assert(priv->move_to_gpu == NULL);
}
@@ -4565,9 +4578,15 @@ void sna_mode_redisplay(struct sna *sna)
struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
RegionRec damage;
- if (sna_crtc == NULL ||
- !sna_crtc->shadow ||
- sna_crtc->bo == sna->mode.shadow)
+ if (sna_crtc == NULL)
+ continue;
+
+ DBG(("%s: crtc[%d] shadow? %d, transformed? %d\n",
+ __FUNCTION__, i,
+ sna_crtc->shadow,
+ sna_crtc->bo != sna->mode.shadow));
+
+ if (!sna_crtc->shadow || sna_crtc->bo == sna->mode.shadow)
continue;
assert(crtc->enabled);
@@ -4715,6 +4734,11 @@ disable2:
crtc->bo = kgem_bo_reference(new);
}
+ DBG(("%s: flipped %d outputs, shadow active? %d\n",
+ __FUNCTION__,
+ sna->mode.shadow_flip,
+ sna->mode.shadow ? sna->mode.shadow->handle : 0));
+
if (sna->mode.shadow) {
assert(old == sna->mode.shadow);
assert(old->refcnt >= 1);
More information about the xorg-commit
mailing list