Add video driver flag to indicate that console access is not needed.
Existing video drivers will get the console enabled by default. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
25979c46b4
commit
83d520d86c
|
@ -97,6 +97,7 @@ static Bool add_matching_devices_to_configure_list(DriverPtr drvp);
|
||||||
#ifdef XF86PM
|
#ifdef XF86PM
|
||||||
void (*xf86OSPMClose)(void) = NULL;
|
void (*xf86OSPMClose)(void) = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
static Bool xorgHWOpenConsole = FALSE;
|
||||||
|
|
||||||
/* Common pixmap formats */
|
/* Common pixmap formats */
|
||||||
|
|
||||||
|
@ -601,8 +602,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
|
||||||
if (xf86DoShowOptions)
|
if (xf86DoShowOptions)
|
||||||
DoShowOptions();
|
DoShowOptions();
|
||||||
|
|
||||||
xf86OpenConsole();
|
|
||||||
|
|
||||||
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
|
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
|
||||||
xf86BusProbe();
|
xf86BusProbe();
|
||||||
|
|
||||||
|
@ -676,20 +675,29 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = 0; i < xf86NumDrivers; i++) {
|
for (i = 0; i < xf86NumDrivers; i++) {
|
||||||
xorgHWFlags flags;
|
|
||||||
|
|
||||||
if (xf86DriverList[i]->Identify != NULL)
|
if (xf86DriverList[i]->Identify != NULL)
|
||||||
xf86DriverList[i]->Identify(0);
|
xf86DriverList[i]->Identify(0);
|
||||||
|
|
||||||
if (!xorgHWAccess
|
if (!xorgHWAccess || !xorgHWOpenConsole) {
|
||||||
&& (!xf86DriverList[i]->driverFunc
|
xorgHWFlags flags;
|
||||||
|
if(!xf86DriverList[i]->driverFunc
|
||||||
|| !xf86DriverList[i]->driverFunc(NULL,
|
|| !xf86DriverList[i]->driverFunc(NULL,
|
||||||
GET_REQUIRED_HW_INTERFACES,
|
GET_REQUIRED_HW_INTERFACES,
|
||||||
&flags)
|
&flags))
|
||||||
|| NEED_IO_ENABLED(flags)))
|
flags = HW_IO;
|
||||||
xorgHWAccess = TRUE;
|
|
||||||
|
if(NEED_IO_ENABLED(flags))
|
||||||
|
xorgHWAccess = TRUE;
|
||||||
|
if(!(flags & HW_SKIP_CONSOLE))
|
||||||
|
xorgHWOpenConsole = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xorgHWOpenConsole)
|
||||||
|
xf86OpenConsole();
|
||||||
|
else
|
||||||
|
xf86Info.dontVTSwitch = TRUE;
|
||||||
|
|
||||||
/* Enable full I/O access */
|
/* Enable full I/O access */
|
||||||
if (xorgHWAccess)
|
if (xorgHWAccess)
|
||||||
xorgHWAccess = xf86EnableIO();
|
xorgHWAccess = xf86EnableIO();
|
||||||
|
@ -966,7 +974,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
|
||||||
/*
|
/*
|
||||||
* serverGeneration != 1; some OSs have to do things here, too.
|
* serverGeneration != 1; some OSs have to do things here, too.
|
||||||
*/
|
*/
|
||||||
xf86OpenConsole();
|
if (xorgHWOpenConsole)
|
||||||
|
xf86OpenConsole();
|
||||||
|
|
||||||
#ifdef XF86PM
|
#ifdef XF86PM
|
||||||
/*
|
/*
|
||||||
|
@ -1203,7 +1212,8 @@ ddxGiveUp(void)
|
||||||
DGAShutdown();
|
DGAShutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xf86CloseConsole();
|
if (xorgHWOpenConsole)
|
||||||
|
xf86CloseConsole();
|
||||||
|
|
||||||
xf86CloseLog();
|
xf86CloseLog();
|
||||||
|
|
||||||
|
|
|
@ -299,6 +299,7 @@ typedef struct {
|
||||||
/* GET_REQUIRED_HW_INTERFACES */
|
/* GET_REQUIRED_HW_INTERFACES */
|
||||||
#define HW_IO 1
|
#define HW_IO 1
|
||||||
#define HW_MMIO 2
|
#define HW_MMIO 2
|
||||||
|
#define HW_SKIP_CONSOLE 4
|
||||||
#define NEED_IO_ENABLED(x) (x & HW_IO)
|
#define NEED_IO_ENABLED(x) (x & HW_IO)
|
||||||
|
|
||||||
typedef CARD32 xorgHWFlags;
|
typedef CARD32 xorgHWFlags;
|
||||||
|
|
Loading…
Reference in New Issue