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

Chris Wilson ickle at kemper.freedesktop.org
Sun Feb 5 21:07:16 UTC 2017


 src/sna/gen2_render.c |    7 +++++++
 src/sna/sna_display.c |    8 +-------
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 38ac6b556dae914325980d135a81719c9dfda000
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Feb 5 20:58:37 2017 +0000

    sna/gen2: Cap number of vertices emitted in a single 3DPRIM
    
    There's a maximum of 2^18 dwords in a single command, or else we
    overflow the lenth field.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99620
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index c6eceda..11e8e52 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -49,6 +49,7 @@
 
 #define MAX_3D_SIZE 2048
 #define MAX_3D_PITCH 8192
+#define MAX_INLINE (1 << 18)
 
 #define BATCH(v) batch_emit(sna, v)
 #define BATCH_F(v) batch_emit_float(sna, v)
@@ -1165,6 +1166,9 @@ inline static int gen2_get_rectangles(struct sna *sna,
 {
 	int rem = batch_space(sna), size, need;
 
+	if (rem > MAX_INLINE)
+		rem = MAX_INLINE;
+
 	DBG(("%s: want=%d, floats_per_vertex=%d, rem=%d\n",
 	     __FUNCTION__, want, op->floats_per_vertex, rem));
 
@@ -3230,6 +3234,9 @@ gen2_get_inline_rectangles(struct sna *sna, int want, int floats_per_vertex)
 	int size = floats_per_vertex * 3;
 	int rem = batch_space(sna) - 1;
 
+	if (rem > MAX_INLINE)
+		rem = MAX_INLINE;
+
 	if (size * want > rem)
 		want = rem / size;
 
commit 8572955b019a27e8260f3e7e7681bf0b6aed6e65
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 1 15:37:47 2017 +0000

    Revert "sna: Force CRTC off when DP-MST are unplugged"
    
    This reverts commit 2da23747c68cf5af40eb80a90cd0ee5cfe64bbf9 as it
    is already applied by disable_unused_crtc() called when the output is
    removed, and now we ensure that a residual active CRTC is disabled.

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index a31e0e5..73a7069 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5458,15 +5458,9 @@ void sna_mode_discover(struct sna *sna, bool tell)
 		xf86DrvMsg(sna->scrn->scrnIndex, X_INFO,
 			   "Disabled output %s\n",
 			   output->name);
-		if (output->crtc) {
-			DBG(("%s: output %s still active, force CRTC off\n",
-			     __FUNCTION__, output->name));
-			/* XXX DP-MST are not shared */
-			sna_crtc_disable(output->crtc, true);
-			output->crtc = NULL;
-		}
 		sna_output->id = 0;
 		sna_output->last_detect = 0;
+		output->crtc = NULL;
 		RROutputChanged(output->randr_output, TRUE);
 		changed |= 2;
 	}


More information about the xorg-commit mailing list