diff options
author | Egbert Eich <eich@suse.de> | 2005-01-28 16:12:59 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2005-01-28 16:12:59 +0000 |
commit | 73816949f2a28a0b8fe39108a8e493f9e47f7718 (patch) | |
tree | 7548754c21514c700188bae5bc2184395a5d388a | |
parent | 720c9b05f47c3529aa2561ab4c88319322893780 (diff) |
Modifying X.Org Xserver DDX to allow to run X with ordinary user
permissions when no access to HW registers is required. For API changes
which mostly involve the modifications to make the RRFunc (introduced
with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch
applies changes to OS specific files for other OSes which I cannot
test.
-rw-r--r-- | src/dummy_driver.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/dummy_driver.c b/src/dummy_driver.c index e36ecda..0760f1b 100644 --- a/src/dummy_driver.c +++ b/src/dummy_driver.c @@ -69,6 +69,9 @@ static Bool DUMMYSaveScreen(ScreenPtr pScreen, int mode); static Bool dummyModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); static void dummySave(ScrnInfoPtr pScrn); static void dummyRestore(ScrnInfoPtr pScrn, Bool restoreText); +static Bool dummyDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, + pointer ptr); + /* static void DUMMYDisplayPowerManagementSet(ScrnInfoPtr pScrn, */ /* int PowerManagementMode, int flags); */ @@ -103,7 +106,8 @@ DriverRec DUMMY = { DUMMYProbe, DUMMYAvailableOptions, NULL, - 0 + 0, + dummyDriverFunc }; static SymTabRec DUMMYChipsets[] = { @@ -175,7 +179,7 @@ dummySetup(pointer module, pointer opts, int *errmaj, int *errmin) if (!setupDone) { setupDone = TRUE; - xf86AddDriver(&DUMMY, module, 0); + xf86AddDriver(&DUMMY, module, HaveDriverFuncs); /* * Modules that this driver always requires can be loaded here @@ -817,3 +821,19 @@ DUMMYCreateWindow(WindowPtr pWin) } return TRUE; } + + +static Bool +dummyDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr) +{ + CARD32 *flag; + + switch (op) { + case GET_REQUIRED_HW_INTERFACES: + flag = (CARD32*)ptr; + (*flag) = 0; + return TRUE; + default: + return FALSE; + } +} |