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

xserver-xorg-video-intel: Changes to 'ubuntu-trusty'



 debian/changelog                                 |    6 
 debian/patches/disable-outputs-when-slaved.patch |  184 +++++++++++++++++++++++
 debian/patches/series                            |    1 
 3 files changed, 191 insertions(+)

New commits:
commit 99a92e981fd85eac7677dfb9bcb7d6cae1d91687
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Sep 22 11:26:53 2014 +0200

    Fix black screen with SNA. (LP: #1365695)

diff --git a/debian/changelog b/debian/changelog
index 4375206..7fa7a26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.99.910-0ubuntu1.2) UNRELEASED; urgency=low
+
+  * Fix black screen with SNA. (LP: #1365695)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Mon, 22 Sep 2014 11:26:22 +0200
+
 xserver-xorg-video-intel (2:2.99.910-0ubuntu1.1) trusty; urgency=medium
 
   * Backport fixes from upstream driver for fglrx and broadwell. (LP: #1359105)
diff --git a/debian/patches/disable-outputs-when-slaved.patch b/debian/patches/disable-outputs-when-slaved.patch
new file mode 100644
index 0000000..e2bfe33
--- /dev/null
+++ b/debian/patches/disable-outputs-when-slaved.patch
@@ -0,0 +1,184 @@
+commit d6830190bc9956f485db6c3420f7a4a79793a693
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Wed Jul 23 10:53:40 2014 +0100
+
+    sna: Disable all outputs when initializing as a slaved output provider
+    
+    When we are constructed as a slaved device, we need to disable all
+    outputs or else they are not correctly hooked into the master device
+    upon startup.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+--- a/src/intel_module.c
++++ b/src/intel_module.c
+@@ -531,7 +531,7 @@
+ 	scrn->driverVersion = INTEL_VERSION;
+ 	scrn->driverName = (char *)INTEL_DRIVER_NAME;
+ 	scrn->name = (char *)INTEL_NAME;
+-	scrn->driverPrivate = (void *)(match_data | 1);
++	scrn->driverPrivate = (void *)(match_data | (flags & XF86_ALLOCATE_GPU_SCREEN) | 2);
+ 	scrn->Probe = NULL;
+ 
+ 	if (xf86IsEntitySharable(entity_num))
+--- a/src/sna/sna.h
++++ b/src/sna/sna.h
+@@ -233,16 +233,17 @@
+ 	ScrnInfoPtr scrn;
+ 
+ 	unsigned flags;
+-#define SNA_NO_WAIT		0x1
+-#define SNA_NO_FLIP		0x2
++#define SNA_IS_SLAVED		0x1
++#define SNA_IS_HOSTED		0x2
+ #define SNA_NO_VSYNC		0x4
+ #define SNA_TRIPLE_BUFFER	0x8
+ #define SNA_TEAR_FREE		0x10
+ #define SNA_FORCE_SHADOW	0x20
+ #define SNA_FLUSH_GTT		0x40
+-#define SNA_IS_HOSTED		0x80
++#define SNA_NO_WAIT		0x80
+ #define SNA_PERFORMANCE		0x100
+ #define SNA_POWERSAVE		0x200
++#define SNA_NO_FLIP		0x400
+ #define SNA_REPROBE		0x80000000
+ 
+ 	unsigned cpu_features;
+--- a/src/sna/sna_display.c
++++ b/src/sna/sna_display.c
+@@ -3418,6 +3418,9 @@
+ 
+ 	assert((sna->flags & SNA_IS_HOSTED) == 0);
+ 
++	if (sna->flags & SNA_IS_SLAVED)
++		goto skip;
++
+ 	if (xf86ReturnOptValBool(sna->Options, OPTION_REPROBE, FALSE)) {
+ 		DBG(("%s: user requests reprobing\n", __FUNCTION__));
+ 		return false;
+@@ -3438,6 +3441,7 @@
+ 		}
+ 	}
+ 
++skip:
+ 	/* Copy the existing modes on each CRTCs */
+ 	for (i = 0; i < config->num_crtc; i++) {
+ 		xf86CrtcPtr crtc = config->crtc[i];
+@@ -3484,6 +3488,8 @@
+ 
+ 		crtc_id = (uintptr_t)output->crtc;
+ 		output->crtc = NULL;
++		if (sna->flags & SNA_IS_SLAVED)
++			continue;
+ 
+ 		if (crtc_id == 0)
+ 			continue;
+@@ -3543,7 +3549,7 @@
+ 	}
+ 
+ 	width = height = 0;
+-	for (i = 0; i < config->num_crtc; i++) {
++	for (i = 0; i < sna->mode.num_real_crtc; i++) {
+ 		xf86CrtcPtr crtc = config->crtc[i];
+ 		int w, h;
+ 
+--- a/src/sna/sna_driver.c
++++ b/src/sna/sna_driver.c
+@@ -441,7 +441,7 @@
+  * As a result, we want to set up that server initialization once rather
+  * that doing it per generation.
+  */
+-static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
++static Bool sna_pre_init(ScrnInfoPtr scrn, int probe)
+ {
+ 	struct sna *sna;
+ 	char buf[1024];
+@@ -451,7 +451,7 @@
+ 	int fd;
+ 
+ 	DBG(("%s flags=%x, numEntities=%d\n",
+-	     __FUNCTION__, flags, scrn->numEntities));
++	     __FUNCTION__, probe, scrn->numEntities));
+ 
+ 	if (scrn->numEntities != 1)
+ 		return FALSE;
+@@ -467,17 +467,19 @@
+ 		)
+ 		return FALSE;
+ 
+-	if (flags & PROBE_DETECT)
++	if (probe & PROBE_DETECT)
+ 		return TRUE;
+ 
+ 	sna_selftest();
+ 
+-	if (((uintptr_t)scrn->driverPrivate) & 1) {
++	probe = 0;
++	if (((uintptr_t)scrn->driverPrivate) & 3) {
+ 		if (posix_memalign((void **)&sna, 4096, sizeof(*sna)))
+ 			return FALSE;
+ 
+ 		memset(sna, 0, sizeof(*sna)); /* should be unnecessary */
+-		sna->info = (void *)((uintptr_t)scrn->driverPrivate & ~1);
++		probe = (uintptr_t)scrn->driverPrivate & 1;
++		sna->info = (void *)((uintptr_t)scrn->driverPrivate & ~3);
+ 		scrn->driverPrivate = sna;
+ 
+ 		sna->cpu_features = sna_cpu_detect();
+@@ -486,7 +488,7 @@
+ 	sna = to_sna(scrn);
+ 	sna->scrn = scrn;
+ 	sna->pEnt = pEnt;
+-	sna->flags = 0;
++	sna->flags = probe;
+ 
+ 	scrn->displayWidth = 640;	/* default it */
+ 
+@@ -629,7 +631,7 @@
+ 	return TRUE;
+ 
+ cleanup:
+-	scrn->driverPrivate = (void *)((uintptr_t)sna->info | 1);
++	scrn->driverPrivate = (void *)((uintptr_t)sna->info | (sna->flags & SNA_IS_SLAVED) | 2);
+ 	free(sna);
+ 	return FALSE;
+ }
+@@ -1085,10 +1087,10 @@
+ 	struct sna *sna = to_sna(scrn);
+ 
+ 	DBG(("%s\n", __FUNCTION__));
+-	if (sna == NULL || (uintptr_t)sna & 1) /* beware thieves */
++	if (sna == NULL || (uintptr_t)sna & 3) /* beware thieves */
+ 		return;
+ 
+-	scrn->driverPrivate = (void *)((uintptr_t)sna->info | 1);
++	scrn->driverPrivate = (void *)((uintptr_t)sna->info | (sna->flags & SNA_IS_SLAVED) | 2);
+ 
+ 	sna_mode_fini(sna);
+ 	sna_acpi_fini(sna);
+--- a/src/uxa/intel_driver.c
++++ b/src/uxa/intel_driver.c
+@@ -500,12 +500,12 @@
+ 	if (flags & PROBE_DETECT)
+ 		return TRUE;
+ 
+-	if (((uintptr_t)scrn->driverPrivate) & 1) {
++	if (((uintptr_t)scrn->driverPrivate) & 3) {
+ 		intel = xnfcalloc(sizeof(*intel), 1);
+ 		if (intel == NULL)
+ 			return FALSE;
+ 
+-		intel->info = (void *)((uintptr_t)scrn->driverPrivate & ~1);
++		intel->info = (void *)((uintptr_t)scrn->driverPrivate & ~3);
+ 		scrn->driverPrivate = intel;
+ 	}
+ 	intel = intel_get_screen_private(scrn);
+@@ -1088,7 +1088,7 @@
+ 	SCRN_INFO_PTR(arg);
+ 	intel_screen_private *intel = intel_get_screen_private(scrn);
+ 
+-	if (intel && !((uintptr_t)intel & 1)) {
++	if (intel && !((uintptr_t)intel & 3)) {
+ 		intel_mode_fini(intel);
+ 		intel_close_drm_master(intel);
+ 		intel_bufmgr_fini(intel);
diff --git a/debian/patches/series b/debian/patches/series
index 5192e8f..f6330ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ add-pci-ids-brw.diff
 add-names-brw.diff
 
 sna-freescreen.diff
+disable-outputs-when-slaved.patch


Reply to: