[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-intel: Changes to 'debian-unstable'



 autogen.sh               |   11 +++---
 debian/changelog         |    6 +++
 src/backlight.c          |   86 +++++++++++++++++++++++++----------------------
 src/i915_pciids.h        |   56 +++++++++++-------------------
 src/intel_device.c       |    2 -
 src/intel_module.c       |   16 +-------
 src/sna/gen2_render.c    |   12 ++++++
 src/sna/sna_display.c    |   59 +++++++++++++++++++++++++++++---
 test/dri3-test.c         |   11 +-----
 tools/backlight_helper.c |    4 ++
 10 files changed, 156 insertions(+), 107 deletions(-)

New commits:
commit 52151d10fed1f82ad18ac556fa4bba976447a11e
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Mar 9 11:26:14 2017 +0200

    update changelog

diff --git a/debian/changelog b/debian/changelog
index d4d2475..60eb93a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.99.917+git20170309-1) UNRELEASED; urgency=medium
+
+  * New upstream snapshot.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 09 Mar 2017 11:24:07 +0200
+
 xserver-xorg-video-intel (2:2.99.917+git20161206-1) unstable; urgency=medium
 
   [ Andreas Boll ]

commit 78d7a09b0343829c81257024b164b0b3764392ac
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Feb 28 20:48:43 2017 +0000

    intel: Fix checking xf86LoadKernelModule for success
    
    Originally introduced in
    
    commit f66e25def3431a900068cc1c23a6b1e8322ef046
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Mon Jun 23 16:14:28 2014 +0100
    
        intel: Wait for the DRM device to load
    
    the legacy path was checking the return xf86LoadKernelModule
    incorrectly. This error was then copy into the common loader in
    
    commit 6a2dcb388e6b549c3175ccfbcd3f1751e25de40a
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri Jul 31 10:40:32 2015 +0100
    
        intel: Refactor i915.ko loading support
    
    xf86LoadKernelModule() returns 1 on success and zero on failure.
    
    Reported-by: David Shao <davshao@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100011
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_device.c b/src/intel_device.c
index 04ad7b6..c4910cd 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -233,7 +233,7 @@ static int load_i915_kernel_module(void)
 	const char **kn;
 
 	for (kn = kernel_module_names; *kn; kn++)
-		if (xf86LoadKernelModule(*kn) == 0)
+		if (xf86LoadKernelModule(*kn))
 			return 0;
 
 	return -1;

commit e9cd8c211dcaba3bad4bc950a0a06b35766962ba
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Feb 27 20:38:22 2017 +0000

    pciids: Update for missing Skylake IDs
    
    Sync with kernel commit ca7a45ba6fb9e7ceca56d10b91db29c2f3451a2e
    Author: Michał Winiarski <michal.winiarski@intel.com>
    Date:   Mon Feb 27 12:22:56 2017 +0100
    
        drm/i915/skl: Add missing SKL ID
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/i915_pciids.h b/src/i915_pciids.h
index 0370f83..466c715 100644
--- a/src/i915_pciids.h
+++ b/src/i915_pciids.h
@@ -134,7 +134,7 @@
 #define INTEL_IVB_Q_IDS(info) \
 	INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */
 
-#define INTEL_HSW_D_IDS(info) \
+#define INTEL_HSW_IDS(info) \
 	INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \
 	INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \
 	INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \
@@ -179,9 +179,7 @@
 	INTEL_VGA_DEVICE(0x0D2B, info), /* CRW GT3 reserved */ \
 	INTEL_VGA_DEVICE(0x0D0E, info), /* CRW GT1 reserved */ \
 	INTEL_VGA_DEVICE(0x0D1E, info), /* CRW GT2 reserved */ \
