[PATCH modesetting] Implement ->driverFunc
Adam Jackson
ajax at redhat.com
Thu Jul 19 15:15:10 PDT 2012
Copied from fbdev, makes it so we can run without iopl.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
src/driver.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/src/driver.c b/src/driver.c
index ad817c4..7a81816 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -77,6 +77,8 @@ static Bool Probe(DriverPtr drv, int flags);
static Bool ms_pci_probe(DriverPtr driver,
int entity_num, struct pci_device *device,
intptr_t match_data);
+static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op,
+ void *data);
#ifdef XSERVER_LIBPCIACCESS
static const struct pci_id_match ms_device_match[] = {
@@ -97,7 +99,7 @@ _X_EXPORT DriverRec modesetting = {
AvailableOptions,
NULL,
0,
- NULL,
+ ms_driver_func,
ms_device_match,
ms_pci_probe,
};
@@ -248,6 +250,21 @@ AvailableOptions(int chipid, int busid)
return Options;
}
+static Bool
+ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
+{
+ xorgHWFlags *flag;
+
+ switch (op) {
+ case GET_REQUIRED_HW_INTERFACES:
+ flag = (CARD32 *)data;
+ (*flag) = 0;
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
#if XSERVER_LIBPCIACCESS
static Bool
ms_pci_probe(DriverPtr driver,
--
1.7.7.6
More information about the xorg-devel
mailing list