xorg-x11-drv-vmware/vmware-11.0.3-abi12.patch
Adam Jackson 9e403b91a1 ABI rebuild
vmware-11.0.3-abi12.patch: Compensate for videoabi 12.
vmware-11.0.3-unbreak-xinerama.patch: Unbreak swapped dispatch in the
fake-xinerama code.
2011-11-16 19:17:19 -05:00

273 lines
9.6 KiB
Diff

Not backported from git, upstream is taking their sweet time about releases.
diff -up xf86-video-vmware-11.0.3/src/vmware.c.jx xf86-video-vmware-11.0.3/src/vmware.c
--- xf86-video-vmware-11.0.3/src/vmware.c.jx 2010-10-29 03:25:37.000000000 -0400
+++ xf86-video-vmware-11.0.3/src/vmware.c 2011-11-16 19:06:54.621005146 -0500
@@ -608,7 +608,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int fla
ClockRange* clockRanges;
IOADDRESS domainIOBase = 0;
-#ifndef BUILD_FOR_420
+#if !defined(BUILD_FOR_420) && ABI_VIDEODRV_VERSION < 12
domainIOBase = pScrn->domainIOBase;
#endif
diff -up xf86-video-vmware-11.0.3/src/vmwarectrl.c.jx xf86-video-vmware-11.0.3/src/vmwarectrl.c
--- xf86-video-vmware-11.0.3/src/vmwarectrl.c.jx 2010-09-07 06:19:21.000000000 -0400
+++ xf86-video-vmware-11.0.3/src/vmwarectrl.c 2011-11-16 19:12:38.786000035 -0500
@@ -81,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);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswapl(&rep.majorVersion, n);
+ vmswapl(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xVMwareCtrlQueryVersionReply), (char *)&rep);
@@ -224,11 +224,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);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswapl(&rep.screen, n);
+ vmswapl(&rep.x, n);
+ vmswapl(&rep.y, n);
}
WriteToClient(client, sizeof(xVMwareCtrlSetResReply), (char *)&rep);
@@ -394,9 +394,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);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswapl(&rep.screen, n);
}
WriteToClient(client, sizeof(xVMwareCtrlSetTopologyReply), (char *)&rep);
@@ -463,7 +463,7 @@ SVMwareCtrlQueryVersion(ClientPtr client
REQUEST(xVMwareCtrlQueryVersionReq);
REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq);
- swaps(&stuff->length, n);
+ vmswaps(&stuff->length, n);
return VMwareCtrlQueryVersion(client);
}
@@ -494,10 +494,10 @@ SVMwareCtrlSetRes(ClientPtr client)
REQUEST(xVMwareCtrlSetResReq);
REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq);
- swaps(&stuff->length, n);
- swapl(&stuff->screen, n);
- swapl(&stuff->x, n);
- swapl(&stuff->y, n);
+ vmswaps(&stuff->length, n);
+ vmswapl(&stuff->screen, n);
+ vmswapl(&stuff->x, n);
+ vmswapl(&stuff->y, n);
return VMwareCtrlSetRes(client);
}
@@ -528,9 +528,9 @@ SVMwareCtrlSetTopology(ClientPtr client)
REQUEST(xVMwareCtrlSetTopologyReq);
REQUEST_SIZE_MATCH(xVMwareCtrlSetTopologyReq);
- swaps(&stuff->length, n);
- swapl(&stuff->screen, n);
- swapl(&stuff->number, n);
+ vmswaps(&stuff->length, n);
+ vmswapl(&stuff->screen, n);
+ vmswapl(&stuff->number, n);
/* Each extent is a struct of shorts. */
SwapRestS(stuff);
diff -up xf86-video-vmware-11.0.3/src/vmware.h.jx xf86-video-vmware-11.0.3/src/vmware.h
--- xf86-video-vmware-11.0.3/src/vmware.h.jx 2010-10-19 08:55:22.000000000 -0400
+++ xf86-video-vmware-11.0.3/src/vmware.h 2011-11-16 19:12:08.924997691 -0500
@@ -43,6 +43,15 @@
#include "svga_reg.h"
#include "svga_struct.h"
+#if ABI_VIDEODRV_VERSION > 11
+/* ABI12 drops the extra parameter */
+#define vmswaps(a, b) swaps(a)
+#define vmswapl(a, b) swapl(a)
+#else
+#define vmswaps(a, b) swaps(a, b)
+#define vmswaps(a, b) swaps(a, b)
+#endif
+
/*
* The virtual hardware's cursor limits are pretty big. Some VMware
* product versions limit to 1024x1024 pixels, others limit to 128
diff -up xf86-video-vmware-11.0.3/src/vmwarexinerama.c.jx xf86-video-vmware-11.0.3/src/vmwarexinerama.c
--- xf86-video-vmware-11.0.3/src/vmwarexinerama.c.jx 2010-09-07 06:19:21.000000000 -0400
+++ xf86-video-vmware-11.0.3/src/vmwarexinerama.c 2011-11-16 19:12:36.830000131 -0500
@@ -79,10 +79,10 @@ VMwareXineramaQueryVersion(ClientPtr cli
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);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswaps(&rep.majorVersion, n);
+ vmswaps(&rep.minorVersion, n);
}
WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep);
return (client->noClientException);
@@ -132,9 +132,9 @@ VMwareXineramaGetState(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.state = pVMWARE->xinerama;
if(client->swapped) {
- swaps (&rep.sequenceNumber, n);
- swapl (&rep.length, n);
- swaps (&rep.state, n);
+ vmswaps (&rep.sequenceNumber, n);
+ vmswapl (&rep.length, n);
+ vmswaps (&rep.state, n);
}
WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
return client->noClientException;
@@ -184,9 +184,9 @@ VMwareXineramaGetScreenCount(ClientPtr c
rep.sequenceNumber = client->sequence;
rep.ScreenCount = pVMWARE->xineramaNumOutputs;
if(client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swaps(&rep.ScreenCount, n);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswaps(&rep.ScreenCount, n);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
return client->noClientException;
@@ -237,10 +237,10 @@ VMwareXineramaGetScreenSize(ClientPtr cl
rep.width = pVMWARE->xineramaState[stuff->screen].width;
rep.height = pVMWARE->xineramaState[stuff->screen].height;
if(client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swaps(&rep.width, n);
- swaps(&rep.height, n);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswaps(&rep.width, n);
+ vmswaps(&rep.height, n);
}
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
return client->noClientException;
@@ -286,9 +286,9 @@ VMwareXineramaIsActive(ClientPtr client)
rep.state = pVMWARE->xinerama;
if(client->swapped) {
register int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.state, n);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswapl(&rep.state, n);
}
WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);
return client->noClientException;
@@ -334,9 +334,9 @@ VMwareXineramaQueryScreens(ClientPtr cli
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);
+ vmswaps(&rep.sequenceNumber, n);
+ vmswapl(&rep.length, n);
+ vmswapl(&rep.number, n);
}
WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep);
@@ -351,10 +351,10 @@ VMwareXineramaQueryScreens(ClientPtr cli
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);
+ vmswaps(&scratch.x_org, n);
+ vmswaps(&scratch.y_org, n);
+ vmswaps(&scratch.width, n);
+ vmswaps(&scratch.height, n);
}
WriteToClient(client, sz_XineramaScreenInfo, (char *)&scratch);
}
@@ -425,7 +425,7 @@ SVMwareXineramaQueryVersion (ClientPtr c
{
REQUEST(xPanoramiXQueryVersionReq);
register int n;
- swaps(&stuff->length,n);
+ vmswaps(&stuff->length,n);
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
return VMwareXineramaQueryVersion(client);
}
@@ -453,7 +453,7 @@ SVMwareXineramaGetState(ClientPtr client
{
REQUEST(xPanoramiXGetStateReq);
register int n;
- swaps (&stuff->length, n);
+ vmswaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
return VMwareXineramaGetState(client);
}
@@ -481,7 +481,7 @@ SVMwareXineramaGetScreenCount(ClientPtr
{
REQUEST(xPanoramiXGetScreenCountReq);
register int n;
- swaps (&stuff->length, n);
+ vmswaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
return VMwareXineramaGetScreenCount(client);
}
@@ -509,7 +509,7 @@ SVMwareXineramaGetScreenSize(ClientPtr c
{
REQUEST(xPanoramiXGetScreenSizeReq);
register int n;
- swaps (&stuff->length, n);
+ vmswaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
return VMwareXineramaGetScreenSize(client);
}
@@ -537,7 +537,7 @@ SVMwareXineramaIsActive(ClientPtr client
{
REQUEST(xXineramaIsActiveReq);
register int n;
- swaps (&stuff->length, n);
+ vmswaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
return VMwareXineramaIsActive(client);
}
@@ -565,7 +565,7 @@ SVMwareXineramaQueryScreens(ClientPtr cl
{
REQUEST(xXineramaQueryScreensReq);
register int n;
- swaps (&stuff->length, n);
+ vmswaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
return VMwareXineramaQueryScreens(client);
}