X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2F105_nvidia_fglrx_autodetect.patch;fp=debian%2Fpatches%2F105_nvidia_fglrx_autodetect.patch;h=1d082053941c8d03e8a8a1c6da95547e5e9d53d6;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/105_nvidia_fglrx_autodetect.patch b/debian/patches/105_nvidia_fglrx_autodetect.patch new file mode 100644 index 0000000..1d08205 --- /dev/null +++ b/debian/patches/105_nvidia_fglrx_autodetect.patch @@ -0,0 +1,53 @@ +diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c +index 43c746b..750b425 100644 +--- a/hw/xfree86/common/xf86AutoConfig.c ++++ b/hw/xfree86/common/xf86AutoConfig.c +@@ -75,6 +75,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" +@@ -153,7 +160,11 @@ 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 e52f1da..bd62a7e 100644 +--- a/hw/xfree86/common/xf86pciBus.c ++++ b/hw/xfree86/common/xf86pciBus.c +@@ -1107,7 +1107,8 @@ videoPtrToDriverList(struct pci_device *dev, + driverList[0] = "ast"; + break; + case 0x1002: +- driverList[0] = "ati"; ++ driverList[0] = "fglrx"; ++ driverList[1] = "ati"; + break; + case 0x102c: + driverList[0] = "chips"; +@@ -1143,6 +1144,7 @@ videoPtrToDriverList(struct pci_device *dev, + { + int idx = 0; + ++ driverList[idx++] = "nvidia"; + #ifdef __linux__ + driverList[idx++] = "nouveau"; + #endif