Copied from fbdev, makes it so we can run without iopl.

Signed-off-by: Adam Jackson <[email protected]>
---
 src/nv_driver.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index beef789..9342dc8 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -48,6 +48,8 @@ static Bool    NVSaveScreen(ScreenPtr pScreen, int mode);
 static void    NVCloseDRM(ScrnInfoPtr);
 
 /* Optional functions */
+static Bool    NVDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op,
+                           void *data);
 static Bool    NVSwitchMode(SWITCH_MODE_ARGS_DECL);
 static void    NVAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 static void    NVFreeScreen(FREE_SCREEN_ARGS_DECL);
@@ -88,7 +90,7 @@ _X_EXPORT DriverRec NV = {
        NVAvailableOptions,
        NULL,
        0,
-       NULL,
+       NVDriverFunc,
        nouveau_device_match,
        NVPciProbe
 };
@@ -200,6 +202,21 @@ NVIdentify(int flags)
 }
 
 static Bool
+NVDriverFunc(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;
+    }
+}
+
+static Bool
 NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev,
           intptr_t match_data)
 {
-- 
1.7.7.6

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to