[PATCH 7/8] vidmode: Hide implementation details

Adam Jackson ajax at redhat.com
Tue Jun 2 11:15:05 PDT 2015


Also remove vidmodeproc.h from the SDK since no drivers are using it.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/Makefile.am   |  1 -
 hw/xfree86/common/vidmodeproc.h | 77 ++++++++++++++++++++---------------------
 hw/xfree86/common/xf86VidMode.c |  2 +-
 hw/xfree86/sdksyms.sh           |  3 --
 4 files changed, 39 insertions(+), 44 deletions(-)

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 54e7f4d..3bc0046 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -16,7 +16,6 @@ endif
 
 if XF86VIDMODE
 XF86VMODESOURCES = xf86vmode.c
-XF86VMODE_SDK = vidmodeproc.h
 endif
 
 if DGA
diff --git a/hw/xfree86/common/vidmodeproc.h b/hw/xfree86/common/vidmodeproc.h
index cff340c..59d714c 100644
--- a/hw/xfree86/common/vidmodeproc.h
+++ b/hw/xfree86/common/vidmodeproc.h
@@ -41,44 +41,43 @@ typedef union {
 
 extern Bool VidModeExtensionInit(ScreenPtr pScreen);
 
-extern _X_EXPORT Bool VidModeAvailable(int scrnIndex);
-extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, void **mode,
-                                                int *dotClock);
-extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, void **mode,
-                                              int *dotClock);
-extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, void **mode,
-                                             int *dotClock);
-extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, void *mode);
-extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom);
-extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y);
-extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y);
-extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, void *mode);
-extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock);
-extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, void **monitor);
-extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock);
-extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks);
-extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex,
-                                                       void *mode);
-extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex,
-                                                      void *mode);
-extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, void *mode);
-extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, void *mode);
-extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock);
-extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex);
-extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green,
-                                      float blue);
-extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green,
-                                      float *blue);
-extern _X_EXPORT void *VidModeCreateMode(void);
-extern _X_EXPORT void VidModeCopyMode(void *modefrom, void *modeto);
-extern _X_EXPORT int VidModeGetModeValue(void *mode, int valtyp);
-extern _X_EXPORT void VidModeSetModeValue(void *mode, int valtyp, int val);
-extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(void *monitor,
-                                                        int valtyp, int indx);
-extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *,
-                                          CARD16 *);
-extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *,
-                                          CARD16 *);
-extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex);
+extern Bool VidModeGetCurrentModeline(int scrnIndex, void **mode,
+                                      int *dotClock);
+extern Bool VidModeGetFirstModeline(int scrnIndex, void **mode,
+                                    int *dotClock);
+extern Bool VidModeGetNextModeline(int scrnIndex, void **mode,
+                                   int *dotClock);
+extern Bool VidModeDeleteModeline(int scrnIndex, void *mode);
+extern Bool VidModeZoomViewport(int scrnIndex, int zoom);
+extern Bool VidModeGetViewPort(int scrnIndex, int *x, int *y);
+extern Bool VidModeSetViewPort(int scrnIndex, int x, int y);
+extern Bool VidModeSwitchMode(int scrnIndex, void *mode);
+extern Bool VidModeLockZoom(int scrnIndex, Bool lock);
+extern Bool VidModeGetMonitor(int scrnIndex, void **monitor);
+extern int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock);
+extern Bool VidModeGetClocks(int scrnIndex, int *Clocks);
+extern ModeStatus VidModeCheckModeForMonitor(int scrnIndex,
+                                             void *mode);
+extern ModeStatus VidModeCheckModeForDriver(int scrnIndex,
+                                            void *mode);
+extern void VidModeSetCrtcForMode(int scrnIndex, void *mode);
+extern Bool VidModeAddModeline(int scrnIndex, void *mode);
+extern int VidModeGetDotClock(int scrnIndex, int Clock);
+extern int VidModeGetNumOfModes(int scrnIndex);
+extern Bool VidModeSetGamma(int scrnIndex, float red, float green,
+                            float blue);
+extern Bool VidModeGetGamma(int scrnIndex, float *red, float *green,
+                            float *blue);
+extern void *VidModeCreateMode(void);
+extern void VidModeCopyMode(void *modefrom, void *modeto);
+extern int VidModeGetModeValue(void *mode, int valtyp);
+extern void VidModeSetModeValue(void *mode, int valtyp, int val);
+extern vidMonitorValue VidModeGetMonitorValue(void *monitor,
+                                              int valtyp, int indx);
+extern Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *,
+                                CARD16 *);
+extern Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *,
+                                CARD16 *);
+extern int VidModeGetGammaRampSize(int scrnIndex);
 
 #endif
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index e708b27..10c7b4b 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -111,7 +111,7 @@ VidModeClose(ScreenPtr pScreen)
     return pScreen->CloseScreen(pScreen);
 }
 
-Bool
+static Bool
 VidModeAvailable(int scrnIndex)
 {
     ScrnInfoPtr pScrn;
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index ed55cbb..5391b72 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -136,9 +136,6 @@ cat > sdksyms.c << EOF
 # include "xf86xvmc.h"
 # include "xf86xvpriv.h"
 #endif
-#if XF86VIDMODE
-# include "vidmodeproc.h"
-#endif
 #include "xorgVersion.h"
 #if defined(__sparc__) || defined(__sparc)
 # include "xf86sbusBus.h"
-- 
2.4.1



More information about the xorg-devel mailing list