xfree86: Remove xf86LinearVidMem

The only driver even pretending to check the result is mach64 anyway.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2014-05-02 12:39:01 -04:00
parent ec0e29ed5b
commit 96c0da812a
11 changed files with 2 additions and 35 deletions

View File

@ -132,7 +132,6 @@ dense_base(void)
"\trefer to xf86(4) for details"
#endif
static Bool useDevMem = FALSE;
static int devMemFd = -1;
#ifdef HAS_APERTURE_DRV
@ -164,7 +163,6 @@ checkDevMem(Bool warn)
if (base != MAP_FAILED) {
munmap((caddr_t) base, 4096);
devMemFd = fd;
useDevMem = TRUE;
xf86Msg(X_INFO, "checkDevMem: using aperture driver %s\n",
DEV_APERTURE);
return;
@ -185,7 +183,6 @@ checkDevMem(Bool warn)
if (base != MAP_FAILED) {
munmap((caddr_t) base, 4096);
devMemFd = fd;
useDevMem = TRUE;
return;
}
else {
@ -211,7 +208,6 @@ checkDevMem(Bool warn)
#endif
xf86ErrorF("\tlinear framebuffer access unavailable\n");
}
useDevMem = FALSE;
return;
}
@ -219,7 +215,6 @@ void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
checkDevMem(TRUE);
pVidMem->linearSupported = useDevMem;
if (has_bwx()) {
xf86Msg(X_PROBED, "Machine type has 8/16 bit access\n");

View File

@ -79,7 +79,6 @@
/* Video Memory Mapping section */
/***************************************************************************/
static Bool useDevMem = FALSE;
static int devMemFd = -1;
/*
@ -105,7 +104,6 @@ checkDevMem(Bool warn)
if (base != MAP_FAILED) {
munmap((caddr_t) base, 4096);
devMemFd = fd;
useDevMem = TRUE;
return;
}
else {
@ -114,7 +112,6 @@ checkDevMem(Bool warn)
xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n",
DEV_MEM, strerror(errno));
}
useDevMem = FALSE;
return;
}
}
@ -122,16 +119,13 @@ checkDevMem(Bool warn)
xf86Msg(X_WARNING, "checkDevMem: failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
}
useDevMem = FALSE;
return;
}
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
checkDevMem(TRUE);
pVidMem->linearSupported = useDevMem;
pVidMem->initialised = TRUE;
}

View File

@ -178,15 +178,11 @@ void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
checkDevMem(TRUE);
pVidMem->linearSupported = useDevMem;
if (useDevMem)
pci_system_init_dev_mem(devMemFd);
pci_system_init_dev_mem(devMemFd);
#ifdef HAS_MTRR_SUPPORT
if (useDevMem) {
cleanMTRR();
}
cleanMTRR();
#endif
pVidMem->initialised = TRUE;
}

View File

@ -50,7 +50,6 @@ void xf86DisableIO(void);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
xf86EnableIO();
}

View File

@ -41,7 +41,6 @@
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
}

View File

@ -84,6 +84,5 @@ xf86DisableIO()
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
}

View File

@ -94,7 +94,6 @@ static unsigned long bus_base;
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
pVidMem->linearSupported = TRUE;
#ifdef __alpha__
if (axpSystem == -1) {
axpSystem = lnxGetAXP();

View File

@ -134,10 +134,3 @@ xf86CheckMTRR(int ScreenNum)
return FALSE;
}
Bool
xf86LinearVidMem(void)
{
xf86InitVidMem();
return vidMemInfo.linearSupported;
}

View File

@ -110,11 +110,6 @@ solOpenAperture(void)
_X_HIDDEN void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
pVidMem->linearSupported = solOpenAperture();
if (!pVidMem->linearSupported) {
xf86MsgVerb(X_WARNING, 0,
"xf86OSInitVidMem: linear memory access disabled\n");
}
pVidMem->initialised = TRUE;
}

View File

@ -34,7 +34,6 @@
typedef struct {
Bool initialised;
Bool linearSupported;
} VidMemInfo, *VidMemInfoPtr;
void xf86OSInitVidMem(VidMemInfoPtr);

View File

@ -112,7 +112,6 @@
_XFUNCPROTOBEGIN
/* public functions */
extern _X_EXPORT Bool xf86LinearVidMem(void);
extern _X_EXPORT _X_DEPRECATED Bool xf86CheckMTRR(int);
extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *,
int);