[PATCH 08/12] vidmode: rename DDX functions
Olivier Fourdan
ofourdan at redhat.com
Fri Feb 5 08:48:22 UTC 2016
To avoid confusion as to what belongs on the DDX and what not.
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
hw/xfree86/common/vidmodeproc.h | 68 +++++------
hw/xfree86/common/xf86VidMode.c | 261 ++++++++++++++++++++--------------------
hw/xfree86/common/xf86vmode.c | 138 ++++++++++-----------
3 files changed, 234 insertions(+), 233 deletions(-)
diff --git a/hw/xfree86/common/vidmodeproc.h b/hw/xfree86/common/vidmodeproc.h
index 3919a0c..4410253 100644
--- a/hw/xfree86/common/vidmodeproc.h
+++ b/hw/xfree86/common/vidmodeproc.h
@@ -39,40 +39,40 @@ typedef union {
float f;
} vidMonitorValue;
-extern Bool VidModeExtensionInit(ScreenPtr pScreen);
+extern Bool xf86VidModeExtensionInit(ScreenPtr pScreen);
-extern Bool VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode,
- int *dotClock);
-extern Bool VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode,
- int *dotClock);
-extern Bool VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode,
- int *dotClock);
-extern Bool VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode);
-extern Bool VidModeZoomViewport(ScreenPtr pScreen, int zoom);
-extern Bool VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y);
-extern Bool VidModeSetViewPort(ScreenPtr pScreen, int x, int y);
-extern Bool VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
-extern Bool VidModeLockZoom(ScreenPtr pScreen, Bool lock);
-extern int VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock);
-extern Bool VidModeGetClocks(ScreenPtr pScreen, int *Clocks);
-extern ModeStatus VidModeCheckModeForMonitor(ScreenPtr pScreen,
- DisplayModePtr mode);
-extern ModeStatus VidModeCheckModeForDriver(ScreenPtr pScreen,
- DisplayModePtr mode);
-extern void VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode);
-extern Bool VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode);
-extern int VidModeGetDotClock(ScreenPtr pScreen, int Clock);
-extern int VidModeGetNumOfModes(ScreenPtr pScreen);
-extern Bool VidModeSetGamma(ScreenPtr pScreen, float red, float green,
- float blue);
-extern Bool VidModeGetGamma(ScreenPtr pScreen, float *red, float *green,
- float *blue);
-extern vidMonitorValue VidModeGetMonitorValue(ScreenPtr pScreen,
- int valtyp, int indx);
-extern Bool VidModeSetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
- CARD16 *);
-extern Bool VidModeGetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
- CARD16 *);
-extern int VidModeGetGammaRampSize(ScreenPtr pScreen);
+extern Bool xf86VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode,
+ int *dotClock);
+extern Bool xf86VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode,
+ int *dotClock);
+extern Bool xf86VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode,
+ int *dotClock);
+extern Bool xf86VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode);
+extern Bool xf86VidModeZoomViewport(ScreenPtr pScreen, int zoom);
+extern Bool xf86VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y);
+extern Bool xf86VidModeSetViewPort(ScreenPtr pScreen, int x, int y);
+extern Bool xf86VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
+extern Bool xf86VidModeLockZoom(ScreenPtr pScreen, Bool lock);
+extern int xf86VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock);
+extern Bool xf86VidModeGetClocks(ScreenPtr pScreen, int *Clocks);
+extern ModeStatus xf86VidModeCheckModeForMonitor(ScreenPtr pScreen,
+ DisplayModePtr mode);
+extern ModeStatus xf86VidModeCheckModeForDriver(ScreenPtr pScreen,
+ DisplayModePtr mode);
+extern void xf86VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode);
+extern Bool xf86VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode);
+extern int xf86VidModeGetDotClock(ScreenPtr pScreen, int Clock);
+extern int xf86VidModeGetNumOfModes(ScreenPtr pScreen);
+extern Bool xf86VidModeSetGamma(ScreenPtr pScreen, float red, float green,
+ float blue);
+extern Bool xf86VidModeGetGamma(ScreenPtr pScreen, float *red, float *green,
+ float *blue);
+extern vidMonitorValue xf86VidModeGetMonitorValue(ScreenPtr pScreen,
+ int valtyp, int indx);
+extern Bool xf86VidModeSetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
+ CARD16 *);
+extern Bool xf86VidModeGetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
+ CARD16 *);
+extern int xf86VidModeGetGammaRampSize(ScreenPtr pScreen);
#endif
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 2d87daa..5d04738 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -54,36 +54,10 @@ static DevPrivateKeyRec VidModeKeyRec;
#endif
-Bool
-VidModeExtensionInit(ScreenPtr pScreen)
-{
-#ifdef XF86VIDMODE
- VidModePtr pVidMode;
-
- if (!xf86GetVidModeEnabled()) {
- DebugF("!xf86GetVidModeEnabled()\n");
- return FALSE;
- }
-
- if (!dixRegisterPrivateKey(&VidModeKeyRec, PRIVATE_SCREEN, sizeof(VidModeRec)))
- return FALSE;
-
- pVidMode = VMPTR(pScreen);
-
- pVidMode->Flags = 0;
- pVidMode->Next = NULL;
-
- return TRUE;
-#else
- DebugF("no vidmode extension\n");
- return FALSE;
-#endif
-}
-
#ifdef XF86VIDMODE
static Bool
-VidModeAvailable(ScreenPtr pScreen)
+xf86VidModeAvailable(ScreenPtr pScreen)
{
if (pScreen == NULL) {
DebugF("pScreen == NULL\n");
@@ -98,12 +72,54 @@ VidModeAvailable(ScreenPtr pScreen)
}
}
+vidMonitorValue
+xf86VidModeGetMonitorValue(ScreenPtr pScreen, int valtyp, int indx)
+{
+ vidMonitorValue ret = { NULL, };
+ MonPtr monitor;
+ ScrnInfoPtr pScrn;
+
+ if (!xf86VidModeAvailable(pScreen))
+ return ret;
+
+ pScrn = xf86ScreenToScrn(pScreen);
+ monitor = pScrn->monitor;
+
+ switch (valtyp) {
+ case VIDMODE_MON_VENDOR:
+ ret.ptr = monitor->vendor;
+ break;
+ case VIDMODE_MON_MODEL:
+ ret.ptr = monitor->model;
+ break;
+ case VIDMODE_MON_NHSYNC:
+ ret.i = monitor->nHsync;
+ break;
+ case VIDMODE_MON_NVREFRESH:
+ ret.i = monitor->nVrefresh;
+ break;
+ case VIDMODE_MON_HSYNC_LO:
+ ret.f = (100.0 * monitor->hsync[indx].lo);
+ break;
+ case VIDMODE_MON_HSYNC_HI:
+ ret.f = (100.0 * monitor->hsync[indx].hi);
+ break;
+ case VIDMODE_MON_VREFRESH_LO:
+ ret.f = (100.0 * monitor->vrefresh[indx].lo);
+ break;
+ case VIDMODE_MON_VREFRESH_HI:
+ ret.f = (100.0 * monitor->vrefresh[indx].hi);
+ break;
+ }
+ return ret;
+}
+
Bool
-VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
+xf86VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -118,11 +134,11 @@ VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock
}
int
-VidModeGetDotClock(ScreenPtr pScreen, int Clock)
+xf86VidModeGetDotClock(ScreenPtr pScreen, int Clock)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return 0;
pScrn = xf86ScreenToScrn(pScreen);
@@ -133,11 +149,11 @@ VidModeGetDotClock(ScreenPtr pScreen, int Clock)
}
int
-VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock)
+xf86VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return 0;
pScrn = xf86ScreenToScrn(pScreen);
@@ -152,12 +168,12 @@ VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock)
}
Bool
-VidModeGetClocks(ScreenPtr pScreen, int *Clocks)
+xf86VidModeGetClocks(ScreenPtr pScreen, int *Clocks)
{
ScrnInfoPtr pScrn;
int i;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -172,60 +188,60 @@ VidModeGetClocks(ScreenPtr pScreen, int *Clocks)
}
Bool
-VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
+xf86VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
{
- ScrnInfoPtr pScrn;
VidModePtr pVidMode;
+ DisplayModePtr p;
- if (!VidModeAvailable(pScreen))
- return FALSE;
-
- pScrn = xf86ScreenToScrn(pScreen);
- if (pScrn->modes == NULL)
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pVidMode = VMPTR(pScreen);
- pVidMode->First = pScrn->modes;
- pVidMode->Next = pVidMode->First->next;
- if (pVidMode->First->status == MODE_OK) {
- *mode = pVidMode->First;
- *dotClock = VidModeGetDotClock(pScreen, pVidMode->First->Clock);
- return TRUE;
+ for (p = pVidMode->Next; p != NULL && p != pVidMode->First; p = p->next) {
+ if (p->status == MODE_OK) {
+ pVidMode->Next = p->next;
+ *mode = p;
+ *dotClock = xf86VidModeGetDotClock(pScreen, p->Clock);
+ return TRUE;
+ }
}
- return VidModeGetNextModeline(pScreen, mode, dotClock);
+ return FALSE;
}
Bool
-VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
+xf86VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock)
{
+ ScrnInfoPtr pScrn;
VidModePtr pVidMode;
- DisplayModePtr p;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
+ return FALSE;
+
+ pScrn = xf86ScreenToScrn(pScreen);
+ if (pScrn->modes == NULL)
return FALSE;
pVidMode = VMPTR(pScreen);
+ pVidMode->First = pScrn->modes;
+ pVidMode->Next = pVidMode->First->next;
- for (p = pVidMode->Next; p != NULL && p != pVidMode->First; p = p->next) {
- if (p->status == MODE_OK) {
- pVidMode->Next = p->next;
- *mode = p;
- *dotClock = VidModeGetDotClock(pScreen, p->Clock);
- return TRUE;
- }
+ if (pVidMode->First->status == MODE_OK) {
+ *mode = pVidMode->First;
+ *dotClock = xf86VidModeGetDotClock(pScreen, pVidMode->First->Clock);
+ return TRUE;
}
- return FALSE;
+ return xf86VidModeGetNextModeline(pScreen, mode, dotClock);
}
Bool
-VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
- if ((mode == NULL) || (!VidModeAvailable(pScreen)))
+ if ((mode == NULL) || (!xf86VidModeAvailable(pScreen)))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -234,9 +250,9 @@ VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode)
}
Bool
-VidModeZoomViewport(ScreenPtr pScreen, int zoom)
+xf86VidModeZoomViewport(ScreenPtr pScreen, int zoom)
{
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
xf86ZoomViewport(pScreen, zoom);
@@ -244,11 +260,11 @@ VidModeZoomViewport(ScreenPtr pScreen, int zoom)
}
Bool
-VidModeSetViewPort(ScreenPtr pScreen, int x, int y)
+xf86VidModeSetViewPort(ScreenPtr pScreen, int x, int y)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -265,11 +281,11 @@ VidModeSetViewPort(ScreenPtr pScreen, int x, int y)
}
Bool
-VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y)
+xf86VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -279,13 +295,13 @@ VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y)
}
Bool
-VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
DisplayModePtr pTmpMode;
Bool retval;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -301,9 +317,9 @@ VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
}
Bool
-VidModeLockZoom(ScreenPtr pScreen, Bool lock)
+xf86VidModeLockZoom(ScreenPtr pScreen, Bool lock)
{
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
if (xf86Info.dontZoom)
@@ -314,11 +330,11 @@ VidModeLockZoom(ScreenPtr pScreen, Bool lock)
}
ModeStatus
-VidModeCheckModeForMonitor(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeCheckModeForMonitor(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
- if ((mode == NULL) || (!VidModeAvailable(pScreen)))
+ if ((mode == NULL) || (!xf86VidModeAvailable(pScreen)))
return MODE_ERROR;
pScrn = xf86ScreenToScrn(pScreen);
@@ -327,11 +343,11 @@ VidModeCheckModeForMonitor(ScreenPtr pScreen, DisplayModePtr mode)
}
ModeStatus
-VidModeCheckModeForDriver(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeCheckModeForDriver(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
- if ((mode == NULL) || (!VidModeAvailable(pScreen)))
+ if ((mode == NULL) || (!xf86VidModeAvailable(pScreen)))
return MODE_ERROR;
pScrn = xf86ScreenToScrn(pScreen);
@@ -340,12 +356,12 @@ VidModeCheckModeForDriver(ScreenPtr pScreen, DisplayModePtr mode)
}
void
-VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
DisplayModePtr ScreenModes;
- if ((mode == NULL) || (!VidModeAvailable(pScreen)))
+ if ((mode == NULL) || (!xf86VidModeAvailable(pScreen)))
return;
/* Ugly hack so that the xf86Mode.c function can be used without change */
@@ -359,11 +375,11 @@ VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode)
}
Bool
-VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode)
+xf86VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode)
{
ScrnInfoPtr pScrn;
- if ((mode == NULL) || (!VidModeAvailable(pScreen)))
+ if ((mode == NULL) || (!xf86VidModeAvailable(pScreen)))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -380,27 +396,27 @@ VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode)
}
int
-VidModeGetNumOfModes(ScreenPtr pScreen)
+xf86VidModeGetNumOfModes(ScreenPtr pScreen)
{
DisplayModePtr mode = NULL;
int dotClock = 0, nummodes = 0;
- if (!VidModeGetFirstModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock))
return nummodes;
do {
nummodes++;
- if (!VidModeGetNextModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetNextModeline(pScreen, &mode, &dotClock))
return nummodes;
} while (TRUE);
}
Bool
-VidModeSetGamma(ScreenPtr pScreen, float red, float green, float blue)
+xf86VidModeSetGamma(ScreenPtr pScreen, float red, float green, float blue)
{
Gamma gamma;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
gamma.red = red;
@@ -413,11 +429,11 @@ VidModeSetGamma(ScreenPtr pScreen, float red, float green, float blue)
}
Bool
-VidModeGetGamma(ScreenPtr pScreen, float *red, float *green, float *blue)
+xf86VidModeGetGamma(ScreenPtr pScreen, float *red, float *green, float *blue)
{
ScrnInfoPtr pScrn;
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
pScrn = xf86ScreenToScrn(pScreen);
@@ -428,9 +444,9 @@ VidModeGetGamma(ScreenPtr pScreen, float *red, float *green, float *blue)
}
Bool
-VidModeSetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
+xf86VidModeSetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
{
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
xf86ChangeGammaRamp(pScreen, size, r, g, b);
@@ -438,9 +454,9 @@ VidModeSetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b
}
Bool
-VidModeGetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
+xf86VidModeGetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b)
{
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return FALSE;
xf86GetGammaRamp(pScreen, size, r, g, b);
@@ -448,54 +464,39 @@ VidModeGetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b
}
int
-VidModeGetGammaRampSize(ScreenPtr pScreen)
+xf86VidModeGetGammaRampSize(ScreenPtr pScreen)
{
- if (!VidModeAvailable(pScreen))
+ if (!xf86VidModeAvailable(pScreen))
return 0;
return xf86GetGammaRampSize(pScreen);
}
-vidMonitorValue
-VidModeGetMonitorValue(ScreenPtr pScreen, int valtyp, int indx)
+#endif /* XF86VIDMODE */
+
+Bool
+xf86VidModeExtensionInit(ScreenPtr pScreen)
{
- vidMonitorValue ret = { NULL, };
- MonPtr monitor;
- ScrnInfoPtr pScrn;
+#ifdef XF86VIDMODE
+ VidModePtr pVidMode;
- if (!VidModeAvailable(pScreen))
- return ret;
+ if (!xf86GetVidModeEnabled()) {
+ DebugF("!xf86GetVidModeEnabled()\n");
+ return FALSE;
+ }
- pScrn = xf86ScreenToScrn(pScreen);
- monitor = pScrn->monitor;
+ if (!dixRegisterPrivateKey(&VidModeKeyRec, PRIVATE_SCREEN, sizeof(VidModeRec)))
+ return FALSE;
- switch (valtyp) {
- case VIDMODE_MON_VENDOR:
- ret.ptr = monitor->vendor;
- break;
- case VIDMODE_MON_MODEL:
- ret.ptr = monitor->model;
- break;
- case VIDMODE_MON_NHSYNC:
- ret.i = monitor->nHsync;
- break;
- case VIDMODE_MON_NVREFRESH:
- ret.i = monitor->nVrefresh;
- break;
- case VIDMODE_MON_HSYNC_LO:
- ret.f = (100.0 * monitor->hsync[indx].lo);
- break;
- case VIDMODE_MON_HSYNC_HI:
- ret.f = (100.0 * monitor->hsync[indx].hi);
- break;
- case VIDMODE_MON_VREFRESH_LO:
- ret.f = (100.0 * monitor->vrefresh[indx].lo);
- break;
- case VIDMODE_MON_VREFRESH_HI:
- ret.f = (100.0 * monitor->vrefresh[indx].hi);
- break;
- }
- return ret;
+ pVidMode = VMPTR(pScreen);
+
+ pVidMode->Flags = 0;
+ pVidMode->Next = NULL;
+
+ return TRUE;
+#else
+ DebugF("no vidmode extension\n");
+ return FALSE;
+#endif
}
-#endif /* XF86VIDMODE */
diff --git a/hw/xfree86/common/xf86vmode.c b/hw/xfree86/common/xf86vmode.c
index 90216cc..0ad1b8d 100644
--- a/hw/xfree86/common/xf86vmode.c
+++ b/hw/xfree86/common/xf86vmode.c
@@ -251,7 +251,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
return BadValue;
rep.dotclock = dotClock;
@@ -343,11 +343,11 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
pScreen = screenInfo.screens[stuff->screen];
ver = ClientMajorVersion(client);
- modecount = VidModeGetNumOfModes(pScreen);
+ modecount = xf86VidModeGetNumOfModes(pScreen);
if (modecount < 1)
return VidModeErrorBase + XF86VidModeExtensionDisabled;
- if (!VidModeGetFirstModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock))
return BadValue;
rep = (xXF86VidModeGetAllModeLinesReply) {
@@ -418,7 +418,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
WriteToClient(client, sizeof(xXF86VidModeModeInfo), &mdinf);
}
- } while (VidModeGetNextModeline(pScreen, &mode, &dotClock));
+ } while (xf86VidModeGetNextModeline(pScreen, &mode, &dotClock));
return Success;
}
@@ -536,14 +536,14 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
if (stuff->after_htotal != 0 || stuff->after_vtotal != 0) {
Bool found = FALSE;
- if (VidModeGetFirstModeline(pScreen, &mode, &dotClock)) {
+ if (xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock)) {
do {
- if ((VidModeGetDotClock(pScreen, stuff->dotclock)
+ if ((xf86VidModeGetDotClock(pScreen, stuff->dotclock)
== dotClock) && MODEMATCH(mode, stuff)) {
found = TRUE;
break;
}
- } while (VidModeGetNextModeline(pScreen, &mode, &dotClock));
+ } while (xf86VidModeGetNextModeline(pScreen, &mode, &dotClock));
}
if (!found)
return BadValue;
@@ -569,7 +569,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
ErrorF("AddModeLine - Privates in request have been ignored\n");
/* Check that the mode is consistent with the monitor specs */
- switch (VidModeCheckModeForMonitor(pScreen, mode)) {
+ switch (xf86VidModeCheckModeForMonitor(pScreen, mode)) {
case MODE_OK:
break;
case MODE_HSYNC:
@@ -586,14 +586,14 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
}
/* Check that the driver is happy with the mode */
- if (VidModeCheckModeForDriver(pScreen, mode) != MODE_OK) {
+ if (xf86VidModeCheckModeForDriver(pScreen, mode) != MODE_OK) {
free(mode);
return VidModeErrorBase + XF86VidModeModeUnsuitable;
}
- VidModeSetCrtcForMode(pScreen, mode);
+ xf86VidModeSetCrtcForMode(pScreen, mode);
- VidModeAddModeline(pScreen, mode);
+ xf86VidModeAddModeline(pScreen, mode);
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("AddModeLine - Succeeded\n");
@@ -672,7 +672,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
return BadValue;
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) {
@@ -691,11 +691,11 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
VidModeGetModeValue(mode, VIDMODE_V_TOTAL),
VidModeGetModeValue(mode, VIDMODE_FLAGS));
}
- if ((VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
+ if ((xf86VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
MODEMATCH(mode, stuff))
return BadValue;
- if (!VidModeGetFirstModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock))
return BadValue;
do {
@@ -715,14 +715,14 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
VidModeGetModeValue(mode, VIDMODE_V_TOTAL),
VidModeGetModeValue(mode, VIDMODE_FLAGS));
}
- if ((VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
+ if ((xf86VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
MODEMATCH(mode, stuff)) {
- VidModeDeleteModeline(pScreen, mode);
+ xf86VidModeDeleteModeline(pScreen, mode);
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("DeleteModeLine - Succeeded\n");
return Success;
}
- } while (VidModeGetNextModeline(pScreen, &mode, &dotClock));
+ } while (xf86VidModeGetNextModeline(pScreen, &mode, &dotClock));
return BadValue;
}
@@ -794,7 +794,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
return BadValue;
modetmp = VidModeCreateMode();
@@ -815,7 +815,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
ErrorF("ModModeLine - Privates in request have been ignored\n");
/* Check that the mode is consistent with the monitor specs */
- switch (VidModeCheckModeForMonitor(pScreen, modetmp)) {
+ switch (xf86VidModeCheckModeForMonitor(pScreen, modetmp)) {
case MODE_OK:
break;
case MODE_HSYNC:
@@ -832,7 +832,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
}
/* Check that the driver is happy with the mode */
- if (VidModeCheckModeForDriver(pScreen, modetmp) != MODE_OK) {
+ if (xf86VidModeCheckModeForDriver(pScreen, modetmp) != MODE_OK) {
free(modetmp);
return VidModeErrorBase + XF86VidModeModeUnsuitable;
}
@@ -849,8 +849,8 @@ ProcXF86VidModeModModeLine(ClientPtr client)
VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal);
VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags);
- VidModeSetCrtcForMode(pScreen, mode);
- VidModeSwitchMode(pScreen, mode);
+ xf86VidModeSetCrtcForMode(pScreen, mode);
+ xf86VidModeSwitchMode(pScreen, mode);
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("ModModeLine - Succeeded\n");
@@ -933,7 +933,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
goto status_reply;
}
- if (!VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
return BadValue;
modetmp = VidModeCreateMode();
@@ -954,11 +954,11 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
/* Check that the mode is consistent with the monitor specs */
if ((status =
- VidModeCheckModeForMonitor(pScreen, modetmp)) != MODE_OK)
+ xf86VidModeCheckModeForMonitor(pScreen, modetmp)) != MODE_OK)
goto status_reply;
/* Check that the driver is happy with the mode */
- status = VidModeCheckModeForDriver(pScreen, modetmp);
+ status = xf86VidModeCheckModeForDriver(pScreen, modetmp);
status_reply:
free(modetmp);
@@ -995,7 +995,7 @@ ProcXF86VidModeSwitchMode(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- VidModeZoomViewport(pScreen, (short) stuff->zoom);
+ xf86VidModeZoomViewport(pScreen, (short) stuff->zoom);
return Success;
}
@@ -1064,14 +1064,14 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetCurrentModeline(pScreen, &mode, &dotClock))
return BadValue;
- if ((VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock)
+ if ((xf86VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock)
&& MODEMATCH(mode, stuff))
return Success;
- if (!VidModeGetFirstModeline(pScreen, &mode, &dotClock))
+ if (!xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock))
return BadValue;
do {
@@ -1091,17 +1091,17 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
VidModeGetModeValue(mode, VIDMODE_V_TOTAL),
VidModeGetModeValue(mode, VIDMODE_FLAGS));
}
- if ((VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
+ if ((xf86VidModeGetDotClock(pScreen, stuff->dotclock) == dotClock) &&
MODEMATCH(mode, stuff)) {
- if (!VidModeSwitchMode(pScreen, mode))
+ if (!xf86VidModeSwitchMode(pScreen, mode))
return BadValue;
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
ErrorF("SwitchToMode - Succeeded\n");
return Success;
}
- } while (VidModeGetNextModeline(pScreen, &mode, &dotClock));
+ } while (xf86VidModeGetNextModeline(pScreen, &mode, &dotClock));
return BadValue;
}
@@ -1120,7 +1120,7 @@ ProcXF86VidModeLockModeSwitch(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeLockZoom(pScreen, (short) stuff->lock))
+ if (!xf86VidModeLockZoom(pScreen, (short) stuff->lock))
return VidModeErrorBase + XF86VidModeZoomLocked;
return Success;
@@ -1146,19 +1146,19 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- nHsync = VidModeGetMonitorValue(pScreen, VIDMODE_MON_NHSYNC, 0).i;
- nVrefresh = VidModeGetMonitorValue(pScreen, VIDMODE_MON_NVREFRESH, 0).i;
+ nHsync = xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_NHSYNC, 0).i;
+ nVrefresh = xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_NVREFRESH, 0).i;
- if ((char *) (VidModeGetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr)
- rep.vendorLength = strlen((char *) (VidModeGetMonitorValue(pScreen,
- VIDMODE_MON_VENDOR,
- 0)).ptr);
+ if ((char *) (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr)
+ rep.vendorLength = strlen((char *) (xf86VidModeGetMonitorValue(pScreen,
+ VIDMODE_MON_VENDOR,
+ 0)).ptr);
else
rep.vendorLength = 0;
- if ((char *) (VidModeGetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr)
- rep.modelLength = strlen((char *) (VidModeGetMonitorValue(pScreen,
- VIDMODE_MON_MODEL,
- 0)).ptr);
+ if ((char *) (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr)
+ rep.modelLength = strlen((char *) (xf86VidModeGetMonitorValue(pScreen,
+ VIDMODE_MON_MODEL,
+ 0)).ptr);
else
rep.modelLength = 0;
rep.length =
@@ -1181,20 +1181,20 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
}
for (i = 0; i < nHsync; i++) {
- hsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(pScreen,
- VIDMODE_MON_HSYNC_LO,
- i)).f |
+ hsyncdata[i] = (unsigned short) (xf86VidModeGetMonitorValue(pScreen,
+ VIDMODE_MON_HSYNC_LO,
+ i)).f |
(unsigned
- short) (VidModeGetMonitorValue(pScreen, VIDMODE_MON_HSYNC_HI,
+ short) (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_HSYNC_HI,
i)).f << 16;
}
for (i = 0; i < nVrefresh; i++) {
- vsyncdata[i] = (unsigned short) (VidModeGetMonitorValue(pScreen,
- VIDMODE_MON_VREFRESH_LO,
- i)).f |
+ vsyncdata[i] = (unsigned short) (xf86VidModeGetMonitorValue(pScreen,
+ VIDMODE_MON_VREFRESH_LO,
+ i)).f |
(unsigned
- short) (VidModeGetMonitorValue(pScreen, VIDMODE_MON_VREFRESH_HI,
- i)).f << 16;
+ short) (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_VREFRESH_HI,
+ i)).f << 16;
}
if (client->swapped) {
@@ -1207,10 +1207,10 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
WriteSwappedDataToClient(client, nVrefresh * sizeof(CARD32), vsyncdata);
if (rep.vendorLength)
WriteToClient(client, rep.vendorLength,
- (VidModeGetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr);
+ (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr);
if (rep.modelLength)
WriteToClient(client, rep.modelLength,
- (VidModeGetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr);
+ (xf86VidModeGetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr);
free(hsyncdata);
free(vsyncdata);
@@ -1234,7 +1234,7 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- VidModeGetViewPort(pScreen, &x, &y);
+ xf86VidModeGetViewPort(pScreen, &x, &y);
rep = (xXF86VidModeGetViewPortReply) {
.type = X_Reply,
@@ -1268,7 +1268,7 @@ ProcXF86VidModeSetViewPort(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeSetViewPort(pScreen, stuff->x, stuff->y))
+ if (!xf86VidModeSetViewPort(pScreen, stuff->x, stuff->y))
return BadValue;
return Success;
@@ -1294,7 +1294,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- numClocks = VidModeGetNumOfClocks(pScreen, &ClockProg);
+ numClocks = xf86VidModeGetNumOfClocks(pScreen, &ClockProg);
rep = (xXF86VidModeGetDotClocksReply) {
.type = X_Reply,
@@ -1310,7 +1310,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
Clocks = calloc(numClocks, sizeof(int));
if (!Clocks)
return BadValue;
- if (!VidModeGetClocks(pScreen, Clocks)) {
+ if (!xf86VidModeGetClocks(pScreen, Clocks)) {
free(Clocks);
return BadValue;
}
@@ -1356,9 +1356,9 @@ ProcXF86VidModeSetGamma(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeSetGamma(pScreen, ((float) stuff->red) / 10000.,
- ((float) stuff->green) / 10000.,
- ((float) stuff->blue) / 10000.))
+ if (!xf86VidModeSetGamma(pScreen, ((float) stuff->red) / 10000.,
+ ((float) stuff->green) / 10000.,
+ ((float) stuff->blue) / 10000.))
return BadValue;
return Success;
@@ -1380,7 +1380,7 @@ ProcXF86VidModeGetGamma(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (!VidModeGetGamma(pScreen, &red, &green, &blue))
+ if (!xf86VidModeGetGamma(pScreen, &red, &green, &blue))
return BadValue;
rep = (xXF86VidModeGetGammaReply) {
.type = X_Reply,
@@ -1415,7 +1415,7 @@ ProcXF86VidModeSetGammaRamp(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (stuff->size != VidModeGetGammaRampSize(pScreen))
+ if (stuff->size != xf86VidModeGetGammaRampSize(pScreen))
return BadValue;
length = (stuff->size + 1) & ~1;
@@ -1426,7 +1426,7 @@ ProcXF86VidModeSetGammaRamp(ClientPtr client)
g = r + length;
b = g + length;
- if (!VidModeSetGammaRamp(pScreen, stuff->size, r, g, b))
+ if (!xf86VidModeSetGammaRamp(pScreen, stuff->size, r, g, b))
return BadValue;
return Success;
@@ -1449,7 +1449,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
return BadValue;
pScreen = screenInfo.screens[stuff->screen];
- if (stuff->size != VidModeGetGammaRampSize(pScreen))
+ if (stuff->size != xf86VidModeGetGammaRampSize(pScreen))
return BadValue;
length = (stuff->size + 1) & ~1;
@@ -1459,8 +1459,8 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
return BadAlloc;
ramplen = length * 3 * sizeof(CARD16);
- if (!VidModeGetGammaRamp(pScreen, stuff->size,
- ramp, ramp + length, ramp + (length * 2))) {
+ if (!xf86VidModeGetGammaRamp(pScreen, stuff->size,
+ ramp, ramp + length, ramp + (length * 2))) {
free(ramp);
return BadValue;
}
@@ -1505,7 +1505,7 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client)
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
- .size = VidModeGetGammaRampSize(pScreen)
+ .size = xf86VidModeGetGammaRampSize(pScreen)
};
if (client->swapped) {
swaps(&rep.sequenceNumber);
@@ -2072,7 +2072,7 @@ XFree86VidModeExtensionInit(void)
for (i = 0; i < screenInfo.numScreens; i++) {
pScreen = screenInfo.screens[i];
- if (VidModeExtensionInit(pScreen))
+ if (xf86VidModeExtensionInit(pScreen))
enabled = TRUE;
}
/* This means that the DDX doesn't want the vidmode extension enabled */
--
2.5.0
More information about the xorg-devel
mailing list