-	INTEL_VGA_DEVICE(0x0D2E, info)  /* CRW GT3 reserved */ \
-
-#define INTEL_HSW_M_IDS(info) \
+	INTEL_VGA_DEVICE(0x0D2E, info),  /* CRW GT3 reserved */ \
 	INTEL_VGA_DEVICE(0x0406, info), /* GT1 mobile */ \
 	INTEL_VGA_DEVICE(0x0416, info), /* GT2 mobile */ \
 	INTEL_VGA_DEVICE(0x0426, info), /* GT2 mobile */ \
@@ -198,17 +196,15 @@
 	INTEL_VGA_DEVICE(0x0D16, info), /* CRW GT2 mobile */ \
 	INTEL_VGA_DEVICE(0x0D26, info)  /* CRW GT3 mobile */
 
-#define INTEL_VLV_M_IDS(info) \
+#define INTEL_VLV_IDS(info) \
 	INTEL_VGA_DEVICE(0x0f30, info), \
 	INTEL_VGA_DEVICE(0x0f31, info), \
 	INTEL_VGA_DEVICE(0x0f32, info), \
 	INTEL_VGA_DEVICE(0x0f33, info), \
-	INTEL_VGA_DEVICE(0x0157, info)
-
-#define INTEL_VLV_D_IDS(info) \
+	INTEL_VGA_DEVICE(0x0157, info), \
 	INTEL_VGA_DEVICE(0x0155, info)
 
-#define INTEL_BDW_GT12M_IDS(info)  \
+#define INTEL_BDW_GT12_IDS(info)  \
 	INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \
 	INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \
 	INTEL_VGA_DEVICE(0x160B, info), /* GT1 Iris */ \
@@ -216,43 +212,32 @@
 	INTEL_VGA_DEVICE(0x1612, info), /* GT2 Halo */ \
 	INTEL_VGA_DEVICE(0x1616, info), /* GT2 ULT */ \
 	INTEL_VGA_DEVICE(0x161B, info), /* GT2 ULT */ \
-	INTEL_VGA_DEVICE(0x161E, info)  /* GT2 ULX */
-
-#define INTEL_BDW_GT12D_IDS(info) \
+	INTEL_VGA_DEVICE(0x161E, info),  /* GT2 ULX */ \
 	INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \
 	INTEL_VGA_DEVICE(0x160D, info), /* GT1 Workstation */ \
 	INTEL_VGA_DEVICE(0x161A, info), /* GT2 Server */ \
 	INTEL_VGA_DEVICE(0x161D, info)  /* GT2 Workstation */
 
-#define INTEL_BDW_GT3M_IDS(info) \
+#define INTEL_BDW_GT3_IDS(info) \
 	INTEL_VGA_DEVICE(0x1622, info), /* ULT */ \
 	INTEL_VGA_DEVICE(0x1626, info), /* ULT */ \
 	INTEL_VGA_DEVICE(0x162B, info), /* Iris */ \
-	INTEL_VGA_DEVICE(0x162E, info)  /* ULX */
-
-#define INTEL_BDW_GT3D_IDS(info) \
+	INTEL_VGA_DEVICE(0x162E, info),  /* ULX */\
 	INTEL_VGA_DEVICE(0x162A, info), /* Server */ \
 	INTEL_VGA_DEVICE(0x162D, info)  /* Workstation */
 
-#define INTEL_BDW_RSVDM_IDS(info) \
+#define INTEL_BDW_RSVD_IDS(info) \
 	INTEL_VGA_DEVICE(0x1632, info), /* ULT */ \
 	INTEL_VGA_DEVICE(0x1636, info), /* ULT */ \
 	INTEL_VGA_DEVICE(0x163B, info), /* Iris */ \
-	INTEL_VGA_DEVICE(0x163E, info)  /* ULX */
-
-#define INTEL_BDW_RSVDD_IDS(info) \
+	INTEL_VGA_DEVICE(0x163E, info), /* ULX */ \
 	INTEL_VGA_DEVICE(0x163A, info), /* Server */ \
 	INTEL_VGA_DEVICE(0x163D, info)  /* Workstation */
 
