xserver-xorg-video-intel: Changes to 'debian-unstable'
debian/changelog | 11 +++++++
debian/patches/fail-probe-if-no-kms.diff | 40 --------------------------
debian/patches/series | 1
src/intel_driver.c | 35 -----------------------
src/intel_module.c | 46 ++++++++++++++++++++++++++++---
5 files changed, 53 insertions(+), 80 deletions(-)
New commits:
commit a50928e5d6a8e239ae5649c527d7a2df07a557c5
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Dec 18 20:22:33 2010 +0100
changelog entry
diff --git a/debian/changelog b/debian/changelog
index 47a7170..265e396 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+xserver-xorg-video-intel (2:2.13.0-5) UNRELEASED; urgency=low
+
+ * Drop the intel_pci_probe patch from -4 (closes: #606288). This relied on
+ i915.ko getting loaded automatically, which doesn't happen if:
+ - the kernel is built without CONFIG_DRM_I915_KMS and lacks modaliases, or
+ - the user kept obsolete /etc/modprobe.d blacklists around.
+ * Use the patch from upstream instead, which tries to load the kernel driver
+ before testing for kms.
+
+ -- Julien Cristau <jcristau@debian.org> Sat, 18 Dec 2010 20:17:18 +0100
+
xserver-xorg-video-intel (2:2.13.0-4) unstable; urgency=low
[ Julien Cristau ]
commit 20af913400bd0d847f36da4b5253b737335db1d8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Oct 2 13:32:58 2010 +0100
Do not claim the PCI device if !KMS
By returning FALSE whilst probing if we can't find a KMS driver, we
allow X to fallback to trying the VESA driver -- rather than failing.
The initial idea for this was by Julien Cristau.
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 455f2939a661764ebb8d1747d44e16a0a8937808)
diff --git a/src/intel_driver.c b/src/intel_driver.c
index d086d94..26bdc6a 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -262,33 +262,6 @@ static void PreInitCleanup(ScrnInfoPtr scrn)
scrn->driverPrivate = NULL;
}
-/*
- * DRM mode setting Linux only at this point... later on we could
- * add a wrapper here.
- */
-static Bool intel_kernel_mode_enabled(ScrnInfoPtr scrn)
-{
- struct pci_device *dev;
- char id[20];
- int ret;
-
- dev = xf86GetPciInfoForEntity(xf86GetEntityInfo(scrn->entityList[0])->index);
- snprintf(id, sizeof(id),
- "pci:%04x:%02x:%02x.%d",
- dev->domain, dev->bus, dev->dev, dev->func);
-
- ret = drmCheckModesettingSupported(id);
- if (ret) {
- if (xf86LoadKernelModule("i915"))
- ret = drmCheckModesettingSupported(id);
- }
- /* Be nice to the user and load fbcon too */
- if (!ret)
- (void)xf86LoadKernelModule("fbcon");
-
- return ret == 0;
-}
-
static void intel_check_chipset_option(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
@@ -513,18 +486,10 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
EntityInfoPtr pEnt;
int flags24;
Gamma zeros = { 0.0, 0.0, 0.0 };
- int drm_mode_setting;
if (scrn->numEntities != 1)
return FALSE;
- drm_mode_setting = intel_kernel_mode_enabled(scrn);
- if (!drm_mode_setting) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "No kernel modesetting driver detected.\n");
- return FALSE;
- }
-
pEnt = xf86GetEntityInfo(scrn->entityList[0]);
if (flags & PROBE_DETECT)
diff --git a/src/intel_module.c b/src/intel_module.c
index 53e1cb6..8fd55ed 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -37,6 +37,8 @@
#include "intel_driver.h"
#include "legacy/legacy.h"
+#include <xf86drmMode.h>
+
static const SymTabRec _intel_chipsets[] = {
{PCI_CHIP_I810, "i810"},
{PCI_CHIP_I810_DC100, "i810-dc100"},
@@ -361,6 +363,27 @@ static Bool intel_driver_func(ScrnInfoPtr pScrn,
}
}
+static Bool has_kernel_mode_setting(struct pci_device *dev)
+{
+ char id[20];
+ int ret;
+
+ snprintf(id, sizeof(id),
+ "pci:%04x:%02x:%02x.%d",
+ dev->domain, dev->bus, dev->dev, dev->func);
+
+ ret = drmCheckModesettingSupported(id);
+ if (ret) {
+ if (xf86LoadKernelModule("i915"))
+ ret = drmCheckModesettingSupported(id);
+ }
+ /* Be nice to the user and load fbcon too */
+ if (!ret)
+ (void)xf86LoadKernelModule("fbcon");
+
+ return ret == 0;
+}
+
/*
* intel_pci_probe --
*
@@ -373,11 +396,26 @@ static Bool intel_pci_probe (DriverPtr driver,
struct pci_device *device,
intptr_t match_data)
{
- ScrnInfoPtr scrn = NULL;
+ ScrnInfoPtr scrn;
+
+ if (!has_kernel_mode_setting(device)) {
+#if KMS_ONLY
+ return FALSE;
+#else
+ switch (DEVICE_ID(device)) {
+ case PCI_CHIP_I810:
+ case PCI_CHIP_I810_DC100:
+ case PCI_CHIP_I810_E:
+ case PCI_CHIP_I815:
+ break;
+ default:
+ return FALSE;
+ }
+#endif
+ }
- scrn = xf86ConfigPciEntity(scrn, 0, entity_num, intel_pci_chipsets,
- NULL,
- NULL, NULL, NULL, NULL);
+ scrn = xf86ConfigPciEntity(NULL, 0, entity_num, intel_pci_chipsets,
+ NULL, NULL, NULL, NULL, NULL);
if (scrn != NULL) {
scrn->driverVersion = INTEL_VERSION;
scrn->driverName = INTEL_DRIVER_NAME;
commit e4f65e77438e40b85f6c5d4a2f0657ed10a1a322
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Dec 18 20:16:46 2010 +0100
Drop the 'fail probe if no kms' patch
diff --git a/debian/patches/fail-probe-if-no-kms.diff b/debian/patches/fail-probe-if-no-kms.diff
deleted file mode 100644
index c88f9cb..0000000
--- a/debian/patches/fail-probe-if-no-kms.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-From a2b44cc8d4a9182becaaa00eda1ad3adcea92ee3 Mon Sep 17 00:00:00 2001
-From: Julien Cristau <jcristau@debian.org>
-Date: Thu, 23 Sep 2010 17:17:05 +0200
-Subject: [PATCH] intel_pci_probe: bail if there's no KMS
-
-This allows fallback to vesa when there's no kernel driver bound to the
-intel pci device.
----
- src/intel_module.c | 11 +++++++++++
- 1 files changed, 11 insertions(+), 0 deletions(-)
-
-diff --git a/src/intel_module.c b/src/intel_module.c
-index 53e1cb6..7356ab8 100644
---- a/src/intel_module.c
-+++ b/src/intel_module.c
-@@ -374,6 +374,21 @@ static Bool intel_pci_probe (DriverPtr driver,
- intptr_t match_data)
- {
- ScrnInfoPtr scrn = NULL;
-+ if (!pci_device_has_kernel_driver(device))
-+#if KMS_ONLY
-+ return FALSE;
-+#else
-+ switch (DEVICE_ID(device)) {
-+ case PCI_CHIP_I810:
-+ case PCI_CHIP_I810_DC100:
-+ case PCI_CHIP_I810_E:
-+ case PCI_CHIP_I815:
-+ break;
-+
-+ default:
-+ return FALSE;
-+ }
-+#endif
-
- scrn = xf86ConfigPciEntity(scrn, 0, entity_num, intel_pci_chipsets,
- NULL,
---
-1.7.1
-
diff --git a/debian/patches/series b/debian/patches/series
index ed16c3f..7732e96 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
i8xx-shadow.diff
libdrm-from-sid-is-ok.diff
revert-display-outputs-are-enabled-automatically.diff
-fail-probe-if-no-kms.diff
Reply to: