xserver-multidpi/hw/xfree86/os-support/linux/lnx.h
Egbert Eich 16f9d2d72a Let the OS instead of X save/restore text console fonts on Linux. So far we
relied on the generic VGA layer to restore text console fonts for us
    when shutting down the server or VT switching back to the text console.
    This has worked rather well but it has some downsides on Linux: a. Many
    people use fbdev as console text mode. In this case it is not necessary
    to save/restore console fonts as the console is running in graphics
    mode anyway. b. Some architectures don't have a fbdev console but
    require a full POST of even the primary card (ie. IA64). This posting
    has to take place before we even have a chance to save anything.
    Therefore the fonts we save are the once written to the chip by POST,
    not what has been programmed by the user. c. Certain chipsets utilize
    the BIOS to perform mode setting. This may interfer with the vga
    save/restore font function in a strange way. It would therefore be
    preferrable to let the OS - which has been used to set up the font in
    the first place - take care of saving/restoring the data. I will attach
    a patch which will do so for Linux. To make this fully functional a
    small patch needs to be applied to the Linux kernel. To disable this
    feature add: #define DoOSFontRestore NO to your host.def. (Bugzilla
    #2277)
2005-01-14 18:42:26 +00:00

52 lines
1.2 KiB
C

/* $XFree86: Exp $ */
#ifndef LNX_H_
# ifdef __alpha__
extern unsigned long _bus_base __P ((void)) __attribute__ ((const));
extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const));
extern int iopl __P ((int __level));
/* new pciconfig_iobase syscall added in 2.2.15 and 2.3.99 */
# include <linux/unistd.h>
# include <asm/pci.h>
extern long (*_iobase)(unsigned, int, int, int);
/*
* _iobase deals with the case the __NR_pciconfig_iobase is either undefined
* or unsupported by the kernel, but we need to make sure that the `which'
* argument symbols are defined.
*/
# ifndef IOBASE_HOSE
# define IOBASE_HOSE 0
# endif
# ifndef IOBASE_SPARSE_MEM
# define IOBASE_SPARSE_MEM 1
# endif
# ifndef IOBASE_DENSE_MEM
# define IOBASE_DENSE_MEM 2
# endif
# ifndef IOBASE_SPARSE_IO
# define IOBASE_SPARSE_IO 3
# endif
# ifndef IOBASE_DENSE_IO
# define IOBASE_DENSE_IO 4
# endif
# ifndef IOBASE_ROOT_BUS
# define IOBASE_ROOT_BUS 5
# endif
# ifndef IOBASE_FROM_HOSE
# define IOBASE_FROM_HOSE 0x10000
# endif
# endif /* __alpha__ */
# if defined(DO_OS_FONTRESTORE)
Bool lnx_savefont(void);
Bool lnx_restorefont(void);
Bool lnx_switchaway(void);
void lnx_freefontdata(void);
# endif
#define LNX_H_
#endif