[PATCH xserver 8/8] xfree86: Remove the rest of ->SetOverscan

Adam Jackson ajax at redhat.com
Wed Jan 31 15:54:04 UTC 2018


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86Init.c |  2 --
 hw/xfree86/common/xf86cmap.c |  3 +--
 hw/xfree86/common/xf86cmap.h |  2 +-
 hw/xfree86/common/xf86str.h  |  2 --
 hw/xfree86/doc/ddxDesign.xml | 27 ++++-----------------------
 hw/xfree86/vgahw/vgaHW.c     | 30 +-----------------------------
 6 files changed, 7 insertions(+), 59 deletions(-)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 57b38d07e..ee2060b6c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -746,7 +746,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 #endif
         pScrn->DPMSSet = NULL;
         pScrn->LoadPalette = NULL;
-        pScrn->SetOverscan = NULL;
         pScrn->DriverFunc = NULL;
         pScrn->pScreen = NULL;
         scr_index = AddGPUScreen(xf86ScreenInit, argc, argv);
@@ -774,7 +773,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
 #endif
         xf86Screens[i]->DPMSSet = NULL;
         xf86Screens[i]->LoadPalette = NULL;
-        xf86Screens[i]->SetOverscan = NULL;
         xf86Screens[i]->DriverFunc = NULL;
         xf86Screens[i]->pScreen = NULL;
         scr_index = AddScreen(xf86ScreenInit, argc, argv);
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 0025b7b22..b3744657e 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -139,7 +139,7 @@ xf86HandleColormaps(ScreenPtr pScreen,
                     int maxColors,
                     int sigRGBbits,
                     xf86LoadPaletteProc * loadPalette,
-                    xf86SetOverscanProc * setOverscan, unsigned int flags)
+                    void * setOverscan, unsigned int flags)
 {
     ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     ColormapPtr pDefMap = NULL;
@@ -182,7 +182,6 @@ xf86HandleColormaps(ScreenPtr pScreen,
     pScreen->StoreColors = CMapStoreColors;
 
     pScrn->LoadPalette = loadPalette;
-    pScrn->SetOverscan = setOverscan;
     pScreenPriv->maxColors = maxColors;
     pScreenPriv->sigRGBbits = sigRGBbits;
     pScreenPriv->gammaElements = elements;
diff --git a/hw/xfree86/common/xf86cmap.h b/hw/xfree86/common/xf86cmap.h
index 2661cf429..59fe890af 100644
--- a/hw/xfree86/common/xf86cmap.h
+++ b/hw/xfree86/common/xf86cmap.h
@@ -40,7 +40,7 @@ extern _X_EXPORT Bool xf86HandleColormaps(ScreenPtr pScreen,
                                           int maxCol,
                                           int sigRGBbits,
                                           xf86LoadPaletteProc * loadPalette,
-                                          xf86SetOverscanProc * setOverscan,
+                                          void * setOverscan,
                                           unsigned int flags);
 
 extern _X_EXPORT Bool xf86ColormapAllocatePrivates(ScrnInfoPtr pScrn);
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index edd91c745..12566db53 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -553,7 +553,6 @@ typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int);
 typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool);
 typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int);
 typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
-typedef void xf86SetOverscanProc(ScrnInfoPtr, int);
 typedef void xf86ModeSetProc(ScrnInfoPtr);
 
 /*
@@ -683,7 +682,6 @@ typedef struct _ScrnInfoRec {
     xf86PMEventProc *PMEvent;
     xf86DPMSSetProc *DPMSSet;
     xf86LoadPaletteProc *LoadPalette;
-    xf86SetOverscanProc *SetOverscan;
     xorgDriverFuncProc *DriverFunc;
     xf86ModeSetProc *ModeSet;
 
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 13994f7a9..cdaaa1c51 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -3743,7 +3743,7 @@ To use the colormap layer, a driver calls the
 	  <programlisting>
     Bool xf86HandleColormaps(ScreenPtr pScreen, int maxColors,
                              int sigRGBbits, LoadPaletteFuncPtr loadPalette,
-                             SetOverscanFuncPtr setOverscan,
+                             void *setOverscan,
                              unsigned int flags);
 	  </programlisting>
 	  <blockquote><para>
@@ -3757,11 +3757,9 @@ To use the colormap layer, a driver calls the
       hardware, and is described below.  <parameter>setOverscan</parameter> is
       an optional function that may be provided when the overscan color
       is an index from the standard LUT and when it needs to be adjusted
-      to keep it as close to black as possible.  The
-      <parameter>setOverscan</parameter> function programs the overscan index.
-      It shouldn't normally be used for depths other than 8.
-      <parameter>setOverscan</parameter> should be set to <constant>NULL</constant>
-      when it isn't needed.  <parameter>flags</parameter> may be set to the
+      to keep it as close to black as possible.
+      <parameter>setOverscan</parameter> should be set to <constant>NULL</constant>.
+      <parameter>flags</parameter> may be set to the
       following (which may be ORed together):
 
 	      <variablelist>
@@ -3827,23 +3825,6 @@ To use the colormap layer, a driver calls the
 
 	  </blockquote></para></blockquote>
 
-      <blockquote><para>
-	  <programlisting>
-    void SetOverscan(ScrnInfoPtr pScrn, int overscan);
-	  </programlisting>
-	  <blockquote><para>
-      <function>SetOverscan()</function> is a driver-provided function for
-      programming the <parameter>overscan</parameter> index.  As described
-      above, it is normally only appropriate for LUT modes where all
-      colormap entries are available for the display, but where one of
-      them is also used for the overscan (typically 8bpp for VGA compatible
-      LUTs).  It isn't required in cases where the overscan area is
-      never visible.
-	    </para>
-
-	  </blockquote></para>
-      </blockquote></para>
-
   </sect1>
 
   <sect1>
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index 7223fc031..d3df29935 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -1842,34 +1842,6 @@ vgaHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors,
     hwp->disablePalette(hwp);
 }
 
-static void
-vgaHWSetOverscan(ScrnInfoPtr pScrn, int overscan)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    if (overscan < 0 || overscan > 255)
-        return;
-
-    hwp->enablePalette(hwp);
-    hwp->writeAttr(hwp, OVERSCAN, overscan);
-
-#ifdef DEBUGOVERSCAN
-    {
-        int ov = hwp->readAttr(hwp, OVERSCAN);
-        int red, green, blue;
-
-        hwp->writeDacReadAddr(hwp, ov);
-        red = hwp->readDacData(hwp);
-        green = hwp->readDacData(hwp);
-        blue = hwp->readDacData(hwp);
-        ErrorF("Overscan index is 0x%02x, colours are #%02x%02x%02x\n",
-               ov, red, green, blue);
-    }
-#endif
-
-    hwp->disablePalette(hwp);
-}
-
 Bool
 vgaHWHandleColormaps(ScreenPtr pScreen)
 {
@@ -1878,7 +1850,7 @@ vgaHWHandleColormaps(ScreenPtr pScreen)
     if (pScrn->depth > 1 && pScrn->depth <= 8) {
         return xf86HandleColormaps(pScreen, 1 << pScrn->depth,
                                    pScrn->rgbBits, vgaHWLoadPalette,
-                                   pScrn->depth > 4 ? vgaHWSetOverscan : NULL,
+                                   NULL,
                                    CMAP_RELOAD_ON_MODE_SWITCH);
     }
     return TRUE;
-- 
2.14.3



More information about the xorg-devel mailing list