Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / xf86-inactive-gpuscreen.patch
diff --git a/debian/patches/xf86-inactive-gpuscreen.patch b/debian/patches/xf86-inactive-gpuscreen.patch
new file mode 100644 (file)
index 0000000..11ffec4
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index c790d50..a47c2d0 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -387,7 +387,7 @@ xf86platformProbeDev(DriverPtr drvp)
+     Bool foundScreen = FALSE;
+     GDevPtr *devList;
+     const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
+-    int i, j;
++    int i, j, flags;
+     /* find the main device or any device specificed in xorg.conf */
+     for (i = 0; i < numDevs; i++) {
+@@ -415,7 +415,11 @@ xf86platformProbeDev(DriverPtr drvp)
+         if (j == xf86_num_platform_devices)
+              continue;
+-        foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], 0);
++        flags = 0;
++        if (!devList[i]->active)
++            flags |= PLATFORM_PROBE_GPU_SCREEN;
++
++        foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], flags);
+         if (!foundScreen)
+             continue;
+     }