xserver: Branch 'master' - 5 commits
Alan Coopersmith
alanc at kemper.freedesktop.org
Wed Jan 2 19:29:03 PST 2008
Xext/xvdisp.c | 46 ++++++++++++++++--------------
dix/dispatch.c | 2 +
hw/xfree86/dummylib/Makefile.am | 2 -
hw/xfree86/dummylib/dixprivates.c | 19 ++++++++++++
hw/xfree86/dummylib/xf86getpagesize.c | 21 -------------
hw/xfree86/os-support/solaris/sun_mouse.c | 6 +--
hw/xfree86/utils/ioport/ioport.c | 1
7 files changed, 50 insertions(+), 47 deletions(-)
New commits:
commit ccf6636d2ca8acdaaeb8da34db507a10a082b0de
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Wed Jan 2 19:28:33 2008 -0800
Kill xf86getpagesize even harder (dummylib & ioport)
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index 2ab0a77..ad3f1ea 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -25,7 +25,6 @@ libdummy_nonserver_a_SOURCES = \
xf86drvmsgverb.c \
xf86errorf.c \
xf86errorfverb.c \
- xf86getpagesize.c \
xf86getverb.c \
xf86info.c \
xf86msg.c \
diff --git a/hw/xfree86/dummylib/xf86getpagesize.c b/hw/xfree86/dummylib/xf86getpagesize.c
deleted file mode 100644
index 8859c76..0000000
--- a/hw/xfree86/dummylib/xf86getpagesize.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-/*
- * Utility functions required by libxf86_os.
- */
-
-int xf86getpagesize(void);
-
-_X_EXPORT int
-xf86getpagesize(void)
-{
- return 4096; /* not used */
-}
-
diff --git a/hw/xfree86/utils/ioport/ioport.c b/hw/xfree86/utils/ioport/ioport.c
index 3221364..7370434 100644
--- a/hw/xfree86/utils/ioport/ioport.c
+++ b/hw/xfree86/utils/ioport/ioport.c
@@ -489,4 +489,3 @@ main(argc, argv)
return (0);
}
-#include "xf86getpagesize.c"
commit dfd682b582636a36345144bcf835e3ee46718d90
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Wed Jan 2 19:27:22 2008 -0800
X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly
X.Org Bugzilla #4947 <https://bugs.freedesktop.org/show_bug.cgi?id=4947>
Sun bug 6646626 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6646626>
Don't use swapped data after swapping it. When done swapping data,
send the swapped data, not the address of the pointer to it, to the client.
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 8096c8c..17ff1d7 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -67,7 +67,7 @@ SWriteQueryExtensionReply(
swaps(&rep->version, n);
swaps(&rep->revision, n);
- (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)rep);
return Success;
}
@@ -83,7 +83,7 @@ SWriteQueryAdaptorsReply(
swapl(&rep->length, n);
swaps(&rep->num_adaptors, n);
- (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)rep);
return Success;
}
@@ -99,7 +99,7 @@ SWriteQueryEncodingsReply(
swapl(&rep->length, n);
swaps(&rep->num_encodings, n);
- (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)rep);
return Success;
}
@@ -204,7 +204,7 @@ SWriteGrabPortReply(
swaps(&rep->sequenceNumber, n);
swapl(&rep->length, n);
- (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvGrabPortReply, (char *)rep);
return Success;
}
@@ -220,7 +220,7 @@ SWriteGetPortAttributeReply(
swapl(&rep->length, n);
swapl(&rep->value, n);
- (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)rep);
return Success;
}
@@ -237,7 +237,7 @@ SWriteQueryBestSizeReply(
swaps(&rep->actual_width, n);
swaps(&rep->actual_height, n);
- (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)rep);
return Success;
}
@@ -254,7 +254,7 @@ SWriteQueryPortAttributesReply(
swapl(&rep->num_attributes, n);
swapl(&rep->text_size, n);
- (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)rep);
return Success;
}
@@ -273,7 +273,7 @@ SWriteQueryImageAttributesReply(
swaps(&rep->width, n);
swaps(&rep->height, n);
- (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)rep);
return Success;
}
@@ -289,7 +289,7 @@ SWriteListImageFormatsReply(
swapl(&rep->length, n);
swapl(&rep->num_formats, n);
- (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep);
+ (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)rep);
return Success;
}
@@ -378,6 +378,7 @@ ProcXvQueryAdaptors(ClientPtr client)
xvAdaptorInfo ainfo;
xvQueryAdaptorsReply rep;
int totalSize, na, nf, rc;
+ int nameSize;
XvAdaptorPtr pa;
XvFormatPtr pf;
WindowPtr pWin;
@@ -439,12 +440,12 @@ ProcXvQueryAdaptors(ClientPtr client)
ainfo.base_id = pa->base_id;
ainfo.num_ports = pa->nPorts;
ainfo.type = pa->type;
- ainfo.name_size = strlen(pa->name);
+ ainfo.name_size = nameSize = strlen(pa->name);
ainfo.num_formats = pa->nFormats;
_WriteAdaptorInfo(client, &ainfo);
- WriteToClient(client, ainfo.name_size, pa->name);
+ WriteToClient(client, nameSize, pa->name);
nf = pa->nFormats;
pf = pa->pFormats;
@@ -469,6 +470,7 @@ ProcXvQueryEncodings(ClientPtr client)
xvEncodingInfo einfo;
xvQueryEncodingsReply rep;
int totalSize;
+ int nameSize;
XvPortPtr pPort;
int ne;
XvEncodingPtr pe;
@@ -513,13 +515,13 @@ ProcXvQueryEncodings(ClientPtr client)
while (ne--)
{
einfo.encoding = pe->id;
- einfo.name_size = strlen(pe->name);
+ einfo.name_size = nameSize = strlen(pe->name);
einfo.width = pe->width;
einfo.height = pe->height;
einfo.rate.numerator = pe->rate.numerator;
einfo.rate.denominator = pe->rate.denominator;
_WriteEncodingInfo(client, &einfo);
- WriteToClient(client, einfo.name_size, pe->name);
+ WriteToClient(client, nameSize, pe->name);
pe++;
}
@@ -984,18 +986,19 @@ ProcXvQueryPortAttributes(ClientPtr client)
rep.text_size = 0;
for(i = 0, pAtt = pPort->pAdaptor->pAttributes;
- i < rep.num_attributes; i++, pAtt++)
+ i < pPort->pAdaptor->nAttributes; i++, pAtt++)
{
rep.text_size += (strlen(pAtt->name) + 1 + 3) & ~3L;
}
- rep.length = (rep.num_attributes * sz_xvAttributeInfo) + rep.text_size;
+ rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo)
+ + rep.text_size;
rep.length >>= 2;
_WriteQueryPortAttributesReply(client, &rep);
for(i = 0, pAtt = pPort->pAdaptor->pAttributes;
- i < rep.num_attributes; i++, pAtt++)
+ i < pPort->pAdaptor->nAttributes; i++, pAtt++)
{
size = strlen(pAtt->name) + 1; /* pass the NULL */
Info.flags = pAtt->flags;
@@ -1211,6 +1214,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
XvPortPtr pPort;
int *offsets;
int *pitches;
+ int planeLength;
REQUEST(xvQueryImageAttributesReq);
REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
@@ -1250,7 +1254,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.length = num_planes << 1;
+ rep.length = planeLength = num_planes << 1;
rep.num_planes = num_planes;
rep.width = width;
rep.height = height;
@@ -1258,8 +1262,8 @@ ProcXvQueryImageAttributes(ClientPtr client)
_WriteQueryImageAttributesReply(client, &rep);
if(client->swapped)
- SwapLongs((CARD32*)offsets, rep.length);
- WriteToClient(client, rep.length << 2, (char*)offsets);
+ SwapLongs((CARD32*)offsets, planeLength);
+ WriteToClient(client, planeLength << 2, (char*)offsets);
xfree(offsets);
@@ -1287,13 +1291,13 @@ ProcXvListImageFormats(ClientPtr client)
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.num_formats = pPort->pAdaptor->nImages;
- rep.length = rep.num_formats * sz_xvImageFormatInfo >> 2;
+ rep.length = pPort->pAdaptor->nImages * sz_xvImageFormatInfo >> 2;
_WriteListImageFormatsReply(client, &rep);
pImage = pPort->pAdaptor->pImages;
- for(i = 0; i < rep.num_formats; i++, pImage++) {
+ for(i = 0; i < pPort->pAdaptor->nImages; i++, pImage++) {
info.id = pImage->id;
info.type = pImage->type;
info.byte_order = pImage->byte_order;
commit f6666dcc3b1ac60f850ea53c357a9ef61672a52a
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Wed Jan 2 19:19:55 2008 -0800
Add dixAllocatePrivate stub to dummylib for utils
Normally not necessary, except when building non-optimized/debug causes
the inline functions from private.h to appear in os-support/libxorgos.la
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index 3e70d25..2ab0a77 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -13,6 +13,7 @@ STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
endif
libdummy_nonserver_a_SOURCES = \
+ dixprivates.c \
fatalerror.c \
logvwrite.c \
$(STRL_SRCS) \
diff --git a/hw/xfree86/dummylib/dixprivates.c b/hw/xfree86/dummylib/dixprivates.c
new file mode 100644
index 0000000..40c173a
--- /dev/null
+++ b/hw/xfree86/dummylib/dixprivates.c
@@ -0,0 +1,19 @@
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "os.h"
+#include "xf86.h"
+#include "xf86Priv.h"
+
+/*
+ * Utility functions required by libxf86_os.
+ */
+
+_X_EXPORT pointer *
+dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key)
+{
+ return NULL; /* not used */
+}
+
commit 73f422996016107d5f53492e4197bb05ed9c4bb9
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Wed Jan 2 19:17:54 2008 -0800
Fix names/types of new vuidMouse{Get,Set}ScreenPrivates macros
diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c
index b1b7797..a5955ef 100644
--- a/hw/xfree86/os-support/solaris/sun_mouse.c
+++ b/hw/xfree86/os-support/solaris/sun_mouse.c
@@ -122,10 +122,10 @@ static void vuidMouseAdjustFrame(int index, int x, int y, int flags);
static int vuidMouseGeneration = 0;
static DevPrivateKey vuidMouseScreenKey = &vuidMouseScreenKey;
-#define vuidGetMouseScreenPrivate(s) ((VuidMsePtr) \
+#define vuidMouseGetScreenPrivate(s) ( \
dixLookupPrivate(&(s)->devPrivates, vuidMouseScreenKey))
-#define vuidSetMouseScreenPrivate(s,p) \
- dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, p)
+#define vuidMouseSetScreenPrivate(s,p) \
+ dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, (void *) p)
#endif /* HAVE_ABSOLUTE_MOUSE_SCALING */
static inline
commit 895073f6b41d9313cfe748232c492c5e9f76b443
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Wed Jan 2 18:09:26 2008 -0800
Restore include & typedef needed by dtrace
996b621bec1bbc4fb21970c75eaec62053bc6ccb deleted a couple lines too many
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 577e17c..004509c 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -149,6 +149,8 @@ int ProcInitialConnection();
#ifdef XSERVER_DTRACE
#include "registry.h"
+#include <sys/types.h>
+typedef const char *string;
#include "Xserver-dtrace.h"
#endif
More information about the xorg-commit
mailing list