From 3f45b624ef9308c42e8e62012d5d92e448c84def Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 14 May 2024 16:29:17 +0200 Subject: [PATCH] drop compat with ancient xserver versions We're relying on at least 1.18 now. Signed-off-by: Enrico Weigelt, metux IT consult --- saa/saa.c | 21 --------- saa/saa_accel.c | 6 --- saa/saa_priv.h | 37 ++------------- saa/saa_unaccel.c | 7 --- src/common_compat.h | 33 ------------- src/vmware.c | 47 +------------------ src/vmware.h | 8 ---- src/vmware_bootstrap.c | 10 ---- src/vmwarectrl.c | 49 ++++++++------------ src/vmwaremodes.c | 2 +- src/vmwarevideo.c | 46 ++---------------- src/vmwarexinerama.c | 98 +++++++++++++-------------------------- vmwgfx/vmwgfx_ctrl.c | 49 ++++++++------------ vmwgfx/vmwgfx_driver.c | 4 +- vmwgfx/vmwgfx_driver.h | 8 ---- vmwgfx/vmwgfx_overlay.c | 4 +- vmwgfx/vmwgfx_tex_video.c | 12 ++--- 17 files changed, 92 insertions(+), 349 deletions(-) diff --git a/saa/saa.c b/saa/saa.c index c401599..953f934 100644 --- a/saa/saa.c +++ b/saa/saa.c @@ -40,15 +40,9 @@ #include "saa.h" #include "saa_priv.h" -#ifdef SAA_DEVPRIVATEKEYREC DevPrivateKeyRec saa_screen_index; DevPrivateKeyRec saa_pixmap_index; DevPrivateKeyRec saa_gc_index; -#else -int saa_screen_index = -1; -int saa_pixmap_index = -1; -int saa_gc_index = -1; -#endif /** * saa_get_drawable_pixmap() returns a backing pixmap for a given drawable. @@ -712,7 +706,6 @@ saa_driver_init(ScreenPtr screen, struct saa_driver * saa_driver) return FALSE; } #endif -#ifdef SAA_DEVPRIVATEKEYREC if (!dixRegisterPrivateKey(&saa_screen_index, PRIVATE_SCREEN, 0)) { LogMessage(X_ERROR, "Failed to register SAA screen private.\n"); return FALSE; @@ -727,20 +720,6 @@ saa_driver_init(ScreenPtr screen, struct saa_driver * saa_driver) LogMessage(X_ERROR, "Failed to register SAA gc private.\n"); return FALSE; } -#else - if (!dixRequestPrivate(&saa_screen_index, 0)) { - LogMessage(X_ERROR, "Failed to register SAA screen private.\n"); - return FALSE; - } - if (!dixRequestPrivate(&saa_pixmap_index, saa_driver->pixmap_size)) { - LogMessage(X_ERROR, "Failed to register SAA pixmap private.\n"); - return FALSE; - } - if (!dixRequestPrivate(&saa_gc_index, sizeof(struct saa_gc_priv))) { - LogMessage(X_ERROR, "Failed to register SAA gc private.\n"); - return FALSE; - } -#endif sscreen = calloc(1, sizeof(*sscreen)); diff --git a/saa/saa_accel.c b/saa/saa_accel.c index 5e1501b..a7278fd 100644 --- a/saa/saa_accel.c +++ b/saa/saa_accel.c @@ -141,13 +141,7 @@ saa_copy_area(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, srcx, srcy, width, height, dstx, dsty); } -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 6) return miDoCopy(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, saa_copy_nton, 0, NULL); -#else - return fbDoCopy(pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, - dstx, dsty, saa_copy_nton, 0, NULL); -#endif } diff --git a/saa/saa_priv.h b/saa/saa_priv.h index 06ff8f7..b0d8763 100644 --- a/saa/saa_priv.h +++ b/saa/saa_priv.h @@ -66,8 +66,8 @@ struct saa_gc_priv { /* GC values from the layer below. */ - CONST_ABI_18_0 GCOps *saved_ops; - CONST_ABI_18_0 GCFuncs *saved_funcs; + const GCOps *saved_ops; + const GCFuncs *saved_funcs; }; struct saa_screen_priv { @@ -138,14 +138,11 @@ do { \ } #define saa_swap(priv, real, mem) {\ - CONST_ABI_18_0 void *tmp = (priv)->saved_##mem; \ + const void *tmp = (priv)->saved_##mem; \ (priv)->saved_##mem = (real)->mem; \ (real)->mem = tmp; \ } -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 8) -#define SAA_DEVPRIVATEKEYREC 1 - extern DevPrivateKeyRec saa_screen_index; extern DevPrivateKeyRec saa_pixmap_index; extern DevPrivateKeyRec saa_gc_index; @@ -170,34 +167,6 @@ saa_pixmap(PixmapPtr pix) return (struct saa_pixmap *)dixGetPrivateAddr(&pix->devPrivates, &saa_pixmap_index); } -#else -#undef SAA_DEVPRIVATEKEYREC -extern int saa_screen_index; -extern int saa_pixmap_index; -extern int saa_gc_index; - -static inline struct saa_screen_priv * -saa_screen(ScreenPtr screen) -{ - return (struct saa_screen_priv *)dixLookupPrivate(&screen->devPrivates, - &saa_screen_index); -} - -static inline struct saa_gc_priv * -saa_gc(GCPtr gc) -{ - return (struct saa_gc_priv *)dixLookupPrivateAddr(&gc->devPrivates, - &saa_gc_index); -} - -static inline struct saa_pixmap * -saa_pixmap(PixmapPtr pix) -{ - return (struct saa_pixmap *)dixLookupPrivateAddr(&pix->devPrivates, - &saa_pixmap_index); -} - -#endif extern void saa_check_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int nspans, diff --git a/saa/saa_unaccel.c b/saa/saa_unaccel.c index cff0587..8e0fda8 100644 --- a/saa/saa_unaccel.c +++ b/saa/saa_unaccel.c @@ -649,15 +649,10 @@ saa_check_copy_window(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) #ifdef RENDER -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10) static void saa_src_validate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) -#else -static void -saa_src_validate(DrawablePtr pDrawable, int x, int y, int width, int height) -#endif { ScreenPtr pScreen = pDrawable->pScreen; struct saa_screen_priv *sscreen = saa_screen(pScreen); @@ -682,9 +677,7 @@ saa_src_validate(DrawablePtr pDrawable, int x, int y, int width, int height) if (sscreen->saved_SourceValidate) { saa_swap(sscreen, pScreen, SourceValidate); pScreen->SourceValidate(pDrawable, x, y, width, height -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10) , subWindowMode -#endif ); saa_swap(sscreen, pScreen, SourceValidate); } diff --git a/src/common_compat.h b/src/common_compat.h index 2625697..c2c7be4 100644 --- a/src/common_compat.h +++ b/src/common_compat.h @@ -1,38 +1,6 @@ #ifndef _COMMON_COMPAT_H_ #define _COMMON_COMPAT_H_ -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 18) -#define CONST_ABI_18_0 const -#else -#define CONST_ABI_18_0 -#endif - -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 16) -#define CONST_ABI_16_0 const -#else -#define CONST_ABI_16_0 -#endif - -#if ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 16) && \ - (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 19)) -#define CONST_ABI_16_TO_19 const -#else -#define CONST_ABI_16_TO_19 -#endif - -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 13) -static inline void -xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode) -{ - *intern = *mode; - intern->prev = intern->next = NULL; - intern->name = NULL; - intern->PrivSize = 0; - intern->PrivFlags = 0; - intern->Private = NULL; -} -#endif - #ifndef fbGetRotatedPixmap #define fbGetRotatedPixmap(_pGC) NULL #endif @@ -42,4 +10,3 @@ xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode) #endif #endif - diff --git a/src/vmware.c b/src/vmware.c index 9c068dc..61bca19 100644 --- a/src/vmware.c +++ b/src/vmware.c @@ -43,46 +43,9 @@ char rcsId_vmware[] = #include #endif -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 5) - #define xf86LoaderReqSymLists(...) do {} while (0) #define LoaderRefSymLists(...) do {} while (0) -#else - -const char *vgahwSymbols[] = { - "vgaHWGetHWRec", - "vgaHWGetIOBase", - "vgaHWGetIndex", - "vgaHWInit", - "vgaHWProtect", - "vgaHWRestore", - "vgaHWSave", - "vgaHWSaveScreen", - "vgaHWUnlock", - NULL -}; - -static const char *fbSymbols[] = { - "fbCreateDefColormap", - "fbPictureInit", - "fbScreenInit", - NULL -}; - -static const char *ramdacSymbols[] = { - "xf86CreateCursorInfoRec", - "xf86DestroyCursorInfoRec", - "xf86InitCursor", - NULL -}; - -static const char *shadowfbSymbols[] = { - "ShadowFBInit2", - NULL -}; -#endif - /* Table of default modes to always add to the mode list. */ typedef struct { @@ -307,12 +270,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) uint32 width = 0, height = 0; Bool defaultMode; -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 -#ifndef BUILD_FOR_420 - domainIOBase = pScrn->domainIOBase; -#endif -#endif - if (flags & PROBE_DETECT) { return FALSE; } @@ -1343,7 +1300,7 @@ VMWAREScreenInit(SCREEN_INIT_ARGS_DECL) if (useXinerama && xf86IsOptionSet(options, OPTION_GUI_LAYOUT)) { - CONST_ABI_18_0 char *topology = xf86GetOptValString(options, OPTION_GUI_LAYOUT); + const char *topology = xf86GetOptValString(options, OPTION_GUI_LAYOUT); if (topology) { pVMWARE->xineramaState = VMWAREParseTopologyString(pScrn, topology, @@ -1355,7 +1312,7 @@ VMWAREScreenInit(SCREEN_INIT_ARGS_DECL) } } else if (useXinerama && xf86IsOptionSet(options, OPTION_STATIC_XINERAMA)) { - CONST_ABI_18_0 char *topology = xf86GetOptValString(options, OPTION_STATIC_XINERAMA); + const char *topology = xf86GetOptValString(options, OPTION_STATIC_XINERAMA); if (topology) { pVMWARE->xineramaState = VMWAREParseTopologyString(pScrn, topology, diff --git a/src/vmware.h b/src/vmware.h index f08a283..72cebc9 100644 --- a/src/vmware.h +++ b/src/vmware.h @@ -43,14 +43,6 @@ #include "vmware_bootstrap.h" #include -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 -#define _swapl(x, n) swapl(x,n) -#define _swaps(x, n) swaps(x,n) -#else -#define _swapl(x, n) (void) n; swapl(x) -#define _swaps(x, n) (void) n; swaps(x) -#endif - /* * The virtual hardware's cursor limits are pretty big. Some VMware * product versions limit to 1024x1024 pixels, others limit to 128 diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c index 3754446..bb59bf7 100644 --- a/src/vmware_bootstrap.c +++ b/src/vmware_bootstrap.c @@ -36,10 +36,6 @@ #include "vmware_bootstrap.h" #include -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 -#include "xf86Resources.h" -#endif - #ifndef XSERVER_LIBPCIACCESS #include "vm_basic_types.h" #include "svga_reg.h" @@ -499,10 +495,8 @@ VMWareDriverFunc(ScrnInfoPtr pScrn, pScrn->yDpi / 2) / pScrn->yDpi; } return TRUE; -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 18 case SUPPORTS_SERVER_FDS: return TRUE; -#endif default: return FALSE; } @@ -525,7 +519,6 @@ _X_EXPORT DriverRec vmware = { #if VMWARE_DRIVER_FUNC VMWareDriverFunc, #endif -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 4 #ifdef XSERVER_LIBPCIACCESS VMwareDeviceMatch, VMwarePciProbe, @@ -533,14 +526,11 @@ _X_EXPORT DriverRec vmware = { NULL, NULL, #endif -#endif -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 13 #ifdef XSERVER_PLATFORM_BUS VMwarePlatformProbe, #else NULL, #endif -#endif }; diff --git a/src/vmwarectrl.c b/src/vmwarectrl.c index d31bef6..c390a7d 100644 --- a/src/vmwarectrl.c +++ b/src/vmwarectrl.c @@ -72,7 +72,6 @@ static int VMwareCtrlQueryVersion(ClientPtr client) { xVMwareCtrlQueryVersionReply rep = { 0, }; - register int n; REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); @@ -82,10 +81,10 @@ VMwareCtrlQueryVersion(ClientPtr client) rep.majorVersion = VMWARE_CTRL_MAJOR_VERSION; rep.minorVersion = VMWARE_CTRL_MINOR_VERSION; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.majorVersion, n); - _swapl(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xVMwareCtrlQueryVersionReply), (char *)&rep); @@ -201,7 +200,6 @@ VMwareCtrlSetRes(ClientPtr client) xVMwareCtrlSetResReply rep = { 0, }; ScrnInfoPtr pScrn; ExtensionEntry *ext; - register int n; REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq); @@ -225,11 +223,11 @@ VMwareCtrlSetRes(ClientPtr client) rep.x = stuff->x; rep.y = stuff->y; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.screen, n); - _swapl(&rep.x, n); - _swapl(&rep.y, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.screen); + swapl(&rep.x); + swapl(&rep.y); } WriteToClient(client, sizeof(xVMwareCtrlSetResReply), (char *)&rep); @@ -355,7 +353,6 @@ VMwareCtrlSetTopology(ClientPtr client) xVMwareCtrlSetTopologyReply rep = { 0, }; ScrnInfoPtr pScrn; ExtensionEntry *ext; - register int n; xXineramaScreenInfo *extents; REQUEST_AT_LEAST_SIZE(xVMwareCtrlSetTopologyReq); @@ -379,9 +376,9 @@ VMwareCtrlSetTopology(ClientPtr client) rep.sequenceNumber = client->sequence; rep.screen = stuff->screen; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.screen, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.screen); } WriteToClient(client, sizeof(xVMwareCtrlSetTopologyReply), (char *)&rep); @@ -443,12 +440,10 @@ VMwareCtrlDispatch(ClientPtr client) static int SVMwareCtrlQueryVersion(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlQueryVersionReq); REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); - _swaps(&stuff->length, n); + swaps(&stuff->length); return VMwareCtrlQueryVersion(client); } @@ -474,15 +469,13 @@ SVMwareCtrlQueryVersion(ClientPtr client) static int SVMwareCtrlSetRes(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlSetResReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq); - _swaps(&stuff->length, n); - _swapl(&stuff->screen, n); - _swapl(&stuff->x, n); - _swapl(&stuff->y, n); + swaps(&stuff->length); + swapl(&stuff->screen); + swapl(&stuff->x); + swapl(&stuff->y); return VMwareCtrlSetRes(client); } @@ -508,14 +501,12 @@ SVMwareCtrlSetRes(ClientPtr client) static int SVMwareCtrlSetTopology(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlSetTopologyReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetTopologyReq); - _swaps(&stuff->length, n); - _swapl(&stuff->screen, n); - _swapl(&stuff->number, n); + swaps(&stuff->length); + swapl(&stuff->screen); + swapl(&stuff->number); /* Each extent is a struct of shorts. */ SwapRestS(stuff); diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c index 1d296ac..f7c28a8 100644 --- a/src/vmwaremodes.c +++ b/src/vmwaremodes.c @@ -84,7 +84,7 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight) DisplayModeRec dynamic = { MODEPREFIX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, MODESUFFIX }; unsigned dispModeCount = 0; - CONST_ABI_18_0 char **dispModeList; + const char **dispModeList; char *dynModeName; char name[80]; VMWAREPtr pVMWARE = VMWAREPTR(pScrn); diff --git a/src/vmwarevideo.c b/src/vmwarevideo.c index 3ba1dcd..e8611bc 100644 --- a/src/vmwarevideo.c +++ b/src/vmwarevideo.c @@ -53,17 +53,10 @@ #include #endif -static CONST_ABI_16_0 char xv_adapt_name[] = "VMWare Overlay Video Engine"; -static CONST_ABI_16_0 char xv_image_name[] = "XV_IMAGE"; +static const char xv_adapt_name[] = "VMWare Overlay Video Engine"; +static const char xv_image_name[] = "XV_IMAGE"; -#define HAVE_FILLKEYHELPERDRAWABLE \ - ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 2) || \ - ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) == 1) && \ - (GET_ABI_MINOR(ABI_VIDEODRV_VERSION) >= 2))) - -#if HAVE_FILLKEYHELPERDRAWABLE #include -#endif #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) @@ -114,8 +107,8 @@ static XF86ImageRec vmwareVideoImages[] = XVIMAGE_UYVY }; -static CONST_ABI_16_TO_19 char xv_colorkey_name[] = "XV_COLORKEY"; -static CONST_ABI_16_TO_19 char xv_autopaint_name[] = "XV_AUTOPAINT_COLORKEY"; +static char xv_colorkey_name[] = "XV_COLORKEY"; +static char xv_autopaint_name[] = "XV_AUTOPAINT_COLORKEY"; #define VMWARE_VID_NUM_ATTRIBUTES 2 static XF86AttributeRec vmwareVideoAttributes[] = @@ -197,20 +190,12 @@ typedef VMWAREVideoRec *VMWAREVideoPtr; /* * Callback functions */ -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1) static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int image, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr dst); -#else -static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, - short drw_x, short drw_y, short src_w, short src_h, - short drw_w, short drw_h, int image, - unsigned char *buf, short width, short height, - Bool sync, RegionPtr clipBoxes, pointer data); -#endif static void vmwareStopVideo(ScrnInfoPtr pScrn, pointer data, Bool Cleanup); static int vmwareQueryImageAttributes(ScrnInfoPtr pScrn, int format, unsigned short *width, @@ -696,16 +681,12 @@ vmwareVideoInitStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid, BoxPtr boxes = REGION_RECTS(&pVid->clipBoxes); int nBoxes = REGION_NUM_RECTS(&pVid->clipBoxes); -#if HAVE_FILLKEYHELPERDRAWABLE if (draw->type == DRAWABLE_WINDOW) { xf86XVFillKeyHelperDrawable(draw, pVid->colorKey, clipBoxes); DamageDamageRegion(draw, clipBoxes); } else { xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes); } -#else - xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes); -#endif /** * Force update to paint the colorkey before the overlay flush. */ @@ -887,11 +868,7 @@ vmwareVideoPlay(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid, BoxPtr boxes = REGION_RECTS(&pVid->clipBoxes); int nBoxes = REGION_NUM_RECTS(&pVid->clipBoxes); -#if HAVE_FILLKEYHELPERDRAWABLE xf86XVFillKeyHelperDrawable(draw, pVid->colorKey, clipBoxes); -#else - xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes); -#endif /** * Force update to paint the colorkey before the overlay flush. */ @@ -1090,7 +1067,6 @@ vmwareVideoEndStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid) *----------------------------------------------------------------------------- */ -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1) static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, @@ -1098,14 +1074,6 @@ vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr dst) -#else -static int -vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, - short drw_x, short drw_y, short src_w, short src_h, - short drw_w, short drw_h, int format, - unsigned char *buf, short width, short height, - Bool sync, RegionPtr clipBoxes, pointer data) -#endif { VMWAREPtr pVMWARE = VMWAREPTR(pScrn); VMWAREVideoPtr pVid = data; @@ -1116,15 +1084,9 @@ vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, return XvBadAlloc; } -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1) return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w, src_h, drw_w, drw_h, format, buf, width, height, clipBoxes, dst); -#else - return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w, src_h, - drw_w, drw_h, format, buf, width, height, clipBoxes, - NULL); -#endif } diff --git a/src/vmwarexinerama.c b/src/vmwarexinerama.c index 954abdc..d9c4216 100644 --- a/src/vmwarexinerama.c +++ b/src/vmwarexinerama.c @@ -48,27 +48,6 @@ #include #endif -/* - * LookupWindow was removed with video abi 11. - */ -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) -#ifndef DixGetAttrAccess -#define DixGetAttrAccess (1<<4) -#endif -#endif - -#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 2) -static inline int -dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) -{ - *pWin = LookupWindow(id, client); - if (!*pWin) - return BadWindow; - return Success; -} -#endif - - /* *---------------------------------------------------------------------------- * @@ -90,7 +69,6 @@ static int VMwareXineramaQueryVersion(ClientPtr client) { xPanoramiXQueryVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); rep.type = X_Reply; @@ -99,10 +77,10 @@ VMwareXineramaQueryVersion(ClientPtr client) rep.majorVersion = 1; rep.minorVersion = 0; if(client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swaps(&rep.majorVersion, n); - _swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -132,7 +110,6 @@ VMwareXineramaGetState(ClientPtr client) REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; - register int n; ExtensionEntry *ext; ScrnInfoPtr pScrn; VMWAREPtr pVMWARE; @@ -155,9 +132,9 @@ VMwareXineramaGetState(ClientPtr client) rep.state = pVMWARE->xinerama; rep.window = stuff->window; if(client->swapped) { - _swaps (&rep.sequenceNumber, n); - _swapl (&rep.length, n); - _swapl (&rep.window, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep); return client->noClientException; @@ -187,7 +164,6 @@ VMwareXineramaGetScreenCount(ClientPtr client) REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; - register int n; ExtensionEntry *ext; ScrnInfoPtr pScrn; VMWAREPtr pVMWARE; @@ -211,9 +187,9 @@ VMwareXineramaGetScreenCount(ClientPtr client) rep.window = stuff->window; if(client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.window, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); return client->noClientException; @@ -243,7 +219,6 @@ VMwareXineramaGetScreenSize(ClientPtr client) REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; - register int n; ExtensionEntry *ext; ScrnInfoPtr pScrn; VMWAREPtr pVMWARE; @@ -269,12 +244,12 @@ VMwareXineramaGetScreenSize(ClientPtr client) rep.window = stuff->window; rep.screen = stuff->screen; if(client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.width, n); - _swapl(&rep.height, n); - _swapl(&rep.window, n); - _swapl(&rep.screen, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.width); + swapl(&rep.height); + swapl(&rep.window); + swapl(&rep.screen); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); return client->noClientException; @@ -319,10 +294,9 @@ VMwareXineramaIsActive(ClientPtr client) rep.sequenceNumber = client->sequence; rep.state = pVMWARE->xinerama; if(client->swapped) { - register int n; - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.state, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.state); } WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); return client->noClientException; @@ -367,10 +341,9 @@ VMwareXineramaQueryScreens(ClientPtr client) rep.number = pVMWARE->xinerama ? pVMWARE->xineramaNumOutputs : 0; rep.length = rep.number * sz_XineramaScreenInfo >> 2; if(client->swapped) { - register int n; - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.number, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.number); } WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep); @@ -384,11 +357,10 @@ VMwareXineramaQueryScreens(ClientPtr client) scratch.width = pVMWARE->xineramaState[i].width; scratch.height = pVMWARE->xineramaState[i].height; if(client->swapped) { - register int n; - _swaps(&scratch.x_org, n); - _swaps(&scratch.y_org, n); - _swaps(&scratch.width, n); - _swaps(&scratch.height, n); + swaps(&scratch.x_org); + swaps(&scratch.y_org); + swaps(&scratch.width); + swaps(&scratch.height); } WriteToClient(client, sz_XineramaScreenInfo, (char *)&scratch); } @@ -458,8 +430,7 @@ static int SVMwareXineramaQueryVersion (ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); - register int n; - _swaps(&stuff->length,n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); return VMwareXineramaQueryVersion(client); } @@ -486,8 +457,7 @@ static int SVMwareXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); - register int n; - _swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return VMwareXineramaGetState(client); } @@ -514,8 +484,7 @@ static int SVMwareXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); - register int n; - _swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return VMwareXineramaGetScreenCount(client); } @@ -542,8 +511,7 @@ static int SVMwareXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); - register int n; - _swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return VMwareXineramaGetScreenSize(client); } @@ -570,8 +538,7 @@ static int SVMwareXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); - register int n; - _swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return VMwareXineramaIsActive(client); } @@ -598,8 +565,7 @@ static int SVMwareXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); - register int n; - _swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return VMwareXineramaQueryScreens(client); } diff --git a/vmwgfx/vmwgfx_ctrl.c b/vmwgfx/vmwgfx_ctrl.c index 5b11f37..9d71949 100644 --- a/vmwgfx/vmwgfx_ctrl.c +++ b/vmwgfx/vmwgfx_ctrl.c @@ -66,7 +66,6 @@ static int VMwareCtrlQueryVersion(ClientPtr client) { xVMwareCtrlQueryVersionReply rep = { 0, }; - register int n; REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); @@ -76,10 +75,10 @@ VMwareCtrlQueryVersion(ClientPtr client) rep.majorVersion = VMWARE_CTRL_MAJOR_VERSION; rep.minorVersion = VMWARE_CTRL_MINOR_VERSION; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.majorVersion, n); - _swapl(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xVMwareCtrlQueryVersionReply), (char *)&rep); @@ -151,7 +150,6 @@ VMwareCtrlSetRes(ClientPtr client) xVMwareCtrlSetResReply rep = { 0, }; ScrnInfoPtr pScrn; ExtensionEntry *ext; - register int n; REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq); @@ -175,11 +173,11 @@ VMwareCtrlSetRes(ClientPtr client) rep.x = stuff->x; rep.y = stuff->y; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.screen, n); - _swapl(&rep.x, n); - _swapl(&rep.y, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.screen); + swapl(&rep.x); + swapl(&rep.y); } WriteToClient(client, sizeof(xVMwareCtrlSetResReply), (char *)&rep); @@ -259,7 +257,6 @@ VMwareCtrlSetTopology(ClientPtr client) xVMwareCtrlSetTopologyReply rep = { 0, }; ScrnInfoPtr pScrn; ExtensionEntry *ext; - register int n; xXineramaScreenInfo *extents; REQUEST_AT_LEAST_SIZE(xVMwareCtrlSetTopologyReq); @@ -283,9 +280,9 @@ VMwareCtrlSetTopology(ClientPtr client) rep.sequenceNumber = client->sequence; rep.screen = stuff->screen; if (client->swapped) { - _swaps(&rep.sequenceNumber, n); - _swapl(&rep.length, n); - _swapl(&rep.screen, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.screen); } WriteToClient(client, sizeof(xVMwareCtrlSetTopologyReply), (char *)&rep); @@ -347,12 +344,10 @@ VMwareCtrlDispatch(ClientPtr client) static int SVMwareCtrlQueryVersion(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlQueryVersionReq); REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); - _swaps(&stuff->length, n); + swaps(&stuff->length); return VMwareCtrlQueryVersion(client); } @@ -378,15 +373,13 @@ SVMwareCtrlQueryVersion(ClientPtr client) static int SVMwareCtrlSetRes(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlSetResReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq); - _swaps(&stuff->length, n); - _swapl(&stuff->screen, n); - _swapl(&stuff->x, n); - _swapl(&stuff->y, n); + swaps(&stuff->length); + swapl(&stuff->screen); + swapl(&stuff->x); + swapl(&stuff->y); return VMwareCtrlSetRes(client); } @@ -412,14 +405,12 @@ SVMwareCtrlSetRes(ClientPtr client) static int SVMwareCtrlSetTopology(ClientPtr client) { - register int n; - REQUEST(xVMwareCtrlSetTopologyReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetTopologyReq); - _swaps(&stuff->length, n); - _swapl(&stuff->screen, n); - _swapl(&stuff->number, n); + swaps(&stuff->length); + swapl(&stuff->screen); + swapl(&stuff->number); /* Each extent is a struct of shorts. */ SwapRestS(stuff); diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c index be0404d..c1dc42d 100644 --- a/vmwgfx/vmwgfx_driver.c +++ b/vmwgfx/vmwgfx_driver.c @@ -412,7 +412,7 @@ vmwgfx_pre_init_mode(ScrnInfoPtr pScrn, int flags) } if (xf86IsOptionSet(ms->Options, OPTION_GUI_LAYOUT)) { - CONST_ABI_18_0 char *topology = + const char *topology = xf86GetOptValString(ms->Options, OPTION_GUI_LAYOUT); ret = FALSE; @@ -422,7 +422,7 @@ vmwgfx_pre_init_mode(ScrnInfoPtr pScrn, int flags) } } else if (xf86IsOptionSet(ms->Options, OPTION_STATIC_XINERAMA)) { - CONST_ABI_18_0 char *topology = + const char *topology = xf86GetOptValString(ms->Options, OPTION_STATIC_XINERAMA); ret = FALSE; diff --git a/vmwgfx/vmwgfx_driver.h b/vmwgfx/vmwgfx_driver.h index 467fb21..1ce8b46 100644 --- a/vmwgfx/vmwgfx_driver.h +++ b/vmwgfx/vmwgfx_driver.h @@ -58,14 +58,6 @@ #include #endif -#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 -#define _swapl(x, n) swapl(x,n) -#define _swaps(x, n) swaps(x,n) -#else -#define _swapl(x, n) (void) n; swapl(x) -#define _swaps(x, n) (void) n; swaps(x) -#endif - #define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg); #define debug_printf(...) diff --git a/vmwgfx/vmwgfx_overlay.c b/vmwgfx/vmwgfx_overlay.c index 94d738c..7d956a0 100644 --- a/vmwgfx/vmwgfx_overlay.c +++ b/vmwgfx/vmwgfx_overlay.c @@ -115,8 +115,8 @@ static XF86ImageRec vmwareVideoImages[] = XVIMAGE_UYVY }; -static CONST_ABI_16_TO_19 char xv_colorkey_name[] = "XV_COLORKEY"; -static CONST_ABI_16_TO_19 char xv_autopaint_name[] = "XV_AUTOPAINT_COLORKEY"; +static char xv_colorkey_name[] = "XV_COLORKEY"; +static char xv_autopaint_name[] = "XV_AUTOPAINT_COLORKEY"; #define VMWARE_VID_NUM_ATTRIBUTES 2 static XF86AttributeRec vmwareVideoAttributes[] = diff --git a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c index 260494d..db94ad5 100644 --- a/vmwgfx/vmwgfx_tex_video.c +++ b/vmwgfx/vmwgfx_tex_video.c @@ -41,7 +41,7 @@ #include #include -static CONST_ABI_16_0 char xv_adapt_name[] = "XA G3D Textured Video"; +static const char xv_adapt_name[] = "XA G3D Textured Video"; /*Xxx get these from pipe's texture limits */ #define IMAGE_MAX_WIDTH 2048 @@ -74,11 +74,11 @@ static const float bt_709[] = { }; static Atom xvBrightness, xvContrast, xvSaturation, xvHue; -static CONST_ABI_16_TO_19 char xv_brightness_name[] = "XV_BRIGHTNESS"; -static CONST_ABI_16_TO_19 char xv_contrast_name[] = "XV_CONTRAST"; -static CONST_ABI_16_TO_19 char xv_saturation_name[] = "XV_SATURATION"; -static CONST_ABI_16_TO_19 char xv_hue_name[] = "XV_HUE"; -static CONST_ABI_16_TO_19 char xv_image_name[] = "XV_IMAGE"; +static char xv_brightness_name[] = "XV_BRIGHTNESS"; +static char xv_contrast_name[] = "XV_CONTRAST"; +static char xv_saturation_name[] = "XV_SATURATION"; +static char xv_hue_name[] = "XV_HUE"; +static char xv_image_name[] = "XV_IMAGE"; #define NUM_TEXTURED_ATTRIBUTES 4 static const XF86AttributeRec TexturedAttributes[NUM_TEXTURED_ATTRIBUTES] = {