debian/patches/104_nvidia_autodetect.patch       |   41 ----------
 debian/patches/105_fglrx_autodetect.patch        |   21 -----
 debian/patches/105_nvidia_fglrx_autodetect.patch |   86 +++++++++++++++++++++++
 debian/patches/series                            |    3 
 4 files changed, 87 insertions(+), 64 deletions(-)

New commits:
commit a06d0a60a91b7eb2e6915a8721349106f5ed0e07
Author: Robert Hooker <robert.hoo...@canonical.com>
Date:   Wed Dec 1 10:45:03 2010 -0500

    Drop old nvidia/fglrx autodetection patches, replace with a working one 
that combines both.

diff --git a/debian/patches/104_nvidia_autodetect.patch 
b/debian/patches/104_nvidia_autodetect.patch
deleted file mode 100644
index ac3383b..0000000
--- a/debian/patches/104_nvidia_autodetect.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/hw/xfree86/common/xf86AutoConfig.c 
b/hw/xfree86/common/xf86AutoConfig.c
-index 19c06c8..e40551e 100644
---- a/hw/xfree86/common/xf86AutoConfig.c
-+++ b/hw/xfree86/common/xf86AutoConfig.c
-@@ -181,7 +181,34 @@ videoPtrToDriverList(struct pci_device *dev,
-       case 0x102b:                driverList[0] = "mga";      break;
-       case 0x10c8:                driverList[0] = "neomagic"; break;
-       case 0x105d:                driverList[0] = "i128";     break;
--      case 0x10de: case 0x12d2:   driverList[0] = "nv";       break;
-+      case 0x10de: case 0x12d2:
-+          switch (dev->device_id) {
-+          /* NV1 */
-+          case 0x0008:
-+          case 0x0009:
-+              driverList[0] = "vesa";
-+              break;
-+          /* NV3 */
-+          case 0x0018:
-+          case 0x0019:
-+              driverList[0] = "nv";
-+              break;
-+          default:
-+              switch (dev->device_id & 0xfff0) {
-+              /* Non-functional with both nouveau and nv */
-+              case 0x0840:
-+              case 0x0860:
-+                  driverList[0] = "nvidia";
-+                  driverList[1] = "vesa";
-+                  break;
-+              default:
-+                  driverList[0] = "nvidia";
-+                  driverList[1] = "nouveau";
-+                  driverList[2] = "nv";
-+                  break;
-+              }
-+              break;
-+          }
-       case 0x1163:                driverList[0] = "rendition"; break;
-       case 0x5333:
-           switch (dev->device_id)
-
diff --git a/debian/patches/105_fglrx_autodetect.patch 
b/debian/patches/105_fglrx_autodetect.patch
deleted file mode 100644
index 74e93e3..0000000
--- a/debian/patches/105_fglrx_autodetect.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Binary files patched/.git/index and working/.git/index differ
-diff -Nurp patched/hw/xfree86/common/xf86AutoConfig.c 
working/hw/xfree86/common/xf86AutoConfig.c
---- patched/hw/xfree86/common/xf86AutoConfig.c 2009-07-02 15:11:52.000000000 
-0700
-+++ working/hw/xfree86/common/xf86AutoConfig.c 2009-07-02 16:16:59.000000000 
-0700
-@@ -165,7 +165,15 @@ videoPtrToDriverList(struct pci_device *
-       case 0x1142:                driverList[0] = "apm"; break;
-       case 0xedd8:                driverList[0] = "ark"; break;
-       case 0x1a03:                driverList[0] = "ast"; break;
--      case 0x1002:                driverList[0] = "ati"; break;
-+      case 0x1002:
-+            /* Technical fglrx works only on 0x791e and newer, but
-+               if the user has it installed, -ati and -radeonhd
-+               probably won't work anyway so we may as well try it
-+               in case it randomly does work.  */
-+            driverList[0] = "fglrx"; /* Supports R600 and newer only */
-+            driverList[1] = "radeonhd";
-+            driverList[2] = "ati";
-+            break;
-       case 0x102c:                driverList[0] = "chips"; break;
-       case 0x1013:                driverList[0] = "cirrus"; break;
-       case 0x8086:
diff --git a/debian/patches/105_nvidia_fglrx_autodetect.patch 
b/debian/patches/105_nvidia_fglrx_autodetect.patch
new file mode 100644
index 0000000..b72ed0b
--- /dev/null
+++ b/debian/patches/105_nvidia_fglrx_autodetect.patch
@@ -0,0 +1,86 @@
+From 0366a844c36bf8424a2625425c181b9b97f35bee Mon Sep 17 00:00:00 2001
+From: Robert Hooker <sarv...@ubuntu.com>
+Date: Wed, 1 Sep 2010 13:23:21 -0400
+Subject: [PATCH] Attempt to get nvidia and fglrx working without an xorg.conf.
+
+Signed-off-by: Robert Hooker <sarv...@ubuntu.com>
+---
+ hw/xfree86/common/xf86AutoConfig.c |   12 +++++++++++-
+ hw/xfree86/common/xf86pciBus.c     |   14 +++++++++-----
+ 2 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86AutoConfig.c 
b/hw/xfree86/common/xf86AutoConfig.c
+index 8ef602d..a8f04b9 100644
+--- a/hw/xfree86/common/xf86AutoConfig.c
++++ b/hw/xfree86/common/xf86AutoConfig.c
+@@ -81,6 +81,13 @@
+       "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
+       "EndSection\n\n"
+ 
++#define BUILTIN_SCREEN_SECTION_PROPRIETARY \
++      "Section \"Screen\"\n" \
++      "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
++      "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
++      "\tDefaultDepth\t24\n" \
++      "EndSection\n\n"
++
+ #define BUILTIN_LAYOUT_SECTION_PRE \
+       "Section \"ServerLayout\"\n" \
+       "\tIdentifier\t\"Builtin Default Layout\"\n"
+@@ -159,7 +166,10 @@ xf86AutoConfig(void)
+     for (p = deviceList; *p; p++) {
+       snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
+       AppendToConfig(buf);
+-      snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);
++      if( strcmp(*p, "fglrx") == 0 || strcmp(*p, "nvidia") == 0)
++              snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION_PROPRIETARY, 
*p, 0, *p, 0);
++      else
++              snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 
0);
+       AppendToConfig(buf);
+     }
+ 
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index 930ed83..a6aa4f4 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1102,7 +1102,10 @@ videoPtrToDriverList(struct pci_device *dev,
+       case 0x1142:                driverList[0] = "apm"; break;
+       case 0xedd8:                driverList[0] = "ark"; break;
+       case 0x1a03:                driverList[0] = "ast"; break;
+-      case 0x1002:                driverList[0] = "ati"; break;
++      case 0x1002:
++          driverList[0] = "fglrx";
++          driverList[1] = "ati";
++          break;
+       case 0x102c:                driverList[0] = "chips"; break;
+       case 0x1013:                driverList[0] = "cirrus"; break;
+       case 0x3d3d:                driverList[0] = "glint"; break;
+@@ -1119,20 +1122,21 @@ videoPtrToDriverList(struct pci_device *dev,
+       case 0x102b:                driverList[0] = "mga";      break;
+       case 0x10c8:                driverList[0] = "neomagic"; break;
+       case 0x10de: case 0x12d2:
++          driverList[0] = "nvidia";
+           switch (dev->device_id) {
+           /* NV1 */
+           case 0x0008:
+           case 0x0009:
+-              driverList[0] = "vesa";
++              driverList[1] = "vesa";
+               break;
+           /* NV3 */
+           case 0x0018:
+           case 0x0019:
+-              driverList[0] = "nv";
++              driverList[1] = "nv";
+               break;
+           default:
+-              driverList[0] = "nouveau";
+-              driverList[1] = "nv";
++              driverList[1] = "nouveau";
++              driverList[2] = "nv";
+               break;
+           }
+           break;
+-- 
+1.7.2
+
diff --git a/debian/patches/series b/debian/patches/series
index b1b76b2..d640728 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,8 +8,7 @@
 15-nouveau.diff
 16-xaa-fbcomposite-fix-negative-size.diff
 100_rethrow_signals.patch
-#104_nvidia_autodetect.patch
-#105_fglrx_autodetect.patch
+#105_nvidia_fglrx_autodetect.patch
 111_armel-drv-fallbacks.patch
 121_only_switch_vt_when_active.diff
 122_xext_fix_card32_overflow_in_xauth.patch


-- 
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/e1pnosh-0000ly...@alioth.debian.org

Reply via email to