debian/changelog | 7 + debian/control | 3 debian/patches/001_ubuntu_bail_when_kms_active.patch | 110 +++++++++++++++++++ debian/patches/series | 1 debian/rules | 4 5 files changed, 123 insertions(+), 2 deletions(-)
New commits: commit 9ead6d98f679d62d22d387a1d613be30bb79e02f Author: Julien Cristau <jcris...@debian.org> Date: Sat May 15 12:58:55 2010 +0200 Fix use of patch target diff --git a/debian/rules b/debian/rules index 0841d21..fd3faa3 100755 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,7 @@ endif # kbd_drv.a isn't phenomenally useful; kbd_drv.so more so confflags += --disable-static -configure: patch +configure: $(STAMP_DIR)/patch autoreconf -vfi build/config.status: configure commit f370146774ec24a183affa8f2aeceb7909cffa7c Author: Julien Cristau <jcris...@debian.org> Date: Sat May 15 12:58:16 2010 +0200 Add changelog entry diff --git a/debian/changelog b/debian/changelog index a8d1a11..743235c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-vesa (1:2.3.0-3) UNRELEASED; urgency=low + + * Add patch by Christopher James Halse Rogers from Ubuntu to bail in Probe + if kernel mode setting is enabled. + + -- Julien Cristau <jcris...@debian.org> Sat, 15 May 2010 12:55:19 +0200 + xserver-xorg-video-vesa (1:2.3.0-2) unstable; urgency=low [ Julien Cristau ] commit f990175956482ee41bcb77fe227caaf7ae6295bc Author: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Date: Thu Mar 25 09:43:29 2010 +1100 Add build-depends for the KMS detection support, so the patch actually has an effect! diff --git a/debian/control b/debian/control index 1149680..976e734 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,9 @@ Build-Depends: automake, libtool, xutils-dev (>= 1:7.5), - quilt + quilt, + libdrm-dev, + x11proto-xf86dri-dev Standards-Version: 3.8.4 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-vesa Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-vesa.git commit 5eefbf2dfb3815ed3e3de1e34400eb617f971daf Author: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Date: Wed Mar 24 21:18:13 2010 +1100 Add patch to keep VESA from loading when kernel modesetting is active diff --git a/debian/control b/debian/control index caeac34..1149680 100644 --- a/debian/control +++ b/debian/control @@ -16,6 +16,7 @@ Build-Depends: automake, libtool, xutils-dev (>= 1:7.5), + quilt Standards-Version: 3.8.4 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-vesa Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-vesa.git diff --git a/debian/patches/001_ubuntu_bail_when_kms_active.patch b/debian/patches/001_ubuntu_bail_when_kms_active.patch new file mode 100644 index 0000000..4d2880f --- /dev/null +++ b/debian/patches/001_ubuntu_bail_when_kms_active.patch @@ -0,0 +1,110 @@ +From c0416148852843e0dfa14c9219541543cbd6a41d Mon Sep 17 00:00:00 2001 +From: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> +Date: Wed, 24 Mar 2010 19:11:29 +1100 +Subject: [PATCH] Refuse to bind to a device which has kernel modesetting active. + . + Trying to program a VESA mode while kernel modesetting is active can + result in an improperly driven screen. +Bug: http://bugs.freedesktop.org/show_bug.cgi?id=26878 +Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-vesa/+bug/531736 +--- + configure.ac | 7 +++++++ + src/Makefile.am | 2 +- + src/vesa.c | 35 +++++++++++++++++++++++++++++++++++ + 3 files changed, 43 insertions(+), 1 deletions(-) + +Index: xserver-xorg-video-vesa/configure.ac +=================================================================== +--- xserver-xorg-video-vesa.orig/configure.ac 2010-03-24 19:33:01.000000000 +1100 ++++ xserver-xorg-video-vesa/configure.ac 2010-03-24 20:05:36.435067870 +1100 +@@ -93,7 +93,14 @@ + fi + AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) + +-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' ++if test "x$XSERVER_LIBPCIACCESS" = xyes; then ++ PKG_CHECK_MODULES(LIBDRM, [libdrm > 2.4.3 xf86driproto], HAVE_KMS="yes", HAVE_KMS="no") ++ if test "x$HAVE_KMS" = xyes; then ++ AC_DEFINE(HAVE_KMS, 1, [Have kernel modesetting]) ++ fi ++fi ++ ++CFLAGS="$CFLAGS $XORG_CFLAGS $LIBDRM_CFLAGS "' -I$(top_srcdir)/src' + INCLUDES="$XORG_INCS "'-I$(top_srcdir)/src' + AC_SUBST([CFLAGS]) + AC_SUBST([INCLUDES]) +@@ -103,6 +110,7 @@ + # Checks for header files. + AC_HEADER_STDC + ++ + DRIVER_NAME=vesa + AC_SUBST([DRIVER_NAME]) + +Index: xserver-xorg-video-vesa/src/vesa.c +=================================================================== +--- xserver-xorg-video-vesa.orig/src/vesa.c 2010-03-24 19:33:01.000000000 +1100 ++++ xserver-xorg-video-vesa/src/vesa.c 2010-03-24 20:04:53.113781642 +1100 +@@ -65,6 +65,10 @@ + #include <X11/extensions/dpms.h> + #endif + ++#ifdef HAVE_KMS ++#include <xf86drmMode.h> ++#include <dri.h> ++#endif + + /* Mandatory functions */ + static const OptionInfoRec * VESAAvailableOptions(int chipid, int busid); +@@ -106,6 +110,9 @@ + static void RestoreFonts(ScrnInfoPtr pScrn); + static Bool + VESASaveRestore(ScrnInfoPtr pScrn, vbeSaveRestoreFunction function); ++#ifdef HAVE_KMS ++static Bool VESAKernelModesettingEnabled (struct pci_device *device); ++#endif + + static void * + VESAWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, +@@ -317,6 +324,24 @@ + (double)(ddcmode->HTotal * ddcmode->VTotal)); + } + ++#ifdef HAVE_KMS ++static Bool VESAKernelModesettingEnabled (struct pci_device *device) ++{ ++ char *busIdString; ++ int ret; ++ ++ if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) ++ return FALSE; ++ ++ busIdString = DRICreatePCIBusID(device); ++ ++ ret = drmCheckModesettingSupported(busIdString); ++ xfree(busIdString); ++ ++ return (ret == 0); ++} ++#endif //HAVE_KMS ++ + static ModeStatus + VESAValidMode(int scrn, DisplayModePtr p, Bool flag, int pass) + { +@@ -428,6 +453,16 @@ + { + ScrnInfoPtr pScrn; + ++#ifdef HAVE_KMS ++ /* Trying to bring up a VESA mode while kernel modesetting is enabled ++ results in badness */ ++ if (VESAKernelModesettingEnabled (dev)) { ++ xf86Msg (X_ERROR, ++ "VESA: Kernel modesetting driver in use, refusing to load\n"); ++ return FALSE; ++ } ++#endif ++ + pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, + NULL, NULL, NULL, NULL, NULL); + if (pScrn != NULL) { diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..915ea3f --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +001_ubuntu_bail_when_kms_active.patch diff --git a/debian/rules b/debian/rules index 9c78993..0841d21 100755 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,7 @@ endif # kbd_drv.a isn't phenomenally useful; kbd_drv.so more so confflags += --disable-static -configure: +configure: patch autoreconf -vfi build/config.status: configure @@ -48,7 +48,7 @@ build-stamp: build/config.status cd build && $(MAKE) >$@ -clean: +clean: xsfclean dh_testdir dh_testroot rm -f build-stamp -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1odf5p-0003j8...@alioth.debian.org