-#define INTEL_BDW_M_IDS(info) \
-	INTEL_BDW_GT12M_IDS(info), \
-	INTEL_BDW_GT3M_IDS(info), \
-	INTEL_BDW_RSVDM_IDS(info)
-
-#define INTEL_BDW_D_IDS(info) \
-	INTEL_BDW_GT12D_IDS(info), \
-	INTEL_BDW_GT3D_IDS(info), \
-	INTEL_BDW_RSVDD_IDS(info)
+#define INTEL_BDW_IDS(info) \
+	INTEL_BDW_GT12_IDS(info), \
+	INTEL_BDW_GT3_IDS(info), \
+	INTEL_BDW_RSVD_IDS(info)
 
 #define INTEL_CHV_IDS(info) \
 	INTEL_VGA_DEVICE(0x22b0, info), \
@@ -280,7 +265,8 @@
 	INTEL_VGA_DEVICE(0x1923, info), /* ULT GT3 */ \
 	INTEL_VGA_DEVICE(0x1926, info), /* ULT GT3 */ \
 	INTEL_VGA_DEVICE(0x1927, info), /* ULT GT3 */ \
-	INTEL_VGA_DEVICE(0x192B, info)  /* Halo GT3 */ \
+	INTEL_VGA_DEVICE(0x192B, info), /* Halo GT3 */ \
+	INTEL_VGA_DEVICE(0x192D, info)  /* SRV GT3 */
 
 #define INTEL_SKL_GT4_IDS(info) \
 	INTEL_VGA_DEVICE(0x1932, info), /* DT GT4 */ \
@@ -302,6 +288,10 @@
 	INTEL_VGA_DEVICE(0x5A84, info), /* APL HD Graphics 505 */ \
 	INTEL_VGA_DEVICE(0x5A85, info)  /* APL HD Graphics 500 */
 
+#define INTEL_GLK_IDS(info) \
+	INTEL_VGA_DEVICE(0x3184, info), \
+	INTEL_VGA_DEVICE(0x3185, info)
+
 #define INTEL_KBL_GT1_IDS(info)	\
 	INTEL_VGA_DEVICE(0x5913, info), /* ULT GT1.5 */ \
 	INTEL_VGA_DEVICE(0x5915, info), /* ULX GT1.5 */ \
@@ -336,8 +326,4 @@
 	INTEL_KBL_GT3_IDS(info), \
 	INTEL_KBL_GT4_IDS(info)
 
-#define INTEL_GLK_IDS(info) \
-	INTEL_VGA_DEVICE(0x3184, info), \
-	INTEL_VGA_DEVICE(0x3185, info)
-
 #endif /* _I915_PCIIDS_H */
diff --git a/src/intel_module.c b/src/intel_module.c
index 6b04857..2e97b5e 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -349,23 +349,13 @@ static const struct pci_id_match intel_device_match[] = {
 	INTEL_IVB_D_IDS(&intel_ivybridge_info),
 	INTEL_IVB_M_IDS(&intel_ivybridge_info),
 
-	INTEL_HSW_D_IDS(&intel_haswell_info),
-	INTEL_HSW_M_IDS(&intel_haswell_info),
-
-	INTEL_VLV_D_IDS(&intel_valleyview_info),
-	INTEL_VLV_M_IDS(&intel_valleyview_info),
-
-	INTEL_BDW_D_IDS(&intel_broadwell_info),
-	INTEL_BDW_M_IDS(&intel_broadwell_info),
-
+	INTEL_HSW_IDS(&intel_haswell_info),
+	INTEL_VLV_IDS(&intel_valleyview_info),
+	INTEL_BDW_IDS(&intel_broadwell_info),
 	INTEL_CHV_IDS(&intel_cherryview_info),
-
 	INTEL_SKL_IDS(&intel_skylake_info),
-
 	INTEL_BXT_IDS(&intel_broxton_info),
-
 	INTEL_KBL_IDS(&intel_kabylake_info),
-
 	INTEL_GLK_IDS(&intel_geminilake_info),
 
 	INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
diff --git a/test/dri3-test.c b/test/dri3-test.c
index 7e98f95..78e105a 100644
--- a/test/dri3-test.c
+++ b/test/dri3-test.c
@@ -93,14 +93,9 @@ static const struct pci_id_match ids[] = {
 	INTEL_IVB_D_IDS(070),
 	INTEL_IVB_M_IDS(070),
 
-	INTEL_HSW_D_IDS(075),
-	INTEL_HSW_M_IDS(075),
-
-	INTEL_VLV_D_IDS(071),
-	INTEL_VLV_M_IDS(071),
-
-	INTEL_BDW_D_IDS(0100),
-	INTEL_BDW_M_IDS(0100),
+	INTEL_HSW_IDS(075),
+	INTEL_VLV_IDS(071),
+	INTEL_BDW_IDS(0100),
 };
 
 static int i915_gen(int device)

commit 880917deeefef068b6d6c01e04c1d9bfa64ae2db
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 25 16:21:03 2016 +0100

    sna: Check link-status after a hotplug event
    
    If the modeset fails, or the link subsequently fails, we need to perform
    the modeset again. To signal this the kernel sends us a hotplug uevent
    with a new link-status property set to bad. The kernel may have to take
    some corrective action which invalidates the current mode and so the
    following modeset may fail and we need to go and report to the client
    for them to choose the next course of action (reconfigure the displays).
    At the very least the kernel *requires* us to reapply the current mode.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 73a7069..573869e 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -257,6 +257,8 @@ struct sna_output {
 	int connector_type;
 	int connector_type_id;
 
+	uint32_t link_status_idx;
+
 	uint32_t edid_idx;
 	uint32_t edid_blob_id;
 	uint32_t edid_len;
@@ -311,6 +313,8 @@ enum { /* XXX copied from hw/xfree86/modes/xf86Crtc.c */
 
 static void __sna_output_dpms(xf86OutputPtr output, int dpms, int fixup);
 static void sna_crtc_disable_cursor(struct sna *sna, struct sna_crtc *crtc);
+static bool sna_crtc_flip(struct sna *sna, struct sna_crtc *crtc,
+			  struct kgem_bo *bo, int x, int y);
 
 static bool is_zaphod(ScrnInfoPtr scrn)
 {
@@ -5140,6 +5144,8 @@ reset:
 	sna_output->id = compat_conn.conn.connector_id;
 	sna_output->is_panel = is_panel(compat_conn.conn.connector_type);
 	sna_output->edid_idx = find_property(sna, sna_output, "EDID");
+	sna_output->link_status_idx =
+		find_property(sna, sna_output, "link-status");
 	if (find_property(sna, sna_output, "scaling mode") != -1)
 		sna_output->add_default_modes =
 			xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE);
@@ -5303,6 +5309,45 @@ bool sna_mode_find_hotplug_connector(struct sna *sna, unsigned id)
 }
 
 static bool
+output_retrain_link(struct sna *sna, struct sna_output *output)
+{
+	struct sna_crtc *crtc = to_sna_crtc(output->base->crtc);
+	int crtc_x = crtc->offset & 0xffff;
+	int crtc_y = crtc->offset >> 16;
+
+	return sna_crtc_flip(sna, crtc, crtc->bo, crtc_x, crtc_y);
+}
+
+static bool
+output_check_link(struct sna *sna, struct sna_output *output)
+{
+	uint64_t link_status;
+
+	if (!output->base->crtc)
+		return true;
+
+	if (output->link_status_idx == -1)
+		return true;
+
+#define LINK_STATUS_GOOD 0
+	link_status = output->prop_values[output->link_status_idx];
+	DBG(("%s: link_status=%d\n", __FUNCTION__, link_status));
+	if (link_status == LINK_STATUS_GOOD)
+		return true;
+
+	/* Perform a modeset as required for "link-status" = BAD */
+	if (!output_retrain_link(sna, output))
+		return false;
+
+	/* Query the "link-status" again to confirm the modeset */
+	update_properties(sna, output);
+
+	link_status = output->prop_values[output->link_status_idx];
+	DBG(("%s: link_status=%d after modeset\n", __FUNCTION__, link_status));
+	return link_status == LINK_STATUS_GOOD;
+}
+
+static bool
 output_check_status(struct sna *sna, struct sna_output *output)
 {
 	union compat_mode_get_connector compat_conn;
@@ -5311,9 +5356,6 @@ output_check_status(struct sna *sna, struct sna_output *output)
 	xf86OutputStatus status;
 	char *edid;
 
-	if (output->reprobe)
-		return false;
-
 	VG_CLEAR(compat_conn);
 
 	compat_conn.conn.connection = -1;
@@ -5330,6 +5372,12 @@ output_check_status(struct sna *sna, struct sna_output *output)
 		     &compat_conn.conn) == 0)
 		output->update_properties = false;
 
+	if (!output_check_link(sna, output))
+		return false;
+
+	if (output->reprobe)
+		return false;
+
 	switch (compat_conn.conn.connection) {
 	case DRM_MODE_CONNECTED:
 		status = XF86OutputStatusConnected;

commit 860c3664fe79c1fe92095ff345068f1fc7e4e651
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Feb 16 07:36:22 2017 +0000

    backlight: Provide backlight_find_for_device() stub for BSD
    
    BSD implements a single backlight controller interface and doesn't need
    the sysfs searching of Linux. Just report that there is no per-device
    backlight to fallback to using the ioctl (and in the process avoid
    calling undefined functions inside the BSD block).
    
    Reported-by: David Shao <davshao@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99833

diff --git a/src/backlight.c b/src/backlight.c
index 3cba577..fcbb279 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -129,6 +129,11 @@ int backlight_get(struct backlight *b)
 	return param.curval;
 }
 
+char *backlight_find_for_device(struct pci_device *pci)
+{
+	return NULL;
+}
+
 int backlight_open(struct backlight *b, char *iface)
 {
 	struct wsdisplay_param param;
@@ -167,6 +172,7 @@ int backlight_off(struct backlight *b)
 {
 	return 0;
 }
+
 #else
 
 static int
@@ -441,6 +447,46 @@ __backlight_find(void)
 	return best_iface;
 }
 
+char *backlight_find_for_device(struct pci_device *pci)
+{
+	char path[200];
+	unsigned best_type = INT_MAX;
+	char *best_iface = NULL;
+	DIR *dir;
+	struct dirent *de;
+
+	snprintf(path, sizeof(path),
+		 "/sys/bus/pci/devices/%04x:%02x:%02x.%d/backlight",
+		 pci->domain, pci->bus, pci->dev, pci->func);
+
+	dir = opendir(path);
+	if (dir == NULL)
+		return NULL;
+
+	while ((de = readdir(dir))) {
+		int v;
+
+		if (*de->d_name == '.')
+			continue;
+
+		v = __backlight_exists(de->d_name);
+		if (v < 0)
+			continue;
+
+		if (v < best_type) {
+			char *copy = strdup(de->d_name);
+			if (copy) {
+				free(best_iface);
+				best_iface = copy;
+				best_type = v;
+			}
+		}
+	}
+	closedir(dir);
+
+	return best_iface;
+}
+
 int backlight_open(struct backlight *b, char *iface)
 {
 	int level, type;
@@ -547,43 +593,3 @@ void backlight_close(struct backlight *b)
 	if (b->pid > 0)
 		waitpid(b->pid, NULL, 0);
 }
-
-char *backlight_find_for_device(struct pci_device *pci)
-{
-	char path[200];
-	unsigned best_type = INT_MAX;
-	char *best_iface = NULL;
-	DIR *dir;
-	struct dirent *de;
-
-	snprintf(path, sizeof(path),
-		 "/sys/bus/pci/devices/%04x:%02x:%02x.%d/backlight",
-		 pci->domain, pci->bus, pci->dev, pci->func);
-
-	dir = opendir(path);
-	if (dir == NULL)
-		return NULL;
-
-	while ((de = readdir(dir))) {
-		int v;
-
-		if (*de->d_name == '.')
-			continue;
-
-		v = __backlight_exists(de->d_name);
-		if (v < 0)
-			continue;
-
-		if (v < best_type) {
-			char *copy = strdup(de->d_name);
-			if (copy) {
-				free(best_iface);
-				best_iface = copy;
-				best_type = v;
-			}
-		}
-	}
-	closedir(dir);
-
-	return best_iface;
-}

commit 93942b7de84ad16d34fac4b80bde6aec55786e05
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Wed Dec 7 10:33:34 2016 -0500

    tools/backlight_helper: #include "config.h"
    
    The file uses defines from config.h but never actually includes it.
    
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/tools/backlight_helper.c b/tools/backlight_helper.c
index a00f0d6..aadb8fa 100644
--- a/tools/backlight_helper.c
+++ b/tools/backlight_helper.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>

commit e4fe79cf0d9a05ee3f3a027148ef0aeb2b1b34e1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Feb 5 22:24:04 2017 +0000

    sna/gen2: Take combined vertex arrays into account for inline limit
    
    When extending the vertex array, we have to remove the currently used
    inlined dwords from the available limit.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 11e8e52..49ad16a 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1166,9 +1166,6 @@ 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));
 
@@ -1203,7 +1200,13 @@ inline static int gen2_get_rectangles(struct sna *sna,
 			sna->render.vertex_offset = sna->kgem.nbatch;
 			BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
 		}
-	}
+
+		need = 0;
+	} else
+		need = sna->kgem.nbatch - sna->render.vertex_offset;
+
+	if (rem > MAX_INLINE - need)
+		rem = MAX_INLINE -need;
 
 	if (want > 1 && want * size > rem)
 		want = rem / size;

commit 38ac6b556dae914325980d135a81719c9dfda000
Author: Chris Wilson <chris@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@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@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;
 	}

commit 9fe04af4bce3057e3e94a6bf36a3d8d2e48d592c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Feb 1 10:00:52 2017 +0000

    sna: Explicitly disable unused CRTC
    
    This should be performed via DisableUnusedFunctions, but whilst we are
    sanity checking, checking that the CRTC we believe to be off actually
    are seems worthwhile.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 162686f..a31e0e5 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5259,8 +5259,10 @@ static bool disable_unused_crtc(struct sna *sna)
 	for (c = 0; c < sna->mode.num_real_crtc; c++) {
 		xf86CrtcPtr crtc = config->crtc[c];
 
-		if (!crtc->enabled)
+		if (!crtc->enabled) {
+			sna_crtc_disable(crtc, false);
 			continue;
+		}
 
 		for (o = 0; o < sna->mode.num_real_output; o++) {
 			xf86OutputPtr output = config->output[o];

commit fe0846b1e17da02ebb6f0925449a90c914e4f0a1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Feb 1 09:03:22 2017 +0000

    sna: Remove bogus assert that the connector is a zombie before reattaching
    
    To know that the connector was unplugged before we discover it was
    plugged back in again, requires handing the unplug notification in time.
    This does not always happen and we may see the reattachment instead.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99432
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 17c45c5..162686f 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5095,7 +5095,6 @@ sna_output_add(struct sna *sna, unsigned id, unsigned serial)
 			if (strcmp(output->name, name) == 0) {
 				assert(output->scrn == scrn);
 				assert(output->funcs == &sna_output_funcs);
-				assert(to_sna_output(output)->id == 0);
 				sna_output_destroy(output);
 				goto reset;
 			}

commit 2da23747c68cf5af40eb80a90cd0ee5cfe64bbf9
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Feb 1 09:01:52 2017 +0000

    sna: Force CRTC off when DP-MST are unplugged
    
    New? modus operandi of the kernel is to keep the DP-MST around after it
    is unplugged until the last remaining user is gone - that includes our
    residual modeset.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 1b271ab..17c45c5 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5457,9 +5457,15 @@ 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;
 	}

commit 2d6f2e8b7092a36a623aea5f46eb6a15eb838aac
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Thu Jan 26 14:00:21 2017 +1000

    autogen: add default patch prefix
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>

diff --git a/autogen.sh b/autogen.sh
index 0006de8..f129a4c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,9 @@ cd "$srcdir"
 autoreconf -v --install || exit 1
 cd "$ORIGDIR" || exit $?
 
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+    git config --local format.subjectPrefix "PATCH xf86-video-intel"
+
 if test -z "$NOCONFIGURE"; then
     exec "$srcdir"/configure "$@"
 fi

commit 2e6c9e26c0f60278e509a158211e87e10b369559
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon Mar 9 12:00:52 2015 +0000

    autogen.sh: use quoted string variables
    
    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
    fall-outs, when they contain space.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/autogen.sh b/autogen.sh
index fd9c59a..0006de8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,14 @@
 #! /bin/sh
 
-srcdir=`dirname $0`
+srcdir=`dirname "$0"`
 test -z "$srcdir" && srcdir=.
 
 ORIGDIR=`pwd`
-cd $srcdir
+cd "$srcdir"
 
 autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
+cd "$ORIGDIR" || exit $?
 
 if test -z "$NOCONFIGURE"; then
-    exec $srcdir/configure "$@"
+    exec "$srcdir"/configure "$@"
 fi

commit dd913354e6bd4ff15ad6852115249fc25b8f6bcc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 24 10:32:07 2017 +1000

    autogen.sh: use exec instead of waiting for configure to finish
    
    Syncs the invocation of configure with the one from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/autogen.sh b/autogen.sh
index fc34bd5..fd9c59a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,5 +10,5 @@ autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
 if test -z "$NOCONFIGURE"; then
-    $srcdir/configure "$@"
+    exec $srcdir/configure "$@"
 fi

commit 028c946df0855728b2a34d1d588701dc6c5ad4c1
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Tue Jan 3 12:58:31 2017 -0800

    intel: Update SKL SRV GT4 pci ids reference.
    
    No functional changes. Apparently spec has been changed
    the valid table showing 0x192A as Server GT4
    while 0x193A is Server GT4e.
    
    Libdrm and Mesa already have this right. So let's fix the ref here.
    
    Kernel is also fixed with commit 5390974f981907.
    "drm/i915: Update SKL SRV GT4 pci ids reference."
    
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Ben Widawsky <benjamin.widawsky@intel.com>
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

diff --git a/src/i915_pciids.h b/src/i915_pciids.h
index e1f46bb..0370f83 100644
--- a/src/i915_pciids.h
+++ b/src/i915_pciids.h
@@ -280,14 +280,14 @@
 	INTEL_VGA_DEVICE(0x1923, info), /* ULT GT3 */ \
 	INTEL_VGA_DEVICE(0x1926, info), /* ULT GT3 */ \
 	INTEL_VGA_DEVICE(0x1927, info), /* ULT GT3 */ \
-	INTEL_VGA_DEVICE(0x192B, info), /* Halo GT3 */ \
-	INTEL_VGA_DEVICE(0x192A, info)  /* SRV GT3 */
+	INTEL_VGA_DEVICE(0x192B, info)  /* Halo GT3 */ \
 
 #define INTEL_SKL_GT4_IDS(info) \
 	INTEL_VGA_DEVICE(0x1932, info), /* DT GT4 */ \
 	INTEL_VGA_DEVICE(0x193B, info), /* Halo GT4 */ \
 	INTEL_VGA_DEVICE(0x193D, info), /* WKS GT4 */ \
-	INTEL_VGA_DEVICE(0x193A, info)  /* SRV GT4 */
+	INTEL_VGA_DEVICE(0x192A, info), /* SRV GT4 */ \
+	INTEL_VGA_DEVICE(0x193A, info)  /* SRV GT4e */
 
 #define INTEL_SKL_IDS(info)	 \
 	INTEL_SKL_GT1_IDS(info), \


Reply to: