[PATCH 03/12] xfree86: Remove xf86LinearVidMem
Adam Jackson
ajax at redhat.com
Tue Jul 29 12:00:10 PDT 2014
The only driver even pretending to check the result is mach64 anyway.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
hw/xfree86/os-support/bsd/alpha_video.c | 5 -----
hw/xfree86/os-support/bsd/arm_video.c | 6 ------
hw/xfree86/os-support/bsd/i386_video.c | 8 ++------
hw/xfree86/os-support/bsd/ppc_video.c | 1 -
hw/xfree86/os-support/bsd/sparc64_video.c | 1 -
hw/xfree86/os-support/hurd/hurd_video.c | 1 -
hw/xfree86/os-support/linux/lnx_video.c | 1 -
hw/xfree86/os-support/shared/vidmem.c | 7 -------
hw/xfree86/os-support/solaris/sun_vid.c | 5 -----
hw/xfree86/os-support/xf86OSpriv.h | 1 -
hw/xfree86/os-support/xf86_OSproc.h | 1 -
11 files changed, 2 insertions(+), 35 deletions(-)
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index 3aeae58..faa3a07 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -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");
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 95f4017..60f5bca 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -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;
}
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 526cf8a..2b2c2a3 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -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;
}
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index a624d4d..0cecd48 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -50,7 +50,6 @@ void xf86DisableIO(void);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
xf86EnableIO();
}
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index 3fd0315..b87afc1 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -41,7 +41,6 @@
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
}
diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
index 6485917..2a96393 100644
--- a/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/hw/xfree86/os-support/hurd/hurd_video.c
@@ -84,6 +84,5 @@ xf86DisableIO()
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->linearSupported = TRUE;
pVidMem->initialised = TRUE;
}
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 2efc9fd..018d921 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -94,7 +94,6 @@ static unsigned long bus_base;
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->linearSupported = TRUE;
#ifdef __alpha__
if (axpSystem == -1) {
axpSystem = lnxGetAXP();
diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index 0135867..1d4f6a9 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -134,10 +134,3 @@ xf86CheckMTRR(int ScreenNum)
return FALSE;
}
-
-Bool
-xf86LinearVidMem(void)
-{
- xf86InitVidMem();
- return vidMemInfo.linearSupported;
-}
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 1526ae7..bab449d 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -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;
}
diff --git a/hw/xfree86/os-support/xf86OSpriv.h b/hw/xfree86/os-support/xf86OSpriv.h
index 7240f14..ce1ec33 100644
--- a/hw/xfree86/os-support/xf86OSpriv.h
+++ b/hw/xfree86/os-support/xf86OSpriv.h
@@ -34,7 +34,6 @@
typedef struct {
Bool initialised;
- Bool linearSupported;
} VidMemInfo, *VidMemInfoPtr;
void xf86OSInitVidMem(VidMemInfoPtr);
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 747803c..5337d7b 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -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);
--
1.9.3
More information about the xorg-devel
mailing list