[PATCH 06/12] xfree86: Remove xf86CheckMTRR

Adam Jackson ajax at redhat.com
Tue Jul 29 12:00:13 PDT 2014


Die die die die die.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/os-support/shared/vidmem.c | 82 -----------------------------------
 hw/xfree86/os-support/xf86_OSproc.h   |  1 -
 2 files changed, 83 deletions(-)

diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index 1d4f6a9..a6bf677 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -42,72 +42,7 @@
  * This file contains the common part of the video memory mapping functions
  */
 
-/*
- * Get a piece of the ScrnInfoRec.  At the moment, this is only used to hold
- * the MTRR option information, but it is likely to be expanded if we do
- * auto unmapping of memory at VT switch.
- *
- */
-
-typedef struct {
-    Bool mtrrEnabled;
-    MessageType mtrrFrom;
-    Bool mtrrOptChecked;
-    ScrnInfoPtr pScrn;
-} VidMapRec, *VidMapPtr;
-
-static int vidMapIndex = -1;
-
-#define VIDMAPPTR(p) ((VidMapPtr)((p)->privates[vidMapIndex].ptr))
-
 static VidMemInfo vidMemInfo = { FALSE, };
-static VidMapRec vidMapRec = { TRUE, X_DEFAULT, FALSE, NULL };
-
-static VidMapPtr
-getVidMapRec(int scrnIndex)
-{
-    VidMapPtr vp;
-    ScrnInfoPtr pScrn;
-
-    if ((scrnIndex < 0) || !(pScrn = xf86Screens[scrnIndex]))
-        return &vidMapRec;
-
-    if (vidMapIndex < 0)
-        vidMapIndex = xf86AllocateScrnInfoPrivateIndex();
-
-    if (VIDMAPPTR(pScrn) != NULL)
-        return VIDMAPPTR(pScrn);
-
-    vp = pScrn->privates[vidMapIndex].ptr = xnfcalloc(sizeof(VidMapRec), 1);
-    vp->mtrrEnabled = TRUE;     /* default to enabled */
-    vp->mtrrFrom = X_DEFAULT;
-    vp->mtrrOptChecked = FALSE;
-    vp->pScrn = pScrn;
-    return vp;
-}
-
-enum { OPTION_MTRR };
-
-static const OptionInfoRec opts[] = {
-    {OPTION_MTRR, "mtrr", OPTV_BOOLEAN, {0}, FALSE},
-    {-1, NULL, OPTV_NONE, {0}, FALSE}
-};
-
-static void
-checkMtrrOption(VidMapPtr vp)
-{
-    if (!vp->mtrrOptChecked && vp->pScrn && vp->pScrn->options != NULL) {
-        OptionInfoPtr options;
-
-        options = xnfalloc(sizeof(opts));
-        (void) memcpy(options, opts, sizeof(opts));
-        xf86ProcessOptions(vp->pScrn->scrnIndex, vp->pScrn->options, options);
-        if (xf86GetOptValBool(options, OPTION_MTRR, &vp->mtrrEnabled))
-            vp->mtrrFrom = X_CONFIG;
-        free(options);
-        vp->mtrrOptChecked = TRUE;
-    }
-}
 
 void
 xf86InitVidMem(void)
@@ -117,20 +52,3 @@ xf86InitVidMem(void)
         xf86OSInitVidMem(&vidMemInfo);
     }
 }
-
-Bool
-xf86CheckMTRR(int ScreenNum)
-{
-    VidMapPtr vp = getVidMapRec(ScreenNum);
-
-    /*
-     * Check the "mtrr" option even when MTRR isn't supported to avoid
-     * warnings about unrecognised options.
-     */
-    checkMtrrOption(vp);
-
-    if (vp->mtrrEnabled)
-        return TRUE;
-
-    return FALSE;
-}
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 1c1cc5e..822bab2 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 _X_DEPRECATED Bool xf86CheckMTRR(int);
 extern _X_EXPORT Bool xf86EnableIO(void);
 extern _X_EXPORT void xf86DisableIO(void);
 
-- 
1.9.3



More information about the xorg-devel mailing list