diff options
author | Adam Jackson <ajax@redhat.com> | 2012-07-19 18:22:44 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2012-08-15 13:25:48 -0400 |
commit | 9b9be11e99930136a591059db1bf4ceaca8806e7 (patch) | |
tree | 3183e50ed5f844d74aec939c73c5e71e6ee85e4d | |
parent | 6629066b87142cdd1d9e881b61ef55c97aedf949 (diff) | |
download | xorg-driver-xf86-video-nouveau-9b9be11e99930136a591059db1bf4ceaca8806e7.tar.gz |
Implement ->driverFunc
Copied from fbdev, makes it so we can run without iopl.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | 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..4e1e8a1 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) { |