aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r--xorg-server/hw/kdrive/ephyr/Makefile.am1
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c15
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdriext.c146
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrglxext.c98
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrinit.c2
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrproxyext.c2
-rw-r--r--xorg-server/hw/kdrive/src/kxv.c12
7 files changed, 132 insertions, 144 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/Makefile.am b/xorg-server/hw/kdrive/ephyr/Makefile.am
index 9d9b64ee5..2e0613a7c 100644
--- a/xorg-server/hw/kdrive/ephyr/Makefile.am
+++ b/xorg-server/hw/kdrive/ephyr/Makefile.am
@@ -5,7 +5,6 @@ INCLUDES = \
@KDRIVE_CFLAGS@ \
@XEPHYR_INCS@ \
@XEPHYR_CFLAGS@ \
- @DRIPROTO_CFLAGS@ \
-I$(top_srcdir) \
-I$(top_srcdir)/exa
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index f2363c15e..772d9b75a 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -42,10 +42,6 @@
extern int KdTsPhyScreen;
-#ifdef GLXEXT
-extern Bool noGlxVisualInit;
-#endif
-
KdKeyboardInfo *ephyrKbd;
KdPointerInfo *ephyrMouse;
EphyrKeySyms ephyrKeySyms;
@@ -627,12 +623,9 @@ ephyrInitScreen(ScreenPtr pScreen)
}
#endif /*XV*/
#ifdef XF86DRI
- if (!ephyrNoDRI && !hostx_has_dri()) {
+ if (!ephyrNoDRI && !hostx_has_dri()) {
EPHYR_LOG("host x does not support DRI. Disabling DRI forwarding\n");
ephyrNoDRI = TRUE;
-#ifdef GLXEXT
- noGlxVisualInit = FALSE;
-#endif
}
if (!ephyrNoDRI) {
ephyrDRIExtensionInit(pScreen);
@@ -640,12 +633,6 @@ ephyrInitScreen(ScreenPtr pScreen)
}
#endif
-#ifdef GLXEXT
- if (ephyrNoDRI) {
- noGlxVisualInit = FALSE;
- }
-#endif
-
return TRUE;
}
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
index 28486f516..a42be07d5 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
@@ -517,18 +517,19 @@ EphyrMirrorHostVisuals(ScreenPtr a_screen)
static int
ProcXF86DRIQueryVersion(register ClientPtr client)
{
- xXF86DRIQueryVersionReply rep;
+ xXF86DRIQueryVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .majorVersion = SERVER_XF86DRI_MAJOR_VERSION,
+ .minorVersion = SERVER_XF86DRI_MINOR_VERSION,
+ .patchVersion = SERVER_XF86DRI_PATCH_VERSION
+ };
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
EPHYR_LOG("enter\n");
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.majorVersion = SERVER_XF86DRI_MAJOR_VERSION;
- rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
- rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -536,7 +537,7 @@ ProcXF86DRIQueryVersion(register ClientPtr client)
swaps(&rep.minorVersion);
swapl(&rep.patchVersion);
}
- WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), &rep);
EPHYR_LOG("leave\n");
return Success;
}
@@ -556,17 +557,19 @@ ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
if (!ephyrDRIQueryDirectRenderingCapable(stuff->screen, &isCapable)) {
return BadValue;
}
- rep.isCapable = isCapable;
if (!LocalClient(client) || client->swapped)
- rep.isCapable = 0;
+ isCapable = 0;
+
+ rep = (xXF86DRIQueryDirectRenderingCapableReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .isCapable = isCapable
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
@@ -574,7 +577,7 @@ ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client)
}
WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply),
- (char *) &rep);
+ &rep);
EPHYR_LOG("leave\n");
return Success;
@@ -586,6 +589,7 @@ ProcXF86DRIOpenConnection(register ClientPtr client)
xXF86DRIOpenConnectionReply rep;
drm_handle_t hSAREA;
char *busIdString = NULL;
+ CARD32 busIdStringLength = 0;
REQUEST(xXF86DRIOpenConnectionReq);
REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq);
@@ -600,26 +604,27 @@ ProcXF86DRIOpenConnection(register ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.busIdStringLength = 0;
if (busIdString)
- rep.busIdStringLength = strlen(busIdString);
- rep.length =
- bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) -
- SIZEOF(xGenericReply) +
- pad_to_int32(rep.busIdStringLength));
-
- rep.hSAREALow = (CARD32) (hSAREA & 0xffffffff);
+ busIdStringLength = strlen(busIdString);
+
+ rep = (xXF86DRIOpenConnectionReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) -
+ SIZEOF(xGenericReply) +
+ pad_to_int32(busIdStringLength)),
+ .hSAREALow = (CARD32) (hSAREA & 0xffffffff),
#if defined(LONG64) && !defined(__linux__)
- rep.hSAREAHigh = (CARD32) (hSAREA >> 32);
+ .hSAREAHigh = (CARD32) (hSAREA >> 32),
#else
- rep.hSAREAHigh = 0;
+ .hSAREAHigh = 0,
#endif
+ .busIdStringLength = busIdStringLength
+ };
- WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *) &rep);
- if (rep.busIdStringLength)
- WriteToClient(client, rep.busIdStringLength, busIdString);
+ WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), &rep);
+ if (busIdStringLength)
+ WriteToClient(client, busIdStringLength, busIdString);
free(busIdString);
EPHYR_LOG("leave\n");
return Success;
@@ -639,16 +644,18 @@ ProcXF86DRIAuthConnection(register ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.authenticated = 1;
+ rep = (xXF86DRIAuthConnectionReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .authenticated = 1
+ };
if (!ephyrDRIAuthConnection(stuff->screen, stuff->magic)) {
ErrorF("Failed to authenticate %lu\n", (unsigned long) stuff->magic);
rep.authenticated = 0;
}
- WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), &rep);
EPHYR_LOG("leave\n");
return Success;
}
@@ -675,7 +682,11 @@ ProcXF86DRICloseConnection(register ClientPtr client)
static int
ProcXF86DRIGetClientDriverName(register ClientPtr client)
{
- xXF86DRIGetClientDriverNameReply rep;
+ xXF86DRIGetClientDriverNameReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .clientDriverNameLength = 0
+ };
char *clientDriverName;
REQUEST(xXF86DRIGetClientDriverNameReq);
@@ -692,18 +703,13 @@ ProcXF86DRIGetClientDriverName(register ClientPtr client)
(int *) &rep.ddxDriverMinorVersion,
(int *) &rep.ddxDriverPatchVersion,
&clientDriverName);
-
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.clientDriverNameLength = 0;
if (clientDriverName)
rep.clientDriverNameLength = strlen(clientDriverName);
rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) -
SIZEOF(xGenericReply) +
pad_to_int32(rep.clientDriverNameLength));
- WriteToClient(client,
- sizeof(xXF86DRIGetClientDriverNameReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), &rep);
if (rep.clientDriverNameLength)
WriteToClient(client, rep.clientDriverNameLength, clientDriverName);
EPHYR_LOG("leave\n");
@@ -713,7 +719,11 @@ ProcXF86DRIGetClientDriverName(register ClientPtr client)
static int
ProcXF86DRICreateContext(register ClientPtr client)
{
- xXF86DRICreateContextReply rep;
+ xXF86DRICreateContextReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
ScreenPtr pScreen;
VisualPtr visual;
int i = 0;
@@ -728,10 +738,6 @@ ProcXF86DRICreateContext(register ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
pScreen = screenInfo.screens[stuff->screen];
visual = pScreen->visuals;
@@ -752,7 +758,7 @@ ProcXF86DRICreateContext(register ClientPtr client)
return BadValue;
}
- WriteToClient(client, sizeof(xXF86DRICreateContextReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRICreateContextReply), &rep);
EPHYR_LOG("leave\n");
return Success;
}
@@ -916,7 +922,11 @@ destroyHostPeerWindow(const WindowPtr a_win)
static int
ProcXF86DRICreateDrawable(ClientPtr client)
{
- xXF86DRICreateDrawableReply rep;
+ xXF86DRICreateDrawableReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
DrawablePtr drawable = NULL;
WindowPtr window = NULL;
EphyrWindowPair *pair = NULL;
@@ -932,10 +942,6 @@ ProcXF86DRICreateDrawable(ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
rc = dixLookupDrawable(&drawable, stuff->drawable, client, 0,
DixReadAccess);
if (rc != Success)
@@ -974,7 +980,7 @@ ProcXF86DRICreateDrawable(ClientPtr client)
EPHYR_LOG("paired window '%p' with remote '%d'\n", window, remote_win);
}
- WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), &rep);
EPHYR_LOG("leave\n");
return Success;
}
@@ -1024,7 +1030,11 @@ ProcXF86DRIDestroyDrawable(register ClientPtr client)
static int
ProcXF86DRIGetDrawableInfo(register ClientPtr client)
{
- xXF86DRIGetDrawableInfoReply rep;
+ xXF86DRIGetDrawableInfoReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
DrawablePtr drawable;
WindowPtr window = NULL;
EphyrWindowPair *pair = NULL;
@@ -1036,16 +1046,11 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client)
REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq);
EPHYR_LOG("enter\n");
- memset(&rep, 0, sizeof(rep));
if (stuff->screen >= screenInfo.numScreens) {
client->errorValue = stuff->screen;
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
rc = dixLookupDrawable(&drawable, stuff->drawable, client, 0,
DixReadAccess);
if (rc != Success || !drawable) {
@@ -1136,18 +1141,18 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client)
rep.length = bytes_to_int32(rep.length);
- WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), &rep);
if (rep.numClipRects) {
WriteToClient(client,
sizeof(drm_clip_rect_t) * rep.numClipRects,
- (char *) clipRects);
+ clipRects);
}
if (rep.numBackClipRects) {
WriteToClient(client,
sizeof(drm_clip_rect_t) * rep.numBackClipRects,
- (char *) backClipRects);
+ backClipRects);
}
free(clipRects);
clipRects = NULL;
@@ -1160,7 +1165,11 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client)
static int
ProcXF86DRIGetDeviceInfo(register ClientPtr client)
{
- xXF86DRIGetDeviceInfoReply rep;
+ xXF86DRIGetDeviceInfoReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
drm_handle_t hFrameBuffer;
void *pDevPrivate;
@@ -1173,10 +1182,6 @@ ProcXF86DRIGetDeviceInfo(register ClientPtr client)
return BadValue;
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-
if (!ephyrDRIGetDeviceInfo(stuff->screen,
&hFrameBuffer,
(int *) &rep.framebufferOrigin,
@@ -1193,16 +1198,15 @@ ProcXF86DRIGetDeviceInfo(register ClientPtr client)
rep.hFrameBufferHigh = 0;
#endif
- rep.length = 0;
if (rep.devPrivateSize) {
rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) -
SIZEOF(xGenericReply) +
pad_to_int32(rep.devPrivateSize));
}
- WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), &rep);
if (rep.length) {
- WriteToClient(client, rep.devPrivateSize, (char *) pDevPrivate);
+ WriteToClient(client, rep.devPrivateSize, pDevPrivate);
}
EPHYR_LOG("leave\n");
return Success;
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrglxext.c b/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
index dab028bf3..df285cfcb 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
@@ -159,17 +159,19 @@ ephyrGLXQueryVersion(__GLXclientState * a_cl, GLbyte * a_pc)
goto out;
}
EPHYR_LOG("major:%d, minor:%d\n", major, minor);
- reply.majorVersion = major;
- reply.minorVersion = minor;
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
+ reply = (xGLXQueryVersionReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .majorVersion = major,
+ .minorVersion = minor
+ };
if (client->swapped) {
__glXSwapQueryVersionReply(client, &reply);
}
else {
- WriteToClient(client, sz_xGLXQueryVersionReply, (char *) &reply);
+ WriteToClient(client, sz_xGLXQueryVersionReply, &reply);
}
res = Success;
@@ -215,11 +217,13 @@ ephyrGLXGetVisualConfigsReal(__GLXclientState * a_cl,
}
EPHYR_LOG("num_visuals:%d, num_props:%d\n", num_visuals, num_props);
- reply.numVisuals = num_visuals;
- reply.numProps = num_props;
- reply.length = (num_visuals * __GLX_SIZE_CARD32 * num_props) >> 2;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
+ reply = (xGLXGetVisualConfigsReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = (num_visuals * __GLX_SIZE_CARD32 * num_props) >> 2,
+ .numVisuals = num_visuals,
+ .numProps = num_props
+ };
if (a_do_swap) {
__GLX_SWAP_SHORT(&reply.sequenceNumber);
@@ -228,7 +232,7 @@ ephyrGLXGetVisualConfigsReal(__GLXclientState * a_cl,
__GLX_SWAP_INT(&reply.numProps);
__GLX_SWAP_INT_ARRAY(props_buf, num_props);
}
- WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply);
+ WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply);
props_per_visual_size = props_buf_size / num_visuals;
for (i = 0; i < num_visuals; i++) {
WriteToClient(client,
@@ -269,11 +273,13 @@ ephyrGLXGetFBConfigsSGIXReal(__GLXclientState * a_cl,
}
EPHYR_LOG("num_visuals:%d, num_props:%d\n", num_visuals, num_props);
- reply.numVisuals = num_visuals;
- reply.numProps = num_props;
- reply.length = props_buf_size >> 2;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
+ reply = (xGLXGetVisualConfigsReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = props_buf_size >> 2,
+ .numVisuals = num_visuals,
+ .numProps = num_props
+ };
if (a_do_swap) {
__GLX_SWAP_SHORT(&reply.sequenceNumber);
@@ -282,7 +288,7 @@ ephyrGLXGetFBConfigsSGIXReal(__GLXclientState * a_cl,
__GLX_SWAP_INT(&reply.numProps);
__GLX_SWAP_INT_ARRAY(props_buf, num_props);
}
- WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply);
+ WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply);
props_per_visual_size = props_buf_size / num_visuals;
for (i = 0; i < num_visuals; i++) {
WriteToClient(client,
@@ -351,7 +357,7 @@ ephyrGLXQueryServerString(__GLXclientState * a_cl, GLbyte * a_pc)
ClientPtr client = a_cl->client;
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) a_pc;
xGLXQueryServerStringReply reply;
- char *server_string = NULL, *buf = NULL;
+ char *server_string = NULL;
int length = 0;
EPHYR_LOG("enter\n");
@@ -364,18 +370,14 @@ ephyrGLXQueryServerString(__GLXclientState * a_cl, GLbyte * a_pc)
}
EPHYR_LOG("string: %s\n", server_string);
length = strlen(server_string) + 1;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- reply.length = __GLX_PAD(length) >> 2;
- reply.n = length;
- buf = calloc(reply.length << 2, 1);
- if (!buf) {
- EPHYR_LOG_ERROR("failed to allocate string\n;");
- return BadAlloc;
- }
- memcpy(buf, server_string, length);
-
- WriteToClient(client, sz_xGLXQueryServerStringReply, (char *) &reply);
+ reply = (xGLXQueryServerStringReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = __GLX_PAD(length) >> 2,
+ .n = length
+ };
+
+ WriteToClient(client, sz_xGLXQueryServerStringReply, &reply);
WriteToClient(client, (int) (reply.length << 2), server_string);
res = Success;
@@ -385,9 +387,6 @@ ephyrGLXQueryServerString(__GLXclientState * a_cl, GLbyte * a_pc)
free(server_string);
server_string = NULL;
- free(buf);
- buf = NULL;
-
return res;
}
@@ -512,6 +511,7 @@ ephyrGLXMakeCurrentReal(__GLXclientState * a_cl, GLbyte * a_pc, Bool a_do_swap)
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) a_pc;
xGLXMakeCurrentReply reply;
DrawablePtr drawable = NULL;
+ GLXContextTag contextTag = 0;
int rc = 0;
EPHYR_LOG("enter\n");
@@ -521,24 +521,26 @@ ephyrGLXMakeCurrentReal(__GLXclientState * a_cl, GLbyte * a_pc, Bool a_do_swap)
EPHYR_RETURN_VAL_IF_FAIL(drawable->pScreen, BadValue);
EPHYR_LOG("screen nummber requested:%d\n", drawable->pScreen->myNum);
- memset(&reply, 0, sizeof(reply));
if (!ephyrHostGLXMakeCurrent(hostx_get_window(drawable->pScreen->myNum),
req->context,
req->oldContextTag,
- (int *) &reply.contextTag)) {
+ (int *) &contextTag)) {
EPHYR_LOG_ERROR("ephyrHostGLXMakeCurrent() failed\n");
goto out;
}
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = a_cl->client->sequence;
+ reply = (xGLXMakeCurrentReply) {
+ .type = X_Reply,
+ .sequenceNumber = a_cl->client->sequence,
+ .length = 0,
+ .contextTag = contextTag
+ };
if (a_do_swap) {
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply.sequenceNumber);
__GLX_SWAP_INT(&reply.length);
__GLX_SWAP_INT(&reply.contextTag);
}
- WriteToClient(a_cl->client, sz_xGLXMakeCurrentReply, (char *) &reply);
+ WriteToClient(a_cl->client, sz_xGLXMakeCurrentReply, &reply);
res = Success;
out:
@@ -601,7 +603,7 @@ ephyrGLXGetStringReal(__GLXclientState * a_cl, GLbyte * a_pc, Bool a_do_swap)
__GLX_SWAP_REPLY_SIZE();
__GLX_SWAP_REPLY_HEADER();
}
- WriteToClient(client, length, (char *) string);
+ WriteToClient(client, length, string);
res = Success;
out:
@@ -681,16 +683,18 @@ ephyrGLXIsDirectReal(__GLXclientState * a_cl, GLbyte * a_pc, Bool a_do_swap)
EPHYR_LOG("enter\n");
- memset(&reply, 0, sizeof(reply));
if (!ephyrHostIsContextDirect(req->context, (int *) &is_direct)) {
EPHYR_LOG_ERROR("ephyrHostIsContextDirect() failed\n");
goto out;
}
- reply.isDirect = is_direct;
- reply.length = 0;
- reply.type = X_Reply;
- reply.sequenceNumber = client->sequence;
- WriteToClient(client, sz_xGLXIsDirectReply, (char *) &reply);
+ reply = (xGLXIsDirectReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .isDirect = is_direct
+ };
+
+ WriteToClient(client, sz_xGLXIsDirectReply, &reply);
res = Success;
out:
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index a01d5d0d0..d7719e281 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -36,7 +36,6 @@ extern Bool kdHasKbd;
#ifdef GLXEXT
extern Bool ephyrNoDRI;
-extern Bool noGlxVisualInit;
#endif
extern Bool ephyrNoXV;
@@ -236,7 +235,6 @@ ddxProcessArgument(int argc, char **argv, int i)
}
#ifdef GLXEXT
else if (!strcmp(argv[i], "-nodri")) {
- noGlxVisualInit = FALSE;
ephyrNoDRI = TRUE;
EPHYR_LOG("no direct rendering enabled\n");
return 1;
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.c b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.c
index 3d86d2db1..c24238c04 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.c
@@ -75,7 +75,7 @@ ephyrProxyProcDispatch(ClientPtr a_client)
reply.sequence_number = a_client->sequence;
res = Success;
- WriteToClient(a_client, 32, (char *) &reply);
+ WriteToClient(a_client, 32, &reply);
out:
return res;
diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c
index b02dd88f2..cf656363d 100644
--- a/xorg-server/hw/kdrive/src/kxv.c
+++ b/xorg-server/hw/kdrive/src/kxv.c
@@ -107,10 +107,6 @@ static DevPrivateKey KdXvScreenKey;
static unsigned long KdXVGeneration = 0;
static unsigned long PortResource = 0;
-DevPrivateKey (*XvGetScreenKeyProc) (void) = XvGetScreenKey;
-unsigned long (*XvGetRTPortProc) (void) = XvGetRTPort;
-int (*XvScreenInitProc) (ScreenPtr) = XvScreenInit;
-
#define GET_XV_SCREEN(pScreen) ((XvScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey))
@@ -186,17 +182,17 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr * adaptors, int num)
if (KdXVGeneration != serverGeneration)
KdXVGeneration = serverGeneration;
- if (!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc)
+ if (noXvExtension)
return FALSE;
if (!dixRegisterPrivateKey(&KdXVWindowKeyRec, PRIVATE_WINDOW, 0))
return FALSE;
- if (Success != (*XvScreenInitProc) (pScreen))
+ if (Success != XvScreenInit(pScreen))
return FALSE;
- KdXvScreenKey = (*XvGetScreenKeyProc) ();
- PortResource = (*XvGetRTPortProc) ();
+ KdXvScreenKey = XvGetScreenKey();
+ PortResource = XvGetRTPort();
pxvs = GET_XV_SCREEN(pScreen);