diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-23 19:43:05 +0200 |
---|---|---|
committer | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-28 17:11:09 +0200 |
commit | 878048e3aec04c6bb8034f21afdfff37e3528c5f (patch) | |
tree | 134fd73c77c3acafce26766ffe53e309b3b636a3 /src | |
parent | 28e714fb98df73134c9d13cd4e01ff97089c0df0 (diff) |
Relying on >= 1.18 now, so no need to keep compat with older ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mach64/-/merge_requests/18>
Diffstat (limited to 'src')
-rw-r--r-- | src/atiadjust.c | 3 | ||||
-rw-r--r-- | src/atiadjust.h | 2 | ||||
-rw-r--r-- | src/aticonsole.c | 13 | ||||
-rw-r--r-- | src/aticonsole.h | 6 | ||||
-rw-r--r-- | src/atidga.c | 4 | ||||
-rw-r--r-- | src/atidri.c | 8 | ||||
-rw-r--r-- | src/atiscreen.c | 4 | ||||
-rw-r--r-- | src/atiscreen.h | 2 | ||||
-rw-r--r-- | src/compat-api.h | 56 |
9 files changed, 19 insertions, 79 deletions
diff --git a/src/atiadjust.c b/src/atiadjust.c index a6a7b56..2c59d9c 100644 --- a/src/atiadjust.c +++ b/src/atiadjust.c @@ -85,9 +85,8 @@ ATIAdjustPreInit * window. */ void -ATIAdjustFrame(ADJUST_FRAME_ARGS_DECL) +ATIAdjustFrame(ScrnInfoPtr pScreenInfo, int x, int y) { - SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); int Base; diff --git a/src/atiadjust.h b/src/atiadjust.h index 9509596..dd15f74 100644 --- a/src/atiadjust.h +++ b/src/atiadjust.h @@ -26,6 +26,6 @@ #include "atipriv.h" extern void ATIAdjustPreInit(ATIPtr); -extern void ATIAdjustFrame(ADJUST_FRAME_ARGS_DECL); +extern void ATIAdjustFrame(ScrnInfoPtr pScrn, int x, int y); #endif /* ___ATIADJUST_H___ */ diff --git a/src/aticonsole.c b/src/aticonsole.c index f9bbcd1..cf9da08 100644 --- a/src/aticonsole.c +++ b/src/aticonsole.c @@ -558,8 +558,8 @@ ATIEnterGraphics (void)ATISaveScreen(pScreen, SCREEN_SAVER_ON); /* Position the screen */ - (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, - pScreenInfo->frameX0, pScreenInfo->frameY0)); + (*pScreenInfo->AdjustFrame)(pScreenInfo, + pScreenInfo->frameX0, pScreenInfo->frameY0); SetTimeSinceLastInputEvent(); @@ -675,9 +675,8 @@ ATISwitchMode(SWITCH_MODE_ARGS_DECL) * This function sets the server's virtual console to a graphics video state. */ Bool -ATIEnterVT(VT_FUNC_ARGS_DECL) +ATIEnterVT(ScrnInfoPtr pScreenInfo) { - SCRN_INFO_PTR(arg); ScreenPtr pScreen = pScreenInfo->pScreen; ATIPtr pATI = ATIPTR(pScreenInfo); PixmapPtr pScreenPixmap; @@ -731,9 +730,8 @@ ATIEnterVT(VT_FUNC_ARGS_DECL) * entry. */ void -ATILeaveVT(VT_FUNC_ARGS_DECL) +ATILeaveVT(ScrnInfoPtr pScreenInfo) { - SCRN_INFO_PTR(arg); ScreenPtr pScreen = pScreenInfo->pScreen; ATIPtr pATI = ATIPTR(pScreenInfo); @@ -756,9 +754,8 @@ ATILeaveVT(VT_FUNC_ARGS_DECL) * This function frees all driver data related to a screen. */ void -ATIFreeScreen(FREE_SCREEN_ARGS_DECL) +ATIFreeScreen(ScrnInfoPtr pScreenInfo) { - SCRN_INFO_PTR(arg); ATIPtr pATI = ATIPTR(pScreenInfo); ATII2CFreeScreen(pScreenInfo->scrnIndex); diff --git a/src/aticonsole.h b/src/aticonsole.h index 0dd18cc..1733efd 100644 --- a/src/aticonsole.h +++ b/src/aticonsole.h @@ -35,9 +35,9 @@ extern void ATILeaveGraphics(ScrnInfoPtr, ATIPtr); extern Bool ATISwitchMode(SWITCH_MODE_ARGS_DECL); -extern Bool ATIEnterVT(VT_FUNC_ARGS_DECL); -extern void ATILeaveVT(VT_FUNC_ARGS_DECL); +extern Bool ATIEnterVT(ScrnInfoPtr pScrn); +extern void ATILeaveVT(ScrnInfoPtr pScrn); -extern void ATIFreeScreen(FREE_SCREEN_ARGS_DECL); +extern void ATIFreeScreen(ScrnInfoPtr pScrn); #endif /* ___ATICONSOLE_H___ */ diff --git a/src/atidga.c b/src/atidga.c index 75b0c79..205e6f6 100644 --- a/src/atidga.c +++ b/src/atidga.c @@ -130,7 +130,7 @@ ATIDGASetMode return FALSE; if (!pDGAMode) pATI->currentMode = NULL; - (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, frameX0, frameY0)); + (*pScreenInfo->AdjustFrame)(pScreenInfo, frameX0, frameY0); return TRUE; } @@ -149,7 +149,7 @@ ATIDGASetViewport int flags ) { - (*pScreenInfo->AdjustFrame)(ADJUST_FRAME_ARGS(pScreenInfo, x, y)); + (*pScreenInfo->AdjustFrame)(pScreenInfo, x, y); } /* diff --git a/src/atidri.c b/src/atidri.c index 6fcb1f0..2d42bc6 100644 --- a/src/atidri.c +++ b/src/atidri.c @@ -134,11 +134,11 @@ static void ATIDRITransitionTo2d_EXA(ScreenPtr pScreen) ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; - exaEnableDisableFBAccess(SCREEN_ARG(pScreen), FALSE); + exaEnableDisableFBAccess(pScreen, FALSE); pATI->pExa->offScreenBase = pATIDRIServer->backOffset; - exaEnableDisableFBAccess(SCREEN_ARG(pScreen), TRUE); + exaEnableDisableFBAccess(pScreen, TRUE); pATI->have3DWindows = FALSE; } @@ -149,12 +149,12 @@ static void ATIDRITransitionTo3d_EXA(ScreenPtr pScreen) ATIPtr pATI = ATIPTR(pScreenInfo); ATIDRIServerInfoPtr pATIDRIServer = pATI->pDRIServerInfo; - exaEnableDisableFBAccess(SCREEN_ARG(pScreen), FALSE); + exaEnableDisableFBAccess(pScreen, FALSE); pATI->pExa->offScreenBase = pATIDRIServer->textureOffset + pATIDRIServer->textureSize; - exaEnableDisableFBAccess(SCREEN_ARG(pScreen), TRUE); + exaEnableDisableFBAccess(pScreen, TRUE); pATI->have3DWindows = TRUE; } diff --git a/src/atiscreen.c b/src/atiscreen.c index 0adee08..56bf1e1 100644 --- a/src/atiscreen.c +++ b/src/atiscreen.c @@ -332,7 +332,7 @@ ATIScreenInit(SCREEN_INIT_ARGS_DECL) * This function is called by DIX to close the screen. */ Bool -ATICloseScreen (CLOSE_SCREEN_ARGS_DECL) +ATICloseScreen (ScreenPtr pScreen) { ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen); ATIPtr pATI = ATIPTR(pScreenInfo); @@ -373,5 +373,5 @@ ATICloseScreen (CLOSE_SCREEN_ARGS_DECL) pScreenInfo->pScreen = NULL; pScreen->CloseScreen = pATI->CloseScreen; - return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + return (*pScreen->CloseScreen)(pScreen); } diff --git a/src/atiscreen.h b/src/atiscreen.h index e180a72..2be5d15 100644 --- a/src/atiscreen.h +++ b/src/atiscreen.h @@ -26,6 +26,6 @@ #include "screenint.h" extern Bool ATIScreenInit(SCREEN_INIT_ARGS_DECL); -extern Bool ATICloseScreen(CLOSE_SCREEN_ARGS_DECL); +extern Bool ATICloseScreen(ScreenPtr pScreen); #endif /* ___ATISCREEN_H___ */ diff --git a/src/compat-api.h b/src/compat-api.h index 34d88b4..7f1108e 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -28,46 +28,6 @@ #ifndef COMPAT_API_H #define COMPAT_API_H -#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR -#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] -#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p -#endif - -#ifndef XF86_HAS_SCRN_CONV -#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] -#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] -#endif - -#ifndef XF86_SCRN_INTERFACE - -#define SCRN_ARG_TYPE int -#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScreenInfo = xf86Screens[(arg1)] - -#define SCREEN_ARG_TYPE int -#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] - -#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv - -#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask -#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask - -#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen -#define CLOSE_SCREEN_ARGS scrnIndex, pScreen - -#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags -#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 - -#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr pMode, int flags -#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 - -#define FREE_SCREEN_ARGS_DECL int arg, int flags - -#define VT_FUNC_ARGS_DECL int arg, int flags -#define VT_FUNC_ARGS pScreenInfo->scrnIndex, 0 - -#define XF86_SCRN_ARG(x) ((x)->scrnIndex) -#define SCREEN_ARG(x) ((x)->myNum) -#else #define SCRN_ARG_TYPE ScrnInfoPtr #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScreenInfo = (arg1) @@ -79,23 +39,7 @@ #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask -#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen -#define CLOSE_SCREEN_ARGS pScreen - -#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y -#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y - #define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode #define SWITCH_MODE_ARGS(arg, m) arg, m -#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg - -#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg -#define VT_FUNC_ARGS pScreenInfo - -#define XF86_SCRN_ARG(x) (x) - -#define SCREEN_ARG(x) (x) -#endif - #endif |