aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.c15
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c27
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c27
-rw-r--r--xorg-server/hw/xfree86/common/xf86Priv.h1
5 files changed, 17 insertions, 54 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index bb2903da0..179b87cf5 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -55,6 +55,7 @@
extern _X_EXPORT int xf86DoConfigure;
extern _X_EXPORT int xf86DoShowOptions;
extern _X_EXPORT Bool xf86DoConfigurePass1;
+extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c
index 4ffbf7e46..e1015379b 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.c
+++ b/xorg-server/hw/xfree86/common/xf86Bus.c
@@ -117,27 +117,12 @@ xf86BusConfig(void)
screenLayoutPtr layout;
int i, j;
- /* Enable full I/O access */
- if (xorgHWAccess)
- xorgHWAccess = xf86EnableIO();
-
/*
* Now call each of the Probe functions. Each successful probe will
* result in an extra entry added to the xf86Screens[] list for each
* instance of the hardware found.
*/
for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xorgHWAccess) {
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
xf86CallDriverProbe(xf86DriverList[i], FALSE);
}
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 6f69117d3..6c5e35919 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -545,41 +545,16 @@ DoConfigure(void)
free(vlist);
- for (i = 0; i < xf86NumDrivers; i++) {
- xorgHWFlags flags;
-
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags)
- || NEED_IO_ENABLED(flags)) {
- xorgHWAccess = TRUE;
- break;
- }
- }
- /* Enable full I/O access */
- if (xorgHWAccess) {
- if (!xf86EnableIO())
- /* oops, we have failed */
- xorgHWAccess = FALSE;
- }
+ xorgHWAccess = xf86EnableIO();
/* Create XF86Config file structure */
xf86config = calloc(1, sizeof(XF86ConfigRec));
/* Call all of the probe functions, reporting the results. */
for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) {
- xorgHWFlags flags;
Bool found_screen;
DriverRec *const drv = xf86DriverList[CurrentDriver];
- if (!xorgHWAccess) {
- if (!drv->driverFunc
- || !drv->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags)
- || NEED_IO_ENABLED(flags))
- continue;
- }
-
found_screen = xf86CallDriverProbe(drv, TRUE);
if (found_screen && drv->Identify) {
(*drv->Identify) (0);
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index e4a6b8613..1695dbf74 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -402,6 +402,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
Bool pix24Fail = FALSE;
Bool autoconfig = FALSE;
Bool sigio_blocked = FALSE;
+ Bool want_hw_access = FALSE;
GDevPtr configured_device;
xf86Initialising = TRUE;
@@ -530,23 +531,21 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
*/
for (i = 0; i < xf86NumDrivers; i++) {
+ xorgHWFlags flags = HW_IO;
+
if (xf86DriverList[i]->Identify != NULL)
xf86DriverList[i]->Identify(0);
- if (!xorgHWAccess || !xorgHWOpenConsole) {
- xorgHWFlags flags;
+ if (xf86DriverList[i]->driverFunc)
+ xf86DriverList[i]->driverFunc(NULL,
+ GET_REQUIRED_HW_INTERFACES,
+ &flags);
- if (!xf86DriverList[i]->driverFunc
- || !xf86DriverList[i]->driverFunc(NULL,
- GET_REQUIRED_HW_INTERFACES,
- &flags))
- flags = HW_IO;
+ if (NEED_IO_ENABLED(flags))
+ want_hw_access = TRUE;
- if (NEED_IO_ENABLED(flags))
- xorgHWAccess = TRUE;
- if (!(flags & HW_SKIP_CONSOLE))
- xorgHWOpenConsole = TRUE;
- }
+ if (!(flags & HW_SKIP_CONSOLE))
+ xorgHWOpenConsole = TRUE;
}
if (xorgHWOpenConsole)
@@ -554,6 +553,10 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
else
xf86Info.dontVTSwitch = TRUE;
+ /* Enable full I/O access */
+ if (want_hw_access)
+ xorgHWAccess = xf86EnableIO();
+
if (xf86BusConfig() == FALSE)
return;
diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h
index c9f2e7eb8..58cfe0a1a 100644
--- a/xorg-server/hw/xfree86/common/xf86Priv.h
+++ b/xorg-server/hw/xfree86/common/xf86Priv.h
@@ -91,7 +91,6 @@ extern _X_EXPORT int xf86NumScreens;
extern _X_EXPORT const char *xf86VisualNames[];
extern _X_EXPORT int xf86Verbose; /* verbosity level */
extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */
-extern _X_EXPORT Bool xorgHWAccess;
extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;