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

xserver-xorg-video-vesa: Changes to 'ubuntu'



 debian/changelog                                     |    2 
 debian/patches/001_ubuntu_bail_when_kms_active.patch |  110 -------------------
 debian/patches/100_bail_when_kms_active.patch        |  110 +++++++++++++++++++
 debian/patches/series                                |    2 
 4 files changed, 112 insertions(+), 112 deletions(-)

New commits:
commit 7c69f10e5e8dcf884f21799e96bc9a8efa15630b
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Thu Mar 25 09:51:15 2010 +1100

    Update patch name to match 100+ → Ubuntu patches convention

diff --git a/debian/changelog b/debian/changelog
index 6cef70b..27caa41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,7 @@ xserver-xorg-video-vesa (1:2.3.0-1ubuntu1) UNRELEASED; urgency=low
   * Remove myself from Uploaders
 
   [ Christopher James Halse Rogers ]
-  * debian/patches/001_ubuntu_bail_when_kms_active.patch:
+  * debian/patches/100_bail_when_kms_active.patch:
     + Fail to load when kernel modesetting is active (LP: #531736)
   
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Wed, 24 Mar 2010 20:09:47 +1100
diff --git a/debian/patches/001_ubuntu_bail_when_kms_active.patch b/debian/patches/001_ubuntu_bail_when_kms_active.patch
deleted file mode 100644
index 4d2880f..0000000
--- a/debian/patches/001_ubuntu_bail_when_kms_active.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From c0416148852843e0dfa14c9219541543cbd6a41d Mon Sep 17 00:00:00 2001
-From: Christopher James Halse Rogers <christopher.halse.rogers@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/100_bail_when_kms_active.patch b/debian/patches/100_bail_when_kms_active.patch
new file mode 100644
index 0000000..4d2880f
--- /dev/null
+++ b/debian/patches/100_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.rogers@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
index 915ea3f..4e7b8b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-001_ubuntu_bail_when_kms_active.patch
+100_bail_when_kms_active.patch


Reply to: