xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_accel.c src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 25 01:29:35 PDT 2014


 src/sna/kgem.c        |    3 ++-
 src/sna/sna_accel.c   |    2 +-
 src/sna/sna_display.c |    8 ++++++--
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 8c1729aab6b49e7d4a3f48516a629b0d23e8591b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 25 09:00:04 2014 +0100

    sna: Tweak scanout flush
    
    We now distinguish gpu_dirty whilst the bo is not flushed within a batch
    and needs_flush for when it is dirty and still busy.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 24cd11e..7a7e2f2 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -5174,10 +5174,11 @@ static void __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
 
 void kgem_scanout_flush(struct kgem *kgem, struct kgem_bo *bo)
 {
-	kgem_bo_submit(kgem, bo);
 	if (!bo->needs_flush)
 		return;
 
+	kgem_bo_submit(kgem, bo);
+
 	/* If the kernel fails to emit the flush, then it will be forced when
 	 * we assume direct access. And as the usual failure is EIO, we do
 	 * not actually care.
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index d729166..a559907 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -17047,7 +17047,7 @@ static void timer_enable(struct sna *sna, int whom, int interval)
 
 static bool sna_scanout_do_flush(struct sna *sna)
 {
-	int interval = sna->vblank_interval ?: 20;
+	int interval = sna->vblank_interval ?: 50;
 	if (sna->timer_active & (1<<(FLUSH_TIMER))) {
 		int32_t delta = sna->timer_expire[FLUSH_TIMER] - TIME;
 		DBG(("%s: flush timer active: delta=%d\n",
commit 26c4e850b8a7d13afc351097ee6f6b2f3f90e2b9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 25 08:18:25 2014 +0100

    sna: Throttle before doing a TearFree buffer replacement
    
    If the client is rendering fast, he may be rendering too fast and
    starting to build up a backlog.
    
    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 9c24ea6..706a7eb 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1117,8 +1117,12 @@ static bool wait_for_shadow(struct sna *sna,
 	damage = sna->mode.shadow_damage;
 	sna->mode.shadow_damage = NULL;
 
-	while (sna->mode.flip_active && sna_mode_has_pending_events(sna))
-		sna_mode_wakeup(sna);
+	if (sna->mode.flip_active) {
+		/* raw cmd to avoid setting wedged in the middle of an op */
+		drmIoctl(sna->kgem.fd, DRM_IOCTL_I915_GEM_THROTTLE, 0);
+		while (sna->mode.flip_active && sna_mode_has_pending_events(sna))
+			sna_mode_wakeup(sna);
+	}
 
 	bo = sna->mode.shadow;
 	if (sna->mode.flip_active) {


More information about the xorg-commit mailing list