summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-05-28 14:49:08 +0200
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-06-11 14:13:32 +0200
commite46b0b9a39ec00dd8006d9927aaa21440b30b7bc (patch)
tree5a8b5a36377bf715885005828f38878bbf6524c3
parent1bd62d4e151931e41e879ea4cb28b3a6a0600978 (diff)
drop old compat macros
There's used to have separate versions for older Xserver versions, but no anymore, so these aren't needed anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
-rw-r--r--src/compat-api.h39
-rw-r--r--src/geode.h8
-rw-r--r--src/geode_ddc.c2
-rw-r--r--src/gx_driver.c31
-rw-r--r--src/gx_randr.c6
-rw-r--r--src/gx_video.c11
-rw-r--r--src/lx_driver.c20
-rw-r--r--src/lx_video.c17
-rw-r--r--src/z4l.c7
9 files changed, 47 insertions, 94 deletions
diff --git a/src/compat-api.h b/src/compat-api.h
index bbeb769..d8100c3 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -31,43 +31,12 @@
#ifndef COMPAT_API_H
#define COMPAT_API_H
-#define DDC_CALL(pScrni) (pScrni)
-
-#define SCRN_ARG_TYPE ScrnInfoPtr
-#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrni = (arg1)
-
-#define SCREEN_ARG_TYPE ScreenPtr
-#define SCREEN_PTR(arg1) ScreenPtr pScrn = (arg1)
-
-#define SCREEN_INIT_ARGS_DECL ScreenPtr pScrn, int argc, char **argv
-
#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
-#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout
-#define BLOCKHANDLER_ARGS arg, pTimeout
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout
+#define BLOCKHANDLER_ARGS pScreen, pTimeout
#else
-#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
-#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask
#endif
-#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScrn
-#define CLOSE_SCREEN_ARGS pScrn
-
-#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
-#define ADJUST_FRAME_ARGS(x, y) pScrni, (x), (y)
-
-#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode
-
-#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
-#define FREE_SCREEN_ARGS(x) (x)
-
-#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
-#define VT_FUNC_ARGS(flags) pScrni
-
-#define XF86_ENABLEDISABLEFB_ARG(pScrni, x) (pScrni), (x)
-
-#define POINTER_MOVED_ARGS_DECL ScrnInfoPtr arg, int x, int y
-#define POINTER_MOVED_ARGS(x, y) pScrni, (x), (y)
-
-#define VALID_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode, Bool Verbose, int flags
-
#endif
diff --git a/src/geode.h b/src/geode.h
index 5ff1cca..65f6f84 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -228,7 +228,7 @@ typedef struct _geodeRec {
/* Hooks */
- void (*PointerMoved) (POINTER_MOVED_ARGS_DECL);
+ void (*PointerMoved) (ScrnInfoPtr pScrn, int x, int y);
CloseScreenProcPtr CloseScreen;
Bool (*CreateScreenResources) (ScreenPtr);
@@ -381,8 +381,8 @@ xf86MonPtr GeodeDoDDC(ScrnInfoPtr pScrni, int index);
Bool GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name);
int GeodeGetFPGeometry(const char *str, int *width, int *height);
-void GeodePointerMoved(POINTER_MOVED_ARGS_DECL);
-void GeodeFreeScreen(FREE_SCREEN_ARGS_DECL);
+void GeodePointerMoved(ScrnInfoPtr pScrn, int x, int y);
+void GeodeFreeScreen(ScrnInfoPtr pScrn);
int GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp);
void GXSetupChipsetFPtr(ScrnInfoPtr pScrn);
@@ -438,7 +438,7 @@ void LXSetupOutput(ScrnInfoPtr);
DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni);
DisplayModePtr LXGetManualPanelMode(char *modestr);
-void LXAdjustFrame(ADJUST_FRAME_ARGS_DECL);
+void LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y);
/* lx_display.c */
void LXSetupCrtc(ScrnInfoPtr pScrni);
diff --git a/src/geode_ddc.c b/src/geode_ddc.c
index a72844d..8227207 100644
--- a/src/geode_ddc.c
+++ b/src/geode_ddc.c
@@ -173,7 +173,7 @@ GeodeGetDDC(ScrnInfoPtr pScrni)
if (!GeodeI2CInit(pScrni, &bus, "CS5536 DDC BUS"))
return NULL;
- mon = xf86DoEDID_DDC2(DDC_CALL(pScrni), bus);
+ mon = xf86DoEDID_DDC2(pScrni, bus);
if (mon)
xf86DDCApplyQuirks(pScrni->scrnIndex, mon);
diff --git a/src/gx_driver.c b/src/gx_driver.c
index ca84427..be1bd17 100644
--- a/src/gx_driver.c
+++ b/src/gx_driver.c
@@ -770,9 +770,8 @@ GXSetDvLineSize(unsigned int pitch)
/* XXX - this is nothing like the original function - not sure exactly what the purpose is for this quite yet */
static void
-GXAdjustFrame(ADJUST_FRAME_ARGS_DECL)
+GXAdjustFrame(ScrnInfoPtr pScrni, int x, int y)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
unsigned long offset;
@@ -854,16 +853,15 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
pGeode->HWCursor = FALSE;
}
- GXAdjustFrame(ADJUST_FRAME_ARGS(pScrni->frameX0, pScrni->frameY0));
+ GXAdjustFrame(pScrni, pScrni->frameX0, pScrni->frameY0);
gx_enable_dac_power();
return TRUE;
}
static Bool
-GXSwitchMode(SWITCH_MODE_ARGS_DECL)
+GXSwitchMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
int ret = TRUE;
int rotate;
@@ -952,7 +950,7 @@ GXLeaveGraphics(ScrnInfoPtr pScrni)
}
static Bool
-GXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+GXCloseScreen(ScreenPtr pScrn)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -985,7 +983,7 @@ GXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
pScrn->CloseScreen = pGeode->CloseScreen;
if (pScrn->CloseScreen)
- return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS);
+ return (*pScrn->CloseScreen) (pScrn);
return TRUE;
}
@@ -1216,7 +1214,7 @@ GXCreateScreenResources(ScreenPtr pScreen)
}
static Bool
-GXScreenInit(SCREEN_INIT_ARGS_DECL)
+GXScreenInit(ScreenPtr pScrn, int argc, char **argv)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -1416,9 +1414,8 @@ GXScreenInit(SCREEN_INIT_ARGS_DECL)
}
static int
-GXValidMode(VALID_MODE_ARGS_DECL)
+GXValidMode(ScrnInfoPtr pScrni, DisplayModePtr pMode, Bool Verbose, int flags)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
int p;
int custom = 0;
@@ -1467,16 +1464,14 @@ GXValidMode(VALID_MODE_ARGS_DECL)
/* XXX - Way more to do here */
static Bool
-GXEnterVT(VT_FUNC_ARGS_DECL)
+GXEnterVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
return GXEnterGraphics(NULL, pScrni);
}
static void
-GXLeaveVT(VT_FUNC_ARGS_DECL)
+GXLeaveVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
pGeode->PrevDisplayOffset = gfx_get_display_offset();
@@ -1503,9 +1498,8 @@ GXSetupChipsetFPtr(ScrnInfoPtr pScrn)
* ============================== */
void
-GeodePointerMoved(POINTER_MOVED_ARGS_DECL)
+GeodePointerMoved(ScrnInfoPtr pScrni, int x, int y)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
int newX = x, newY = y;
@@ -1527,7 +1521,7 @@ GeodePointerMoved(POINTER_MOVED_ARGS_DECL)
break;
}
- (*pGeode->PointerMoved) (POINTER_MOVED_ARGS(newX, newY));
+ (*pGeode->PointerMoved) (pScrni, newX, newY);
}
int
@@ -1549,9 +1543,8 @@ GeodeFreeRec(ScrnInfoPtr pScrni)
}
void
-GeodeFreeScreen(FREE_SCREEN_ARGS_DECL)
+GeodeFreeScreen(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
if (pGeode == NULL)
diff --git a/src/gx_randr.c b/src/gx_randr.c
index 2c492f6..48f7ce4 100644
--- a/src/gx_randr.c
+++ b/src/gx_randr.c
@@ -166,8 +166,7 @@ GXRandRSetMode(ScreenPtr pScreen,
#endif
if (pRoot)
- (*pScrni->
- EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE));
+ (*pScrni->EnableDisableFBAccess) (pScrni, FALSE);
if (useVirtual) {
pScrni->virtualX = pRandr->virtualX;
@@ -222,8 +221,7 @@ GXRandRSetMode(ScreenPtr pScreen,
xf86SetViewport(pScreen, 0, 0);
if (pRoot)
- (*pScrni->
- EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE));
+ (*pScrni->EnableDisableFBAccess) (pScrni, TRUE);
return ret;
}
diff --git a/src/gx_video.c b/src/gx_video.c
index 4eae44f..8b40456 100644
--- a/src/gx_video.c
+++ b/src/gx_video.c
@@ -1314,14 +1314,13 @@ GeodeQueryImageAttributes(ScrnInfoPtr pScrni,
static void
GXBlockHandler(BLOCKHANDLER_ARGS_DECL)
{
- SCREEN_PTR(arg);
- ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen);
GeodeRec *pGeode = GEODEPTR(pScrni);
GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni);
- pScrn->BlockHandler = pGeode->BlockHandler;
- (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS);
- pScrn->BlockHandler = GXBlockHandler;
+ pScreen->BlockHandler = pGeode->BlockHandler;
+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
+ pScreen->BlockHandler = GXBlockHandler;
if (pPriv->videoStatus & TIMER_MASK) {
GXAccelSync(pScrni);
@@ -1350,7 +1349,7 @@ GXBlockHandler(BLOCKHANDLER_ARGS_DECL)
if (pPriv->area) {
#ifdef XF86EXA
if (pGeode->useEXA)
- exaOffscreenFree(pScrn, pPriv->area);
+ exaOffscreenFree(pScrni, pPriv->area);
#endif
if (!pGeode->useEXA)
xf86FreeOffscreenArea(pPriv->area);
diff --git a/src/lx_driver.c b/src/lx_driver.c
index 794e830..b791de7 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -648,9 +648,8 @@ LXUnmapMem(ScrnInfoPtr pScrni)
/* These should be correctly accounted for rotation */
void
-LXAdjustFrame(ADJUST_FRAME_ARGS_DECL)
+LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
unsigned long offset;
@@ -662,9 +661,8 @@ LXAdjustFrame(ADJUST_FRAME_ARGS_DECL)
}
static Bool
-LXSwitchMode(SWITCH_MODE_ARGS_DECL)
+LXSwitchMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
/* Set the new mode */
@@ -714,7 +712,7 @@ LXLeaveGraphics(ScrnInfoPtr pScrni)
}
static Bool
-LXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+LXCloseScreen(ScreenPtr pScrn)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -740,7 +738,7 @@ LXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
pScrn->CloseScreen = pGeode->CloseScreen;
if (pScrn->CloseScreen)
- return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS);
+ return (*pScrn->CloseScreen) (pScrn);
return TRUE;
}
@@ -836,7 +834,7 @@ LXLoadPalette(ScrnInfoPtr pScrni,
}
static Bool
-LXScreenInit(SCREEN_INIT_ARGS_DECL)
+LXScreenInit(ScreenPtr pScrn, int argc, char **argv)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -1006,22 +1004,20 @@ LXScreenInit(SCREEN_INIT_ARGS_DECL)
}
static int
-LXValidMode(VALID_MODE_ARGS_DECL)
+LXValidMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, Bool Verbose, int flags)
{
return MODE_OK;
}
static Bool
-LXEnterVT(VT_FUNC_ARGS_DECL)
+LXEnterVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
return LXEnterGraphics(NULL, pScrni);
}
static void
-LXLeaveVT(VT_FUNC_ARGS_DECL)
+LXLeaveVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
pGeode->PrevDisplayOffset = vg_get_display_offset();
diff --git a/src/lx_video.c b/src/lx_video.c
index eb46cb5..6ebfd6b 100644
--- a/src/lx_video.c
+++ b/src/lx_video.c
@@ -643,14 +643,13 @@ LXResetVideo(ScrnInfoPtr pScrni)
static void
LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL)
{
- SCREEN_PTR(arg);
- ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen);
GeodeRec *pGeode = GEODEPTR(pScrni);
GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni);
- pScrn->BlockHandler = pGeode->BlockHandler;
- (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS);
- pScrn->BlockHandler = LXVidBlockHandler;
+ pScreen->BlockHandler = pGeode->BlockHandler;
+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
+ pScreen->BlockHandler = LXVidBlockHandler;
if (pPriv->videoStatus & TIMER_MASK) {
Time now = currentTime.milliseconds;
@@ -685,9 +684,9 @@ LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL)
}
static XF86VideoAdaptorPtr
-LXSetupImageVideo(ScreenPtr pScrn)
+LXSetupImageVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
+ ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen);
GeodeRec *pGeode = GEODEPTR(pScrni);
XF86VideoAdaptorPtr adapt;
GeodePortPrivRec *pPriv;
@@ -741,8 +740,8 @@ LXSetupImageVideo(ScreenPtr pScrn)
pGeode->adaptor = adapt;
- pGeode->BlockHandler = pScrn->BlockHandler;
- pScrn->BlockHandler = LXVidBlockHandler;
+ pGeode->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = LXVidBlockHandler;
xvColorKey = MAKE_ATOM("XV_COLORKEY");
xvColorKeyMode = MAKE_ATOM("XV_COLORKEYMODE");
diff --git a/src/z4l.c b/src/z4l.c
index 3cee57d..e5fe729 100644
--- a/src/z4l.c
+++ b/src/z4l.c
@@ -1273,12 +1273,11 @@ Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value,
return Success;
}
-static void (*oldAdjustFrame) (ADJUST_FRAME_ARGS_DECL) = NULL;
+static void (*oldAdjustFrame) (ScrnInfoPtr pScrni, int x, int y) = NULL;
static void
-Z4lAdjustFrame(ADJUST_FRAME_ARGS_DECL)
+Z4lAdjustFrame(ScrnInfoPtr pScrni, int x, int y)
{
- SCRN_INFO_PTR(arg);
int i;
XF86VideoAdaptorPtr adpt;
Z4lPortPrivRec *pPriv;
@@ -1286,7 +1285,7 @@ Z4lAdjustFrame(ADJUST_FRAME_ARGS_DECL)
DBLOG(3, "Z4lAdjustFrame(%d,%d)\n", x, y);
z4l_x_offset = x;
z4l_y_offset = y;
- oldAdjustFrame(ADJUST_FRAME_ARGS(x, y));
+ oldAdjustFrame(pScrni, x, y);
/* xv adjust does not handle putvideo case */
for (i = 0; i < Z4l_nAdaptors; ++i) {