[RFC] xserver: add SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS
Rob Clark
robdclark at gmail.com
Mon Jun 16 08:05:53 PDT 2014
Give the DDX a way to know whether non-pci platform devices are
completley broken or not. For xserver prior to the fix, the
DDX should not claim a platform device in platformProbe(), as
the server will fallback to old ->Probe(), which will fail if
the device is already claimed. Meaning that a user could not
make things work even with a .conf file to explicitly specify
the driver to use.
---
hw/xfree86/common/xf86platformBus.c | 4 ++++
hw/xfree86/common/xf86str.h | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index bb4c71d..3af107e 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -410,6 +410,10 @@ xf86platformProbeDev(DriverPtr drvp)
const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
int i, j;
+ /* let driver know to expect non-pci platform devices to work: */
+ if (drvp->driverFunc)
+ drvp->driverFunc(NULL, SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, NULL);
+
/* find the main device or any device specificed in xorg.conf */
for (i = 0; i < numDevs; i++) {
for (j = 0; j < xf86_num_platform_devices; j++) {
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 4c2d147..969398d 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -256,7 +256,8 @@ typedef enum {
RR_GET_INFO,
RR_SET_CONFIG,
RR_GET_MODE_MM,
- GET_REQUIRED_HW_INTERFACES = 10
+ GET_REQUIRED_HW_INTERFACES = 10,
+ SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12,
} xorgDriverFuncOp;
typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, pointer);
--
1.9.3
More information about the xorg-devel
mailing list