mirror of
https://github.com/X11Libre/xf86-video-geode.git
synced 2026-04-14 11:05:30 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user