diff options
author | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-08-11 21:22:25 +0200 |
commit | 8e27619ab489dece35cc4bec86950ee7729cd309 (patch) | |
tree | ab59dbc661e00c12ed4777cf9d0d37393c4163aa /xorg-server | |
parent | ffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff) | |
parent | fdbedba4d50e1b28b0249c83ba11c029f096e400 (diff) | |
download | vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2 vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libxcb/src/c_client.py
mesalib/include/GL/glext.h
mesalib/include/GL/glxext.h
mesalib/src/glsl/.gitignore
mesalib/src/mesa/drivers/dri/common/xmlconfig.h
mesalib/src/mesa/main/.gitignore
xorg-server/Xext/xvmain.c
xorg-server/dix/dispatch.c
xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'xorg-server')
66 files changed, 440 insertions, 2410 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 6afd79c34..43c110dac 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -472,9 +472,6 @@ CreateSaverWindow(ScreenPtr pScreen) WindowPtr pWin; int result; unsigned long mask; - Colormap *installedMaps; - int numInstalled; - int i; Colormap wantMap; ColormapPtr pCmap; @@ -550,18 +547,7 @@ CreateSaverWindow(ScreenPtr pScreen) /* check and install our own colormap if it isn't installed now */ wantMap = wColormap(pWin); - if (wantMap == None) - return TRUE; - installedMaps = malloc(pScreen->maxInstalledCmaps * sizeof(Colormap)); - numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) - (pScreen, installedMaps); - for (i = 0; i < numInstalled; i++) - if (installedMaps[i] == wantMap) - break; - - free((char *) installedMaps); - - if (i < numInstalled) + if (wantMap == None || IsMapInstalled(wantMap, pWin)) return TRUE; result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP, diff --git a/xorg-server/Xext/xvdisp.c b/xorg-server/Xext/xvdisp.c index f2d49a2b8..0bdfed370 100644 --- a/xorg-server/Xext/xvdisp.c +++ b/xorg-server/Xext/xvdisp.c @@ -297,9 +297,6 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep) if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \ else WriteToClient(_c, sz_xvImageFormatInfo, _d) -#define _AllocatePort(_i,_p) \ - ((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success - static int ProcXvQueryExtension(ClientPtr client) { @@ -356,8 +353,6 @@ ProcXvQueryAdaptors(ClientPtr client) return Success; } - (*pxvs->ddQueryAdaptors) (pScreen, &pxvs->pAdaptors, &pxvs->nAdaptors); - rep = (xvQueryAdaptorsReply) { .type = X_Reply, .sequenceNumber = client->sequence, @@ -422,18 +417,12 @@ ProcXvQueryEncodings(ClientPtr client) XvPortPtr pPort; int ne; XvEncodingPtr pe; - int status; REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - rep = (xvQueryEncodingsReply) { .type = X_Reply, .sequenceNumber = client->sequence, @@ -485,11 +474,6 @@ ProcXvPutVideo(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; @@ -520,11 +504,6 @@ ProcXvPutStill(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; @@ -555,11 +534,6 @@ ProcXvGetVideo(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; @@ -590,11 +564,6 @@ ProcXvGetStill(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; @@ -631,7 +600,6 @@ ProcXvSelectVideoNotify(ClientPtr client) static int ProcXvSelectPortNotify(ClientPtr client) { - int status; XvPortPtr pPort; REQUEST(xvSelectPortNotifyReq); @@ -639,11 +607,6 @@ ProcXvSelectPortNotify(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - return XvdiSelectPortNotify(client, pPort, stuff->onoff); } @@ -659,11 +622,6 @@ ProcXvGrabPort(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - status = XvdiGrabPort(client, pPort, stuff->time, &result); if (status != Success) { @@ -684,7 +642,6 @@ ProcXvGrabPort(ClientPtr client) static int ProcXvUngrabPort(ClientPtr client) { - int status; XvPortPtr pPort; REQUEST(xvGrabPortReq); @@ -692,18 +649,13 @@ ProcXvUngrabPort(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - return XvdiUngrabPort(client, pPort, stuff->time); } static int ProcXvStopVideo(ClientPtr client) { - int status, ret; + int ret; DrawablePtr pDraw; XvPortPtr pPort; @@ -712,11 +664,6 @@ ProcXvStopVideo(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); if (ret != Success) return ret; @@ -735,11 +682,6 @@ ProcXvSetPortAttribute(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixSetAttrAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; return BadAtom; @@ -769,11 +711,6 @@ ProcXvGetPortAttribute(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; return BadAtom; @@ -800,7 +737,6 @@ ProcXvGetPortAttribute(ClientPtr client) static int ProcXvQueryBestSize(ClientPtr client) { - int status; unsigned int actual_width, actual_height; XvPortPtr pPort; xvQueryBestSizeReply rep; @@ -810,12 +746,7 @@ ProcXvQueryBestSize(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - - (*pPort->pAdaptor->ddQueryBestSize) (client, pPort, stuff->motion, + (*pPort->pAdaptor->ddQueryBestSize) (pPort, stuff->motion, stuff->vid_w, stuff->vid_h, stuff->drw_w, stuff->drw_h, &actual_width, &actual_height); @@ -836,7 +767,7 @@ ProcXvQueryBestSize(ClientPtr client) static int ProcXvQueryPortAttributes(ClientPtr client) { - int status, size, i; + int size, i; XvPortPtr pPort; XvAttributePtr pAtt; xvQueryPortAttributesReply rep; @@ -847,11 +778,6 @@ ProcXvQueryPortAttributes(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - rep = (xvQueryPortAttributesReply) { .type = X_Reply, .sequenceNumber = client->sequence, @@ -902,11 +828,6 @@ ProcXvPutImage(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; @@ -930,8 +851,7 @@ ProcXvPutImage(ClientPtr client) width = stuff->width; height = stuff->height; - size = (*pPort->pAdaptor->ddQueryImageAttributes) (client, - pPort, pImage, &width, + size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, NULL, NULL); size += sizeof(xvPutImageReq); size = bytes_to_int32(size); @@ -968,11 +888,6 @@ ProcXvShmPutImage(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if ((status = _AllocatePort(stuff->port, pPort)) != Success) { - client->errorValue = stuff->port; - return status; - } - if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; @@ -1001,8 +916,7 @@ ProcXvShmPutImage(ClientPtr client) width = stuff->width; height = stuff->height; - size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (client, - pPort, pImage, + size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, NULL, NULL); if ((size_needed + stuff->offset) > shmdesc->size) @@ -1086,7 +1000,7 @@ ProcXvQueryImageAttributes(ClientPtr client) width = stuff->width; height = stuff->height; - size = (*pPort->pAdaptor->ddQueryImageAttributes) (client, pPort, pImage, + size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, offsets, pitches); diff --git a/xorg-server/Xext/xvdix.h b/xorg-server/Xext/xvdix.h index bb08cf4c7..e67a3c766 100644 --- a/xorg-server/Xext/xvdix.h +++ b/xorg-server/Xext/xvdix.h @@ -157,32 +157,29 @@ typedef struct { int nPorts; struct _XvPortRec *pPorts; ScreenPtr pScreen; - int (*ddAllocatePort) (unsigned long, struct _XvPortRec *, - struct _XvPortRec **); - int (*ddFreePort) (struct _XvPortRec *); - int (*ddPutVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + int (*ddPutVideo) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); - int (*ddPutStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + int (*ddPutStill) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); - int (*ddGetVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + int (*ddGetVideo) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); - int (*ddGetStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + int (*ddGetStill) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); - int (*ddStopVideo) (ClientPtr, struct _XvPortRec *, DrawablePtr); - int (*ddSetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32); - int (*ddGetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32 *); - int (*ddQueryBestSize) (ClientPtr, struct _XvPortRec *, CARD8, + int (*ddStopVideo) (struct _XvPortRec *, DrawablePtr); + int (*ddSetPortAttribute) (struct _XvPortRec *, Atom, INT32); + int (*ddGetPortAttribute) (struct _XvPortRec *, Atom, INT32 *); + int (*ddQueryBestSize) (struct _XvPortRec *, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); - int (*ddPutImage) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + int (*ddPutImage) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); - int (*ddQueryImageAttributes) (ClientPtr, struct _XvPortRec *, XvImagePtr, + int (*ddQueryImageAttributes) (struct _XvPortRec *, XvImagePtr, CARD16 *, CARD16 *, int *, int *); DevUnion devPriv; } XvAdaptorRec, *XvAdaptorPtr; @@ -213,9 +210,6 @@ typedef struct { DestroyWindowProcPtr DestroyWindow; DestroyPixmapProcPtr DestroyPixmap; CloseScreenProcPtr CloseScreen; - Bool (*ddCloseScreen) (ScreenPtr); - int (*ddQueryAdaptors) (ScreenPtr, XvAdaptorPtr *, int *); - DevUnion devPriv; } XvScreenRec, *XvScreenPtr; #define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \ @@ -235,8 +229,10 @@ extern _X_EXPORT int SProcXvDispatch(ClientPtr); extern _X_EXPORT int XvScreenInit(ScreenPtr); extern _X_EXPORT DevPrivateKey XvGetScreenKey(void); extern _X_EXPORT unsigned long XvGetRTPort(void); +extern _X_EXPORT void XvFreeAdaptor(XvAdaptorPtr pAdaptor); +extern void _X_EXPORT XvFillColorKey(DrawablePtr pDraw, CARD32 key, + RegionPtr region); extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32); -extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int); extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, @@ -260,7 +256,6 @@ extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); -extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr); extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr); extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time); diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c index 9020b2497..607560efa 100644..100755 --- a/xorg-server/Xext/xvmain.c +++ b/xorg-server/Xext/xvmain.c @@ -302,8 +302,6 @@ XvCloseScreen(ScreenPtr pScreen) pScreen->DestroyWindow = pxvs->DestroyWindow; pScreen->CloseScreen = pxvs->CloseScreen; - if (pxvs->ddCloseScreen) (*pxvs->ddCloseScreen) (pScreen); - free(pxvs); dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); @@ -358,7 +356,7 @@ XvDestroyPixmap(PixmapPtr pPix) if (pp->pDraw == (DrawablePtr) pPix) { XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); - (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw); + (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw); pp->pDraw = NULL; pp->client = NULL; @@ -406,7 +404,7 @@ XvDestroyWindow(WindowPtr pWin) if (pp->pDraw == (DrawablePtr) pWin) { XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); - (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw); + (void) (*pp->pAdaptor->ddStopVideo) (pp, pp->pDraw); pp->pDraw = NULL; pp->client = NULL; @@ -425,34 +423,10 @@ XvDestroyWindow(WindowPtr pWin) } -/* The XvdiVideoStopped procedure is a hook for the device dependent layer. - It provides a way for the dd layer to inform the di layer that video has - stopped in a port for reasons that the di layer had no control over; note - that it doesn't call back into the dd layer */ - -int -XvdiVideoStopped(XvPortPtr pPort, int reason) -{ - - /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ - - if (!pPort->pDraw) - return Success; - - XvdiSendVideoNotify(pPort, pPort->pDraw, reason); - - pPort->pDraw = NULL; - pPort->client = NULL; - pPort->time = currentTime; - - return Success; - -} - static int XvdiDestroyPort(void *pPort, XID id) { - return (*((XvPortPtr) pPort)->pAdaptor->ddFreePort) (pPort); + return Success; } static int @@ -592,7 +566,7 @@ XvdiPutVideo(ClientPtr client, XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); } - (void) (*pPort->pAdaptor->ddPutVideo) (client, pDraw, pPort, pGC, + (void) (*pPort->pAdaptor->ddPutVideo) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); @@ -634,7 +608,7 @@ XvdiPutStill(ClientPtr client, pPort->time = currentTime; - status = (*pPort->pAdaptor->ddPutStill) (client, pDraw, pPort, pGC, + status = (*pPort->pAdaptor->ddPutStill) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); @@ -670,7 +644,7 @@ XvdiPutImage(ClientPtr client, pPort->time = currentTime; - return (*pPort->pAdaptor->ddPutImage) (client, pDraw, pPort, pGC, + return (*pPort->pAdaptor->ddPutImage) (pDraw, pPort, pGC, src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, drw_h, image, data, sync, width, height); @@ -709,7 +683,7 @@ XvdiGetVideo(ClientPtr client, XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); } - (void) (*pPort->pAdaptor->ddGetVideo) (client, pDraw, pPort, pGC, + (void) (*pPort->pAdaptor->ddGetVideo) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); @@ -749,7 +723,7 @@ XvdiGetStill(ClientPtr client, return Success; } - status = (*pPort->pAdaptor->ddGetStill) (client, pDraw, pPort, pGC, + status = (*pPort->pAdaptor->ddGetStill) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); @@ -981,29 +955,7 @@ XvdiStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) XvdiSendVideoNotify(pPort, pDraw, XvStopped); - status = (*pPort->pAdaptor->ddStopVideo) (client, pPort, pDraw); - - pPort->pDraw = NULL; - pPort->client = (ClientPtr) client; - pPort->time = currentTime; - - return status; - -} - -int -XvdiPreemptVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) -{ - int status; - - /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ - - if (!pPort->pDraw || (pPort->pDraw != pDraw)) - return Success; - - XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); - - status = (*pPort->pAdaptor->ddStopVideo) (client, pPort, pPort->pDraw); + status = (*pPort->pAdaptor->ddStopVideo) (pPort, pDraw); pPort->pDraw = NULL; pPort->client = (ClientPtr) client; @@ -1046,7 +998,7 @@ XvdiSetPortAttribute(ClientPtr client, int status; status = - (*pPort->pAdaptor->ddSetPortAttribute) (client, pPort, attribute, + (*pPort->pAdaptor->ddSetPortAttribute) (pPort, attribute, value); if (status == Success) XvdiSendPortNotify(pPort, attribute, value); @@ -1060,7 +1012,7 @@ XvdiGetPortAttribute(ClientPtr client, { return - (*pPort->pAdaptor->ddGetPortAttribute) (client, pPort, attribute, + (*pPort->pAdaptor->ddGetPortAttribute) (pPort, attribute, p_value); } @@ -1091,3 +1043,77 @@ WriteSwappedPortNotifyEvent(xvEvent * from, xvEvent * to) cpswapl(from->u.portNotify.value, to->u.portNotify.value); } + +void +XvFreeAdaptor(XvAdaptorPtr pAdaptor) +{ + int i; + + free(pAdaptor->name); + pAdaptor->name = NULL; + + if (pAdaptor->pEncodings) { + XvEncodingPtr pEncode = pAdaptor->pEncodings; + + for (i = 0; i < pAdaptor->nEncodings; i++, pEncode++) + free(pEncode->name); + free(pAdaptor->pEncodings); + pAdaptor->pEncodings = NULL; + } + + free(pAdaptor->pFormats); + pAdaptor->pFormats = NULL; + + free(pAdaptor->pPorts); + pAdaptor->pPorts = NULL; + + if (pAdaptor->pAttributes) { + XvAttributePtr pAttribute = pAdaptor->pAttributes; + + for (i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) + free(pAttribute->name); + free(pAdaptor->pAttributes); + pAdaptor->pAttributes = NULL; + } + + free(pAdaptor->pImages); + pAdaptor->pImages = NULL; + + free(pAdaptor->devPriv.ptr); + pAdaptor->devPriv.ptr = NULL; +} + +void +XvFillColorKey(DrawablePtr pDraw, CARD32 key, RegionPtr region) +{ + ScreenPtr pScreen = pDraw->pScreen; + ChangeGCVal pval[2]; + BoxPtr pbox = RegionRects(region); + int i, nbox = RegionNumRects(region); + xRectangle *rects; + GCPtr gc; + + gc = GetScratchGC(pDraw->depth, pScreen); + if (!gc) + return; + + pval[0].val = key; + pval[1].val = IncludeInferiors; + (void) ChangeGC(NullClient, gc, GCForeground | GCSubwindowMode, pval); + ValidateGC(pDraw, gc); + + rects = malloc(nbox * sizeof(xRectangle)); + if (rects) { + for (i = 0; i < nbox; i++, pbox++) { + rects[i].x = pbox->x1 - pDraw->x; + rects[i].y = pbox->y1 - pDraw->y; + rects[i].width = pbox->x2 - pbox->x1; + rects[i].height = pbox->y2 - pbox->y1; + } + + (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects); + + free(rects); + } + FreeScratchGC(gc); +} diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 468b5a199..01983d75e 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -2260,7 +2260,7 @@ ProcBell(ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == keybd || (!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) && - dev->kbdfeed && dev->kbdfeed->BellProc) { + ((dev->kbdfeed && dev->kbdfeed->BellProc) || dev->xkb_interest)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); if (rc != Success) diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index 28a54de76..f6ed81302 100644..100755 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -3232,13 +3232,11 @@ ProcKillClient(ClientPtr client) rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess);
if (rc == Success) {
CloseDownClient(killclient);
- /* if an LBX proxy gets killed, isItTimeToYield will be set */
- if (isItTimeToYield || (client == killclient)) {
+ if (client == killclient) {
/* force yield and return Success, so that Dispatch()
* doesn't try to touch client
*/
isItTimeToYield = TRUE;
- return Success;
}
return Success;
}
diff --git a/xorg-server/doc/Xserver-spec.xml b/xorg-server/doc/Xserver-spec.xml index cd1a9d07a..4c344194d 100644 --- a/xorg-server/doc/Xserver-spec.xml +++ b/xorg-server/doc/Xserver-spec.xml @@ -1217,11 +1217,9 @@ library is contained in dix/dixfonts.c <section> <title>Memory Management</title> <para> -Memory management is based on functions in the C runtime library. -Xalloc(), Xrealloc(), and Xfree() are deprecated aliases for malloc(), +Memory management is based on functions in the C runtime library, malloc(), realloc(), and free(), and you should simply call the C library functions -directly. Consult a C runtime library reference -manual for more details. +directly. Consult a C runtime library reference manual for more details. </para> <para> Treat memory allocation carefully in your implementation. Memory diff --git a/xorg-server/dri3/dri3.h b/xorg-server/dri3/dri3.h index edc7fa267..7562352ff 100644 --- a/xorg-server/dri3/dri3.h +++ b/xorg-server/dri3/dri3.h @@ -23,8 +23,6 @@ #ifndef _DRI3_H_ #define _DRI3_H_ -#include <xorg-server.h> - #ifdef DRI3 #include <X11/extensions/dri3proto.h> diff --git a/xorg-server/glamor/glamor_egl.c b/xorg-server/glamor/glamor_egl.c index 54af2753e..182e2e8c9 100644 --- a/xorg-server/glamor/glamor_egl.c +++ b/xorg-server/glamor/glamor_egl.c @@ -30,7 +30,6 @@ #include "dix-config.h" #define GLAMOR_FOR_XORG -#include <xorg-server.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> diff --git a/xorg-server/glamor/glamor_eglmodule.c b/xorg-server/glamor/glamor_eglmodule.c index d7e183649..dd4664b22 100644 --- a/xorg-server/glamor/glamor_eglmodule.c +++ b/xorg-server/glamor/glamor_eglmodule.c @@ -29,7 +29,6 @@ #include "dix-config.h" -#include <xorg-server.h> #include <xf86.h> #define GLAMOR_FOR_XORG #include <xf86Module.h> diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h index 57a46873c..385c0279d 100644 --- a/xorg-server/glamor/glamor_priv.h +++ b/xorg-server/glamor/glamor_priv.h @@ -29,7 +29,6 @@ #include "dix-config.h" -#include <xorg-server.h> #include "glamor.h" #include "xvdix.h" diff --git a/xorg-server/glamor/glamor_xv.c b/xorg-server/glamor/glamor_xv.c index 68a06a413..3f3e064d5 100644 --- a/xorg-server/glamor/glamor_xv.c +++ b/xorg-server/glamor/glamor_xv.c @@ -336,6 +336,7 @@ glamor_xv_render(glamor_port_private *port_priv) GL_FALSE, 2 * sizeof(float), vertices); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); + glEnable(GL_SCISSOR_TEST); for (i = 0; i < nBox; i++) { float off_x = box[i].x1 - port_priv->drw_x; float off_y = box[i].y1 - port_priv->drw_y; @@ -356,23 +357,25 @@ glamor_xv_render(glamor_port_private *port_priv) glamor_set_normalize_vcoords(pixmap_priv, dst_xscale, dst_yscale, - dstx, + dstx - dstw, dsty, dstx + dstw, - dsty + dsth, + dsty + dsth * 2, vertices); glamor_set_normalize_tcoords(src_pixmap_priv[0], src_xscale[0], src_yscale[0], - srcx, + srcx - srcw, srcy, srcx + srcw, - srcy + srch, + srcy + srch * 2, texcoords); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + glScissor(dstx, dsty, dstw, dsth); + glDrawArrays(GL_TRIANGLE_FAN, 0, 3); } + glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); diff --git a/xorg-server/hw/kdrive/Xkdrive.man b/xorg-server/hw/kdrive/Xkdrive.man index b37f9f10a..c3e2089bc 100644 --- a/xorg-server/hw/kdrive/Xkdrive.man +++ b/xorg-server/hw/kdrive/Xkdrive.man @@ -4,10 +4,6 @@ .SH NAME Xkdrive \- tiny X server .SH SYNOPSIS -.B Xvesa -.RI [ :display ] -.RI [ option ...] - .B Xfbdev .RI [ :display ] .RI [ option ...] @@ -24,9 +20,6 @@ Xserver(1)), all the .B Xkdrive servers accept the following options: .TP 8 -.B -card \fIpcmcia\fP -use pcmcia card as additional screen. -.TP 8 .B -dumb disable hardware acceleration. .TP 8 diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c index 60a83458c..f979e1fbd 100644 --- a/xorg-server/hw/kdrive/src/kxv.c +++ b/xorg-server/hw/kdrive/src/kxv.c @@ -56,46 +56,39 @@ of the copyright holder. #include "kxv.h" #include "fourcc.h" -/* XvScreenRec fields */ - -static Bool KdXVCloseScreen(ScreenPtr); -static int KdXVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *); - /* XvAdaptorRec fields */ -static int KdXVAllocatePort(unsigned long, XvPortPtr, XvPortPtr *); -static int KdXVFreePort(XvPortPtr); -static int KdXVPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int KdXVPutVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int KdXVPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int KdXVPutStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int KdXVGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int KdXVGetVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int KdXVGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int KdXVGetStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int KdXVStopVideo(ClientPtr, XvPortPtr, DrawablePtr); -static int KdXVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); -static int KdXVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); -static int KdXVQueryBestSize(ClientPtr, XvPortPtr, CARD8, +static int KdXVStopVideo(XvPortPtr, DrawablePtr); +static int KdXVSetPortAttribute(XvPortPtr, Atom, INT32); +static int KdXVGetPortAttribute(XvPortPtr, Atom, INT32 *); +static int KdXVQueryBestSize(XvPortPtr, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); -static int KdXVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int KdXVPutImage(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); -static int KdXVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr, +static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr, CARD16 *, CARD16 *, int *, int *); /* ScreenRec fields */ -static Bool KdXVCreateWindow(WindowPtr pWin); static Bool KdXVDestroyWindow(WindowPtr pWin); static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); +static Bool KdXVCloseScreen(ScreenPtr); /* misc */ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr, int); @@ -104,6 +97,7 @@ static DevPrivateKeyRec KdXVWindowKeyRec; #define KdXVWindowKey (&KdXVWindowKeyRec) static DevPrivateKey KdXvScreenKey; +static DevPrivateKeyRec KdXVScreenPrivateKey; static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; @@ -111,7 +105,7 @@ static unsigned long PortResource = 0; dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey)) #define GET_KDXV_SCREEN(pScreen) \ - ((KdXVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) + ((KdXVScreenPtr)(dixGetPrivate(&pScreen->devPrivates, &KdXVScreenPrivateKey))) #define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \ dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey)) @@ -132,7 +126,6 @@ Bool KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num) { KdXVScreenPtr ScreenPriv; - XvScreenPtr pxvs; /* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */ @@ -144,6 +137,8 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num) if (!dixRegisterPrivateKey(&KdXVWindowKeyRec, PRIVATE_WINDOW, 0)) return FALSE; + if (!dixRegisterPrivateKey(&KdXVScreenPrivateKey, PRIVATE_SCREEN, 0)) + return FALSE; if (Success != XvScreenInit(pScreen)) return FALSE; @@ -151,36 +146,23 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num) KdXvScreenKey = XvGetScreenKey(); PortResource = XvGetRTPort(); - pxvs = GET_XV_SCREEN(pScreen); - - /* Anyone initializing the Xv layer must provide these two. - The Xv di layer calls them without even checking if they exist! */ - - pxvs->ddCloseScreen = KdXVCloseScreen; - pxvs->ddQueryAdaptors = KdXVQueryAdaptors; - - /* The Xv di layer provides us with a private hook so that we don't - have to allocate our own screen private. They also provide - a CloseScreen hook so that we don't have to wrap it. I'm not - sure that I appreciate that. */ - ScreenPriv = malloc(sizeof(KdXVScreenRec)); - pxvs->devPriv.ptr = (void *) ScreenPriv; + dixSetPrivate(&pScreen->devPrivates, &KdXVScreenPrivateKey, ScreenPriv); if (!ScreenPriv) return FALSE; - ScreenPriv->CreateWindow = pScreen->CreateWindow; ScreenPriv->DestroyWindow = pScreen->DestroyWindow; ScreenPriv->WindowExposures = pScreen->WindowExposures; ScreenPriv->ClipNotify = pScreen->ClipNotify; + ScreenPriv->CloseScreen = pScreen->CloseScreen; /* fprintf(stderr,"XV: Wrapping screen funcs\n"); */ - pScreen->CreateWindow = KdXVCreateWindow; pScreen->DestroyWindow = KdXVDestroyWindow; pScreen->WindowExposures = KdXVWindowExposures; pScreen->ClipNotify = KdXVClipNotify; + pScreen->CloseScreen = KdXVCloseScreen; if (!KdXVInitAdaptors(pScreen, adaptors, num)) return FALSE; @@ -193,19 +175,6 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - free(pAdaptor->name); - - if (pAdaptor->pEncodings) { - XvEncodingPtr pEncode = pAdaptor->pEncodings; - - for (i = 0; i < pAdaptor->nEncodings; i++, pEncode++) { - free(pEncode->name); - } - free(pAdaptor->pEncodings); - } - - free(pAdaptor->pFormats); - if (pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; XvPortRecPrivatePtr pPriv; @@ -220,22 +189,9 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) free(pPriv); } } - free(pAdaptor->pPorts); } - if (pAdaptor->nAttributes) { - XvAttributePtr pAttribute = pAdaptor->pAttributes; - - for (i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) { - free(pAttribute->name); - } - - free(pAdaptor->pAttributes); - } - - free(pAdaptor->pImages); - - free(pAdaptor->devPriv.ptr); + XvFreeAdaptor(pAdaptor); } static Bool @@ -302,8 +258,6 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr infoPtr, int number) continue; pa->pScreen = pScreen; - pa->ddAllocatePort = KdXVAllocatePort; - pa->ddFreePort = KdXVFreePort; pa->ddPutVideo = KdXVPutVideo; pa->ddPutStill = KdXVPutStill; pa->ddGetVideo = KdXVGetVideo; @@ -588,10 +542,6 @@ KdXVRegetVideo(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->GetVideo) (portPriv->screen, portPriv->pDraw, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, @@ -668,22 +618,6 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - /* bailout if we have to clip but the hardware doesn't support it */ - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto CLIP_VIDEO_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->screen, portPriv->pDraw, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, @@ -760,22 +694,6 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - /* bailout if we have to clip but the hardware doesn't support it */ - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto CLIP_VIDEO_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->ReputImage) (portPriv->screen, portPriv->pDraw, WinBox.x1, WinBox.y1, &ClipRegion, @@ -872,23 +790,6 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) /**** ScreenRec fields ****/ static Bool -KdXVCreateWindow(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); - int ret; - - pScreen->CreateWindow = ScreenPriv->CreateWindow; - ret = (*pScreen->CreateWindow) (pWin); - pScreen->CreateWindow = KdXVCreateWindow; - - if (ret) - dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); - - return ret; -} - -static Bool KdXVDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -1052,10 +953,10 @@ KdXVCloseScreen(ScreenPtr pScreen) if (!ScreenPriv) return TRUE; - pScreen->CreateWindow = ScreenPriv->CreateWindow; pScreen->DestroyWindow = ScreenPriv->DestroyWindow; pScreen->WindowExposures = ScreenPriv->WindowExposures; pScreen->ClipNotify = ScreenPriv->ClipNotify; + pScreen->CloseScreen = ScreenPriv->CloseScreen; /* fprintf(stderr,"XV: Unwrapping screen funcs\n"); */ @@ -1066,19 +967,7 @@ KdXVCloseScreen(ScreenPtr pScreen) free(pxvs->pAdaptors); free(ScreenPriv); - return TRUE; -} - -static int -KdXVQueryAdaptors(ScreenPtr pScreen, - XvAdaptorPtr * p_pAdaptors, int *p_nAdaptors) -{ - XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); - - *p_nAdaptors = pxvs->nAdaptors; - *p_pAdaptors = pxvs->pAdaptors; - - return Success; + return pScreen->CloseScreen(pScreen); } static Bool @@ -1139,21 +1028,7 @@ KdXVDisable(ScreenPtr pScreen) /**** XvAdaptorRec fields ****/ static int -KdXVAllocatePort(unsigned long port, XvPortPtr pPort, XvPortPtr * ppPort) -{ - *ppPort = pPort; - return Success; -} - -static int -KdXVFreePort(XvPortPtr pPort) -{ - return Success; -} - -static int -KdXVPutVideo(ClientPtr client, - DrawablePtr pDraw, +KdXVPutVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1206,8 +1081,7 @@ KdXVPutVideo(ClientPtr client, } static int -KdXVPutStill(ClientPtr client, - DrawablePtr pDraw, +KdXVPutStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1263,21 +1137,6 @@ KdXVPutStill(ClientPtr client, goto PUT_STILL_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto PUT_STILL_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutStill) (portPriv->screen, pDraw, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, @@ -1314,8 +1173,7 @@ KdXVPutStill(ClientPtr client, } static int -KdXVGetVideo(ClientPtr client, - DrawablePtr pDraw, +KdXVGetVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1368,8 +1226,7 @@ KdXVGetVideo(ClientPtr client, } static int -KdXVGetStill(ClientPtr client, - DrawablePtr pDraw, +KdXVGetStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1410,10 +1267,6 @@ KdXVGetStill(ClientPtr client, goto GET_STILL_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->GetStill) (portPriv->screen, pDraw, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, @@ -1435,7 +1288,7 @@ KdXVGetStill(ClientPtr client, } static int -KdXVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) +KdXVStopVideo(XvPortPtr pPort, DrawablePtr pDraw) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1461,8 +1314,7 @@ KdXVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) } static int -KdXVSetPortAttribute(ClientPtr client, - XvPortPtr pPort, Atom attribute, INT32 value) +KdXVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1472,8 +1324,7 @@ KdXVSetPortAttribute(ClientPtr client, } static int -KdXVGetPortAttribute(ClientPtr client, - XvPortPtr pPort, Atom attribute, INT32 *p_value) +KdXVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1484,8 +1335,7 @@ KdXVGetPortAttribute(ClientPtr client, } static int -KdXVQueryBestSize(ClientPtr client, - XvPortPtr pPort, +KdXVQueryBestSize(XvPortPtr pPort, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, @@ -1502,8 +1352,7 @@ KdXVQueryBestSize(ClientPtr client, } static int -KdXVPutImage(ClientPtr client, - DrawablePtr pDraw, +KdXVPutImage(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 src_x, INT16 src_y, @@ -1561,21 +1410,6 @@ KdXVPutImage(ClientPtr client, goto PUT_IMAGE_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto PUT_IMAGE_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutImage) (portPriv->screen, pDraw, src_x, src_y, WinBox.x1, WinBox.y1, src_w, src_h, drw_w, drw_h, @@ -1613,8 +1447,7 @@ KdXVPutImage(ClientPtr client, } static int -KdXVQueryImageAttributes(ClientPtr client, - XvPortPtr pPort, +KdXVQueryImageAttributes(XvPortPtr pPort, XvImagePtr format, CARD16 *width, CARD16 *height, int *pitches, int *offsets) @@ -1770,44 +1603,3 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr, } } } - -void -KXVPaintRegion(DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) -{ - GCPtr pGC; - ChangeGCVal val[2]; - xRectangle *rects, *r; - BoxPtr pBox = RegionRects(pRgn); - int nBox = RegionNumRects(pRgn); - - rects = malloc(nBox * sizeof(xRectangle)); - if (!rects) - goto bail0; - r = rects; - while (nBox--) { - r->x = pBox->x1 - pDraw->x; - r->y = pBox->y1 - pDraw->y; - r->width = pBox->x2 - pBox->x1; - r->height = pBox->y2 - pBox->y1; - r++; - pBox++; - } - - pGC = GetScratchGC(pDraw->depth, pDraw->pScreen); - if (!pGC) - goto bail1; - - val[0].val = fg; - val[1].val = IncludeInferiors; - ChangeGC(NullClient, pGC, GCForeground | GCSubwindowMode, val); - - ValidateGC(pDraw, pGC); - - (*pGC->ops->PolyFillRect) (pDraw, pGC, RegionNumRects(pRgn), rects); - - FreeScratchGC(pGC); - bail1: - free(rects); - bail0: - ; -} diff --git a/xorg-server/hw/kdrive/src/kxv.h b/xorg-server/hw/kdrive/src/kxv.h index 3a49a659f..b99729922 100644 --- a/xorg-server/hw/kdrive/src/kxv.h +++ b/xorg-server/hw/kdrive/src/kxv.h @@ -50,21 +50,10 @@ of the copyright holder. #include "../../Xext/xvdix.h" -#define VIDEO_NO_CLIPPING 0x00000001 -#define VIDEO_INVERT_CLIPLIST 0x00000002 #define VIDEO_OVERLAID_IMAGES 0x00000004 #define VIDEO_OVERLAID_STILLS 0x00000008 #define VIDEO_CLIP_TO_VIEWPORT 0x00000010 -typedef struct { - KdScreenInfo *screen; - int id; - unsigned short width, height; - int *pitches; /* bytes */ - int *offsets; /* in bytes from start of framebuffer */ - DevUnion devPrivate; -} KdSurfaceRec, *KdSurfacePtr; - typedef int (*PutVideoFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, @@ -172,9 +161,6 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr, int srcH, int height, int top, int left, int h, int w, int id); -void - KXVPaintRegion(DrawablePtr pDraw, RegionPtr pRgn, Pixel fg); - KdVideoAdaptorPtr KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen); void KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr); @@ -186,10 +172,10 @@ void KdXVDisable(ScreenPtr); /*** These are DDX layer privates ***/ typedef struct { - CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; ClipNotifyProcPtr ClipNotify; WindowExposuresProcPtr WindowExposures; + CloseScreenProcPtr CloseScreen; } KdXVScreenRec, *KdXVScreenPtr; typedef struct { diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index a44afacde..4cb127745 100644..100755 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -79,8 +79,6 @@ #ifndef __inline__ #if defined(__GNUC__) /* gcc has __inline__ */ -#elif defined(__HIGHC__) -#define __inline__ _Inline #else #define __inline__ /**/ #endif @@ -88,8 +86,6 @@ #ifndef __inline #if defined(__GNUC__) || defined(_MSC_VER) /* gcc has __inline */ -#elif defined(__HIGHC__) -#define __inline _Inline #else #define __inline /**/ #endif @@ -98,9 +94,10 @@ #if !defined(__GNUC__) && !defined(__FUNCTION__) #define __FUNCTION__ __func__ /* C99 */ #endif -#if defined(NO_INLINE) || defined(DO_PROTOTYPES) + +#if defined(DO_PROTOTYPES) #if !defined(__arm__) -#if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \ +#if !defined(__sparc__) && !defined(__arm32__) && !defined(__nds32__) \ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ && !(defined(__mips64) && defined(linux)) \ @@ -131,33 +128,12 @@ extern _X_EXPORT void xf86WriteMmio16Be (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio16Le (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio32Be (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned long, unsigned int); -extern _X_EXPORT void xf86WriteMmio8NB (void *, unsigned long, unsigned int); -extern _X_EXPORT void xf86WriteMmio16BeNB (void *, unsigned long, unsigned int); -extern _X_EXPORT void xf86WriteMmio16LeNB (void *, unsigned long, unsigned int); -extern _X_EXPORT void xf86WriteMmio32BeNB (void *, unsigned long, unsigned int); -extern _X_EXPORT void xf86WriteMmio32LeNB (void *, unsigned long, unsigned int); #endif /* _SUNPRO_C */ #endif /* __sparc__, __arm32__, __alpha__, __nds32__ */ #endif /* __arm__ */ -#if defined(__powerpc__) && !defined(__OpenBSD__) -extern unsigned long ldq_u(unsigned long *); -extern unsigned long ldl_u(unsigned int *); -extern unsigned long ldw_u(unsigned short *); -extern void stq_u(unsigned long, unsigned long *); -extern void stl_u(unsigned long, unsigned int *); -extern void stw_u(unsigned long, unsigned short *); -extern void mem_barrier(void); -extern void write_mem_barrier(void); -extern void stl_brx(unsigned long, volatile unsigned char *, int); -extern void stw_brx(unsigned short, volatile unsigned char *, int); -extern unsigned long ldl_brx(volatile unsigned char *, int); -extern unsigned short ldw_brx(volatile unsigned char *, int); -#endif /* __powerpc__ && !__OpenBSD */ - #endif /* NO_INLINE || DO_PROTOTYPES */ -#ifndef NO_INLINE #ifdef __GNUC__ #ifdef __i386__ @@ -210,14 +186,7 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); #elif defined __powerpc__ -#if defined(linux) && defined(__powerpc64__) -#include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -#include <asm/memory.h> -#endif -#endif /* defined(linux) && defined(__powerpc64__) */ - -#ifndef eieio /* We deal with arch-specific eieio() routines above... */ +#ifndef eieio #define eieio() __asm__ __volatile__ ("eieio" ::: "memory") #endif /* eieio */ #define mem_barrier() eieio() @@ -230,7 +199,10 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); #define write_mem_barrier() /* XXX: nop for now */ #endif #endif /* __GNUC__ */ -#endif /* NO_INLINE */ + +#ifndef barrier +#define barrier() +#endif #ifndef mem_barrier #define mem_barrier() /* NOP */ @@ -240,133 +212,8 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); #define write_mem_barrier() /* NOP */ #endif -#ifndef NO_INLINE -#ifdef __GNUC__ - -/* Define some packed structures to use with unaligned accesses */ - -struct __una_u64 { - uint64_t x __attribute__ ((packed)); -}; -struct __una_u32 { - uint32_t x __attribute__ ((packed)); -}; -struct __una_u16 { - uint16_t x __attribute__ ((packed)); -}; - -/* Elemental unaligned loads */ - -static __inline__ uint64_t -ldq_u(uint64_t * p) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) p; - - return ptr->x; -} - -static __inline__ uint32_t -ldl_u(uint32_t * p) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) p; - - return ptr->x; -} - -static __inline__ uint16_t -ldw_u(uint16_t * p) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) p; - - return ptr->x; -} - -/* Elemental unaligned stores */ - -static __inline__ void -stq_u(uint64_t val, uint64_t * p) -{ - struct __una_u64 *ptr = (struct __una_u64 *) p; - - ptr->x = val; -} - -static __inline__ void -stl_u(uint32_t val, uint32_t * p) -{ - struct __una_u32 *ptr = (struct __una_u32 *) p; - - ptr->x = val; -} - -static __inline__ void -stw_u(uint16_t val, uint16_t * p) -{ - struct __una_u16 *ptr = (struct __una_u16 *) p; - - ptr->x = val; -} -#else /* !__GNUC__ */ - -#include <string.h> /* needed for memmove */ - -static __inline__ uint64_t -ldq_u(uint64_t * p) -{ - uint64_t ret; - - memmove(&ret, p, sizeof(*p)); - return ret; -} - -static __inline__ uint32_t -ldl_u(uint32_t * p) -{ - uint32_t ret; - - memmove(&ret, p, sizeof(*p)); - return ret; -} - -static __inline__ uint16_t -ldw_u(uint16_t * p) -{ - uint16_t ret; - - memmove(&ret, p, sizeof(*p)); - return ret; -} - -static __inline__ void -stq_u(uint64_t val, uint64_t * p) -{ - uint64_t tmp = val; - - memmove(p, &tmp, sizeof(*p)); -} - -static __inline__ void -stl_u(uint32_t val, uint32_t * p) -{ - uint32_t tmp = val; - - memmove(p, &tmp, sizeof(*p)); -} - -static __inline__ void -stw_u(uint16_t val, uint16_t * p) -{ - uint16_t tmp = val; - - memmove(p, &tmp, sizeof(*p)); -} - -#endif /* __GNUC__ */ -#endif /* NO_INLINE */ - -#ifndef NO_INLINE #ifdef __GNUC__ -#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__)) +#if defined(__alpha__) #ifdef linux /* for Linux on Alpha, we use the LIBC _inx/_outx routines */ @@ -439,7 +286,7 @@ extern _X_EXPORT unsigned int inl(unsigned int port); #include <machine/pio.h> #endif /* __NetBSD__ */ -#elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__) +#elif defined(__amd64__) #include <inttypes.h> @@ -488,7 +335,7 @@ inl(unsigned short port) return ret; } -#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__) +#elif defined(__sparc__) #ifndef ASI_PL #define ASI_PL 0x88 @@ -671,56 +518,6 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, barrier(); } -static __inline__ void -xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */ - :"r"(val), "r"(addr), "i"(ASI_PL)); -} - -static __inline__ void -xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("sth %0, [%1]": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */ - :"r"(val), "r"(addr), "i"(ASI_PL)); -} - -static __inline__ void -xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("st %0, [%1]": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */ - :"r"(val), "r"(addr), "i"(ASI_PL)); -} - #elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) #if defined(__arm32__) || defined(__mips64) #define PORT_SIZE long @@ -800,7 +597,7 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, #endif /* !linux */ #endif /* __mips__ */ -#elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) +#elif defined(__powerpc__) #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) @@ -859,92 +656,57 @@ xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset) } static __inline__ void -xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset, - const unsigned char val) +xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, + const unsigned char val) { __asm__ __volatile__("stbx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); + eieio(); } static __inline__ void -xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset, - const unsigned short val) +xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset, + const unsigned short val) { __asm__ __volatile__("sthbrx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); + eieio(); } static __inline__ void -xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset, - const unsigned short val) +xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset, + const unsigned short val) { __asm__ __volatile__("sthx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); + eieio(); } static __inline__ void -xf86WriteMmioNB32Le(__volatile__ void *base, const unsigned long offset, - const unsigned int val) +xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, + const unsigned int val) { __asm__ __volatile__("stwbrx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); + eieio(); } static __inline__ void -xf86WriteMmioNB32Be(__volatile__ void *base, const unsigned long offset, - const unsigned int val) +xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, + const unsigned int val) { __asm__ __volatile__("stwx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); -} - -static __inline__ void -xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, - const unsigned char val) -{ - xf86WriteMmioNB8(base, offset, val); - eieio(); -} - -static __inline__ void -xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset, - const unsigned short val) -{ - xf86WriteMmioNB16Le(base, offset, val); - eieio(); -} - -static __inline__ void -xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset, - const unsigned short val) -{ - xf86WriteMmioNB16Be(base, offset, val); - eieio(); -} - -static __inline__ void -xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - xf86WriteMmioNB32Le(base, offset, val); - eieio(); -} - -static __inline__ void -xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - xf86WriteMmioNB32Be(base, offset, val); eieio(); } @@ -1030,12 +792,9 @@ xf_outl(unsigned short port, unsigned int val) /* * Assume all port access are aligned. We need to revise this implementation - * if there is unaligned port access. For ldq_u, ldl_u, ldw_u, stq_u, stl_u and - * stw_u, they are assumed unaligned. + * if there is unaligned port access. */ -#define barrier() /* no barrier */ - #define PORT_SIZE long static __inline__ unsigned char @@ -1052,13 +811,6 @@ xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, barrier(); } -static __inline__ void -xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - *(volatile unsigned char *) ((unsigned char *) base + offset) = val; -} - static __inline__ unsigned short xf86ReadMmio16Swap(__volatile__ void *base, const unsigned long offset) { @@ -1097,23 +849,6 @@ xf86WriteMmio16(__volatile__ void *base, const unsigned long offset, barrier(); } -static __inline__ void -xf86WriteMmio16SwapNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("wsbh %0, %0;\n\t" "shi %0, [%1];\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -xf86WriteMmio16NB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - *(volatile unsigned short *) ((unsigned char *) base + offset) = val; -} - static __inline__ unsigned int xf86ReadMmio32Swap(__volatile__ void *base, const unsigned long offset) { @@ -1153,23 +888,6 @@ xf86WriteMmio32(__volatile__ void *base, const unsigned long offset, barrier(); } -static __inline__ void -xf86WriteMmio32SwapNB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - unsigned long addr = ((unsigned long) base) + offset; - - __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "swi %0, [%1];\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -xf86WriteMmio32NB(__volatile__ void *base, const unsigned long offset, - const unsigned int val) -{ - *(volatile unsigned int *) ((unsigned char *) base + offset) = val; -} - #if defined(NDS32_MMIO_SWAP) static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) @@ -1207,50 +925,6 @@ inl(unsigned PORT_SIZE port) return xf86ReadMmio32Swap(IOPortBase, port); } -static __inline__ unsigned long -ldq_u(unsigned long *p) -{ - unsigned long addr = (unsigned long) p; - unsigned int ret; - - __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t" - "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret) - :"r"(addr)); - - return ret; -} - -static __inline__ unsigned long -ldl_u(unsigned int *p) -{ - unsigned long addr = (unsigned long) p; - unsigned int ret; - - __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t" - "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret) - :"r"(addr)); - - return ret; -} - -static __inline__ void -stq_u(unsigned long val, unsigned long *p) -{ - unsigned long addr = (unsigned long) p; - - __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -stl_u(unsigned long val, unsigned int *p) -{ - unsigned long addr = (unsigned long) p; - - __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} - #else /* !NDS32_MMIO_SWAP */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) @@ -1291,124 +965,9 @@ inl(unsigned PORT_SIZE port) return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port))); } -static __inline__ unsigned long -ldq_u(unsigned long *p) -{ - unsigned long addr = (unsigned long) p; - unsigned int ret; - - __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t":"=r"(ret) - :"r"(addr)); - - return ret; -} - -static __inline__ unsigned long -ldl_u(unsigned int *p) -{ - unsigned long addr = (unsigned long) p; - unsigned int ret; - - __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t":"=r"(ret) - :"r"(addr)); - - return ret; -} - -static __inline__ void -stq_u(unsigned long val, unsigned long *p) -{ - unsigned long addr = (unsigned long) p; - - __asm__ __volatile__("smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} - -static __inline__ void -stl_u(unsigned long val, unsigned int *p) -{ - unsigned long addr = (unsigned long) p; - - __asm__ __volatile__("smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */ - :"r"(val), "r"(addr)); -} #endif /* NDS32_MMIO_SWAP */ -#if (((X_BYTE_ORDER == X_BIG_ENDIAN) && !defined(NDS32_MMIO_SWAP)) || ((X_BYTE_ORDER != X_BIG_ENDIAN) && defined(NDS32_MMIO_SWAP))) -#define ldw_u(p) ((*(unsigned char *)(p)) << 8 | \ - (*((unsigned char *)(p)+1))) -#define stw_u(v,p) (*(unsigned char *)(p)) = ((v) >> 8); \ - (*((unsigned char *)(p)+1)) = (v) -#else -#define ldw_u(p) ((*(unsigned char *)(p)) | \ - (*((unsigned char *)(p)+1)<<8)) -#define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*((unsigned char *)(p)+1)) = ((v) >> 8) -#endif - -#define mem_barrier() /* XXX: nop for now */ -#define write_mem_barrier() /* XXX: nop for now */ - -#else /* ix86 */ - -#if !defined(__SUNPRO_C) -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && \ - !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && \ - !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) && \ - !defined(__xtensa__) -#ifdef GCCUSESGAS - -/* - * If gcc uses gas rather than the native assembler, the syntax of these - * inlines has to be different. DHD - */ - -static __inline__ void -outb(unsigned short port, unsigned char val) -{ - __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port)); -} - -static __inline__ void -outw(unsigned short port, unsigned short val) -{ - __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port)); -} - -static __inline__ void -outl(unsigned short port, unsigned int val) -{ - __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port)); -} - -static __inline__ unsigned int -inb(unsigned short port) -{ - unsigned char ret; - __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port)); - - return ret; -} - -static __inline__ unsigned int -inw(unsigned short port) -{ - unsigned short ret; - __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port)); - - return ret; -} - -static __inline__ unsigned int -inl(unsigned short port) -{ - unsigned int ret; - __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port)); - - return ret; -} - -#else /* GCCUSESGAS */ +#elif defined(__i386__) || defined(__ia64__) static __inline__ void outb(unsigned short port, unsigned char val) @@ -1455,47 +1014,7 @@ inl(unsigned short port) return ret; } -#endif /* GCCUSESGAS */ - -#else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) && !defined(__arc__) */ - -static __inline__ void -outb(unsigned short port, unsigned char val) -{ -} - -static __inline__ void -outw(unsigned short port, unsigned short val) -{ -} - -static __inline__ void -outl(unsigned short port, unsigned int val) -{ -} - -static __inline__ unsigned int -inb(unsigned short port) -{ - return 0; -} - -static __inline__ unsigned int -inw(unsigned short port) -{ - return 0; -} - -static __inline__ unsigned int -inl(unsigned short port) -{ - return 0; -} - -#endif /* FAKEIT */ -#endif /* __SUNPRO_C */ - -#endif /* ix86 */ +#endif /* arch madness */ #else /* !GNUC */ #if defined(__STDC__) && (__STDC__ == 1) @@ -1506,18 +1025,12 @@ inl(unsigned short port) #if !defined(__SUNPRO_C) && !defined(_MSC_VER) #include <sys/inline.h> #endif -#if (!defined(__HIGHC__) && !defined(__SUNPRO_C) && !defined(_MSC_VER)) || \ - defined(__USLC__) -#pragma asm partial_optimization outl -#pragma asm partial_optimization outw -#pragma asm partial_optimization outb -#pragma asm partial_optimization inl -#pragma asm partial_optimization inw -#pragma asm partial_optimization inb -#endif #endif /* __GNUC__ */ -#endif /* NO_INLINE */ +#if !defined(MMIO_IS_BE) && \ + (defined(SPARC_MMIO_IS_BE) || defined(PPC_MMIO_IS_BE)) +#define MMIO_IS_BE +#endif #ifdef __alpha__ /* entry points for Mmio memory access routines */ @@ -1538,9 +1051,6 @@ xf86ReadMmio32(void *Base, unsigned long Offset) extern _X_EXPORT void (*xf86WriteMmio8) (int, void *, unsigned long); extern _X_EXPORT void (*xf86WriteMmio16) (int, void *, unsigned long); extern _X_EXPORT void (*xf86WriteMmio32) (int, void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmioNB8) (int, void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmioNB16) (int, void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmioNB32) (int, void *, unsigned long); extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); @@ -1560,43 +1070,29 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); write_mem_barrier(); \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ } while (0) -#define MMIO_ONB32(base, offset, val) \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val) #define MMIO_OUT8(base, offset, val) \ (*xf86WriteMmio8)((CARD8)(val), base, offset) #define MMIO_OUT16(base, offset, val) \ (*xf86WriteMmio16)((CARD16)(val), base, offset) -#define MMIO_ONB8(base, offset, val) \ - (*xf86WriteMmioNB8)((CARD8)(val), base, offset) -#define MMIO_ONB16(base, offset, val) \ - (*xf86WriteMmioNB16)((CARD16)(val), base, offset) -#define MMIO_MOVE32(base, offset, val) \ - MMIO_OUT32(base, offset, val) -#elif defined(__powerpc__) +#elif defined(__powerpc__) || defined(__sparc__) /* * we provide byteswapping and no byteswapping functions here * with byteswapping as default, - * drivers that don't need byteswapping should define PPC_MMIO_IS_BE + * drivers that don't need byteswapping should define MMIO_IS_BE */ #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) #define MMIO_OUT8(base, offset, val) \ xf86WriteMmio8(base, offset, (CARD8)(val)) -#define MMIO_ONB8(base, offset, val) \ - xf86WriteMmioNB8(base, offset, (CARD8)(val)) -#if defined(PPC_MMIO_IS_BE) /* No byteswapping */ +#if defined(MMIO_IS_BE) /* No byteswapping */ #define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16Be(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Be(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmioNB16Be(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmioNB32Be(base, offset, (CARD32)(val)) #else /* byteswapping is the default */ #define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset) @@ -1604,56 +1100,8 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); xf86WriteMmio16Le(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Le(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmioNB16Le(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmioNB32Le(base, offset, (CARD32)(val)) #endif -#define MMIO_MOVE32(base, offset, val) \ - xf86WriteMmio32Be(base, offset, (CARD32)(val)) - -#elif defined(__sparc__) || defined(sparc) || defined(__sparc) - /* - * Like powerpc, we provide byteswapping and no byteswapping functions - * here with byteswapping as default, drivers that don't need byteswapping - * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we - * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places - * of drivers?). - */ -#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) -#define MMIO_OUT8(base, offset, val) \ - xf86WriteMmio8(base, offset, (CARD8)(val)) -#define MMIO_ONB8(base, offset, val) \ - xf86WriteMmio8NB(base, offset, (CARD8)(val)) - -#if defined(SPARC_MMIO_IS_BE) /* No byteswapping */ -#define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset) -#define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset) -#define MMIO_OUT16(base, offset, val) \ - xf86WriteMmio16Be(base, offset, (CARD16)(val)) -#define MMIO_OUT32(base, offset, val) \ - xf86WriteMmio32Be(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmio16BeNB(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmio32BeNB(base, offset, (CARD32)(val)) -#else /* byteswapping is the default */ -#define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset) -#define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset) -#define MMIO_OUT16(base, offset, val) \ - xf86WriteMmio16Le(base, offset, (CARD16)(val)) -#define MMIO_OUT32(base, offset, val) \ - xf86WriteMmio32Le(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmio16LeNB(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmio32LeNB(base, offset, (CARD32)(val)) -#endif - -#define MMIO_MOVE32(base, offset, val) \ - xf86WriteMmio32Be(base, offset, (CARD32)(val)) - #elif defined(__nds32__) /* * we provide byteswapping and no byteswapping functions here @@ -1664,8 +1112,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) #define MMIO_OUT8(base, offset, val) \ xf86WriteMmio8(base, offset, (CARD8)(val)) -#define MMIO_ONB8(base, offset, val) \ - xf86WriteMmioNB8(base, offset, (CARD8)(val)) #if defined(NDS32_MMIO_SWAP) /* byteswapping */ #define MMIO_IN16(base, offset) xf86ReadMmio16Swap(base, offset) @@ -1674,10 +1120,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); xf86WriteMmio16Swap(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Swap(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmioNB16Swap(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmioNB32Swap(base, offset, (CARD32)(val)) #else /* no byteswapping is the default */ #define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) @@ -1685,30 +1127,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); xf86WriteMmio16(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32(base, offset, (CARD32)(val)) -#define MMIO_ONB16(base, offset, val) \ - xf86WriteMmioNB16(base, offset, (CARD16)(val)) -#define MMIO_ONB32(base, offset, val) \ - xf86WriteMmioNB32(base, offset, (CARD32)(val)) -#endif - -#define MMIO_MOVE32(base, offset, val) \ - xf86WriteMmio32(base, offset, (CARD32)(val)) - -#ifdef N1213_HC /* for NDS32 N1213 hardcore */ -static __inline__ void -nds32_flush_icache(char *addr) -{ - __asm__ volatile ("isync %0;" - "msync;" - "isb;" - "cctl %0,L1I_VA_INVAL;" "isb;"::"r" (addr):"memory"); -} -#else -static __inline__ void -nds32_flush_icache(char *addr) -{ - __asm__ volatile ("isync %0;" "isb;"::"r" (addr):"memory"); -} #endif #else /* !__alpha__ && !__powerpc__ && !__sparc__ */ @@ -1725,11 +1143,6 @@ nds32_flush_icache(char *addr) *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val) #define MMIO_OUT32(base, offset, val) \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val) -#define MMIO_ONB8(base, offset, val) MMIO_OUT8(base, offset, val) -#define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val) -#define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val) - -#define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val) #endif /* __alpha__ */ diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h index cec31354e..49ff35b86 100644 --- a/xorg-server/hw/xfree86/common/xf86.h +++ b/xorg-server/hw/xfree86/common/xf86.h @@ -129,14 +129,6 @@ extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, EntityProc enter, EntityProc leave, void *private); -/* Obsolete! don't use */ -extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, - int entityIndex, - PciChipsets * p_chip, - void *dummy, EntityProc init, - EntityProc enter, - EntityProc leave, - void *private); #else #define xf86VGAarbiterInit() do {} while (0) #define xf86VGAarbiterFini() do {} while (0) diff --git a/xorg-server/hw/xfree86/common/xf86Cursor.c b/xorg-server/hw/xfree86/common/xf86Cursor.c index 7d0776eaa..92c08af9e 100644 --- a/xorg-server/hw/xfree86/common/xf86Cursor.c +++ b/xorg-server/hw/xfree86/common/xf86Cursor.c @@ -37,8 +37,6 @@ #include "scrnintstr.h" #include "globals.h" -#include "compiler.h" - #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSproc.h" @@ -76,8 +74,6 @@ static miPointerScreenFuncRec xf86PointerScreenFuncs = { static xf86ScreenLayoutRec xf86ScreenLayout[MAXSCREENS]; -static Bool HardEdges; - /* * xf86InitViewport -- * Initialize paning & zooming parameters, so that a driver must only @@ -431,16 +427,6 @@ xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y) } } -#if 0 - /* This presents problems for overlapping screens when - HardEdges is used. Have to think about the logic more */ - if ((*x < 0) || (*x >= (*pScreen)->width) || - (*y < 0) || (*y >= (*pScreen)->height)) { - /* We may have crossed more than one screen */ - xf86CursorOffScreen(pScreen, x, y); - } -#endif - return TRUE; } @@ -584,9 +570,6 @@ xf86InitOrigins(void) xf86ScreenLayoutPtr pLayout; Bool OldStyleConfig = FALSE; - /* need to have this set up with a config file option */ - HardEdges = FALSE; - memset(xf86ScreenLayout, 0, MAXSCREENS * sizeof(xf86ScreenLayoutRec)); screensLeft = prevScreensLeft = (1 << xf86NumScreens) - 1; @@ -838,7 +821,7 @@ xf86InitOrigins(void) } } - if (!HardEdges && !OldStyleConfig) { + if (!OldStyleConfig) { for (i = 0; i < xf86NumScreens; i++) { pLayout = &xf86ScreenLayout[i]; pScreen = xf86Screens[i]->pScreen; diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 35a673d15..16b3e2821 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -58,7 +58,6 @@ #include <X11/Xproto.h> #include <X11/Xatom.h> #include "misc.h" -#include "compiler.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 5a45004f5..b197c1c38 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -56,8 +56,6 @@ #include "dbus-core.h" #include "systemd-logind.h" -#include "compiler.h" - #include "loaderProcs.h" #ifdef XFreeXDGA #include "dgaproc.h" diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c index 2418731dc..08f656b30 100644 --- a/xorg-server/hw/xfree86/common/xf86RandR.c +++ b/xorg-server/hw/xfree86/common/xf86RandR.c @@ -37,7 +37,6 @@ #include "inputstr.h" typedef struct _xf86RandRInfo { - CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; int virtualX; int virtualY; @@ -336,34 +335,6 @@ xf86RandRSetConfig(ScreenPtr pScreen, } /* - * Wait until the screen is initialized before whacking the - * sizes around; otherwise the screen pixmap will be allocated - * at the current mode size rather than the maximum size - */ -static Bool -xf86RandRCreateScreenResources(ScreenPtr pScreen) -{ - XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); - -#if 0 - ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); - DisplayModePtr mode; -#endif - - pScreen->CreateScreenResources = randrp->CreateScreenResources; - if (!(*pScreen->CreateScreenResources) (pScreen)) - return FALSE; - -#if 0 - mode = scrp->currentMode; - if (mode) - xf86RandRSetMode(pScreen, mode, TRUE); -#endif - - return TRUE; -} - -/* * Reset size back to original */ static Bool @@ -463,9 +434,6 @@ xf86RandRInit(ScreenPtr pScreen) randrp->mmWidth = pScreen->mmWidth; randrp->mmHeight = pScreen->mmHeight; - randrp->CreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = xf86RandRCreateScreenResources; - randrp->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86RandRCloseScreen; diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index c06b04033..e86ecb9d4 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -1061,33 +1061,6 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, return pScrn; } -/* - * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete function. - * It is likely to be removed. Don't use! - */ -Bool -xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, - PciChipsets * p_chip, void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, void *private) -{ - EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); - - if (!pEnt) - return FALSE; - - if (!pEnt->active || !(pEnt->location.type == BUS_PCI)) { - free(pEnt); - return FALSE; - } - xf86AddEntityToScreen(pScrn, entityIndex); - - free(pEnt); - if (!xf86SetEntityFuncs(entityIndex, init, enter, leave, private)) - return FALSE; - - return TRUE; -} - int xf86VideoPtrToDriverList(struct pci_device *dev, char *returnList[], int returnListMax) @@ -1500,15 +1473,3 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, if (*chipset < 0) *chipset = (pVideo->vendor_id << 16) | pVideo->device_id; } - -struct pci_io_handle * -xf86MapLegacyIO(struct pci_device *dev) -{ - return pci_legacy_open_io(dev, 0, 64 * 1024); -} - -void -xf86UnmapLegacyIO(struct pci_device *dev, struct pci_io_handle *handle) -{ - pci_device_close_io(dev, handle); -} diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c index 22e4603e6..946039940 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.c +++ b/xorg-server/hw/xfree86/common/xf86platformBus.c @@ -348,7 +348,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, GDevPtr gdev, int flags, intptr_t match_data) { Bool foundScreen = FALSE; - int entity, fd, major, minor; + int entity; if (gdev && gdev->screen == 0 && !xf86_check_platform_slot(dev)) return FALSE; @@ -374,10 +374,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, if (entity != -1) { if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc || !drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) { - fd = dev->attribs->fd; - major = dev->attribs->major; - minor = dev->attribs->minor; - systemd_logind_release_fd(major, minor, fd); + systemd_logind_release_fd(dev->attribs->major, dev->attribs->minor, dev->attribs->fd); dev->attribs->fd = -1; dev->flags &= ~XF86_PDEV_SERVER_FD; } diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index e212a7387..d342bdecc 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -54,38 +54,31 @@ #include "xf86xvpriv.h" -/* XvScreenRec fields */ - -static Bool xf86XVCloseScreen(ScreenPtr); -static int xf86XVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *); - /* XvAdaptorRec fields */ -static int xf86XVAllocatePort(unsigned long, XvPortPtr, XvPortPtr *); -static int xf86XVFreePort(XvPortPtr); -static int xf86XVPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int xf86XVPutVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int xf86XVPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int xf86XVPutStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int xf86XVGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int xf86XVGetVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int xf86XVGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int xf86XVGetStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); -static int xf86XVStopVideo(ClientPtr, XvPortPtr, DrawablePtr); -static int xf86XVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); -static int xf86XVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); -static int xf86XVQueryBestSize(ClientPtr, XvPortPtr, CARD8, +static int xf86XVStopVideo(XvPortPtr, DrawablePtr); +static int xf86XVSetPortAttribute(XvPortPtr, Atom, INT32); +static int xf86XVGetPortAttribute(XvPortPtr, Atom, INT32 *); +static int xf86XVQueryBestSize(XvPortPtr, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); -static int xf86XVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, +static int xf86XVPutImage(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); -static int xf86XVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr, +static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr, CARD16 *, CARD16 *, int *, int *); /* ScreenRec fields */ @@ -95,6 +88,7 @@ static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2); static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind); static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy); +static Bool xf86XVCloseScreen(ScreenPtr); #define PostValidateTreeUndefined ((PostValidateTreeProcPtr)-1) @@ -113,7 +107,10 @@ static DevPrivateKeyRec XF86XVWindowKeyRec; #define XF86XVWindowKey (&XF86XVWindowKeyRec) +/* dixmain.c XvScreenPtr screen private */ DevPrivateKey XF86XvScreenKey; +/** xf86xv.c XF86XVScreenPtr screen private */ +static DevPrivateKeyRec XF86XVScreenPrivateKey; static unsigned long PortResource = 0; @@ -121,7 +118,7 @@ static unsigned long PortResource = 0; ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey)) #define GET_XF86XV_SCREEN(pScreen) \ - ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) + ((XF86XVScreenPtr)(dixGetPrivate(&pScreen->devPrivates, &XF86XVScreenPrivateKey))) #define GET_XF86XV_WINDOW(pWin) \ ((XF86XVWindowPtr)dixLookupPrivate(&(pWin)->devPrivates, XF86XVWindowKey)) @@ -232,7 +229,6 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) { ScrnInfoPtr pScrn; XF86XVScreenPtr ScreenPriv; - XvScreenPtr pxvs; if (num <= 0 || noXvExtension) return FALSE; @@ -242,26 +238,15 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) if (!dixRegisterPrivateKey(&XF86XVWindowKeyRec, PRIVATE_WINDOW, 0)) return FALSE; + if (!dixRegisterPrivateKey(&XF86XVScreenPrivateKey, PRIVATE_SCREEN, 0)) + return FALSE; XF86XvScreenKey = XvGetScreenKey(); PortResource = XvGetRTPort(); - pxvs = GET_XV_SCREEN(pScreen); - - /* Anyone initializing the Xv layer must provide these two. - The Xv di layer calls them without even checking if they exist! */ - - pxvs->ddCloseScreen = xf86XVCloseScreen; - pxvs->ddQueryAdaptors = xf86XVQueryAdaptors; - - /* The Xv di layer provides us with a private hook so that we don't - have to allocate our own screen private. They also provide - a CloseScreen hook so that we don't have to wrap it. I'm not - sure that I appreciate that. */ - ScreenPriv = malloc(sizeof(XF86XVScreenRec)); - pxvs->devPriv.ptr = (void *) ScreenPriv; + dixSetPrivate(&pScreen->devPrivates, &XF86XVScreenPrivateKey, ScreenPriv); if (!ScreenPriv) return FALSE; @@ -272,6 +257,7 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) ScreenPriv->WindowExposures = pScreen->WindowExposures; ScreenPriv->PostValidateTree = PostValidateTreeUndefined; ScreenPriv->ClipNotify = pScreen->ClipNotify; + ScreenPriv->CloseScreen = pScreen->CloseScreen; ScreenPriv->EnterVT = pScrn->EnterVT; ScreenPriv->LeaveVT = pScrn->LeaveVT; ScreenPriv->AdjustFrame = pScrn->AdjustFrame; @@ -280,6 +266,7 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) pScreen->DestroyWindow = xf86XVDestroyWindow; pScreen->WindowExposures = xf86XVWindowExposures; pScreen->ClipNotify = xf86XVClipNotify; + pScreen->CloseScreen = xf86XVCloseScreen; pScrn->EnterVT = xf86XVEnterVT; pScrn->LeaveVT = xf86XVLeaveVT; if (pScrn->AdjustFrame) @@ -297,21 +284,6 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - free(pAdaptor->name); - pAdaptor->name = NULL; - - if (pAdaptor->pEncodings) { - XvEncodingPtr pEncode = pAdaptor->pEncodings; - - for (i = 0; i < pAdaptor->nEncodings; i++, pEncode++) - free(pEncode->name); - free(pAdaptor->pEncodings); - pAdaptor->pEncodings = NULL; - } - - free(pAdaptor->pFormats); - pAdaptor->pFormats = NULL; - if (pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; XvPortRecPrivatePtr pPriv; @@ -328,23 +300,9 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) free(pPriv); } } - free(pAdaptor->pPorts); - pAdaptor->pPorts = NULL; - } - - if (pAdaptor->pAttributes) { - XvAttributePtr pAttribute = pAdaptor->pAttributes; - - for (i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) - free(pAttribute->name); - free(pAdaptor->pAttributes); - pAdaptor->pAttributes = NULL; } - free(pAdaptor->pImages); - free(pAdaptor->devPriv.ptr); - pAdaptor->pImages = NULL; - pAdaptor->devPriv.ptr = NULL; + XvFreeAdaptor(pAdaptor); } static Bool @@ -409,8 +367,6 @@ xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * infoPtr, int number) continue; pa->pScreen = pScreen; - pa->ddAllocatePort = xf86XVAllocatePort; - pa->ddFreePort = xf86XVFreePort; pa->ddPutVideo = xf86XVPutVideo; pa->ddPutStill = xf86XVPutStill; pa->ddGetVideo = xf86XVGetVideo; @@ -712,10 +668,6 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->GetVideo) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, @@ -788,22 +740,6 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - /* bailout if we have to clip but the hardware doesn't support it */ - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto CLIP_VIDEO_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, @@ -882,22 +818,6 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) goto CLIP_VIDEO_BAILOUT; } - /* bailout if we have to clip but the hardware doesn't support it */ - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto CLIP_VIDEO_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->ReputImage) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, @@ -1235,6 +1155,7 @@ xf86XVCloseScreen(ScreenPtr pScreen) pScreen->DestroyWindow = ScreenPriv->DestroyWindow; pScreen->WindowExposures = ScreenPriv->WindowExposures; pScreen->ClipNotify = ScreenPriv->ClipNotify; + pScreen->CloseScreen = ScreenPriv->CloseScreen; pScrn->EnterVT = ScreenPriv->EnterVT; pScrn->LeaveVT = ScreenPriv->LeaveVT; @@ -1247,19 +1168,8 @@ xf86XVCloseScreen(ScreenPtr pScreen) free(pxvs->pAdaptors); free(ScreenPriv); - return TRUE; -} - -static int -xf86XVQueryAdaptors(ScreenPtr pScreen, - XvAdaptorPtr * p_pAdaptors, int *p_nAdaptors) -{ - XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); - *p_nAdaptors = pxvs->nAdaptors; - *p_pAdaptors = pxvs->pAdaptors; - - return Success; + return pScreen->CloseScreen(pScreen); } /**** ScrnInfoRec fields ****/ @@ -1361,21 +1271,7 @@ xf86XVModeSet(ScrnInfoPtr pScrn) /**** XvAdaptorRec fields ****/ static int -xf86XVAllocatePort(unsigned long port, XvPortPtr pPort, XvPortPtr * ppPort) -{ - *ppPort = pPort; - return Success; -} - -static int -xf86XVFreePort(XvPortPtr pPort) -{ - return Success; -} - -static int -xf86XVPutVideo(ClientPtr client, - DrawablePtr pDraw, +xf86XVPutVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1425,8 +1321,7 @@ xf86XVPutVideo(ClientPtr client, } static int -xf86XVPutStill(ClientPtr client, - DrawablePtr pDraw, +xf86XVPutStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1480,21 +1375,6 @@ xf86XVPutStill(ClientPtr client, goto PUT_STILL_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto PUT_STILL_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutStill) (portPriv->pScrn, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, @@ -1538,8 +1418,7 @@ xf86XVPutStill(ClientPtr client, } static int -xf86XVGetVideo(ClientPtr client, - DrawablePtr pDraw, +xf86XVGetVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1589,8 +1468,7 @@ xf86XVGetVideo(ClientPtr client, } static int -xf86XVGetStill(ClientPtr client, - DrawablePtr pDraw, +xf86XVGetStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, @@ -1628,10 +1506,6 @@ xf86XVGetStill(ClientPtr client, goto GET_STILL_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->GetStill) (portPriv->pScrn, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, @@ -1653,7 +1527,7 @@ xf86XVGetStill(ClientPtr client, } static int -xf86XVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) +xf86XVStopVideo(XvPortPtr pPort, DrawablePtr pDraw) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1677,8 +1551,7 @@ xf86XVStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) } static int -xf86XVSetPortAttribute(ClientPtr client, - XvPortPtr pPort, Atom attribute, INT32 value) +xf86XVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1688,8 +1561,7 @@ xf86XVSetPortAttribute(ClientPtr client, } static int -xf86XVGetPortAttribute(ClientPtr client, - XvPortPtr pPort, Atom attribute, INT32 *p_value) +xf86XVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); @@ -1699,8 +1571,7 @@ xf86XVGetPortAttribute(ClientPtr client, } static int -xf86XVQueryBestSize(ClientPtr client, - XvPortPtr pPort, +xf86XVQueryBestSize(XvPortPtr pPort, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, @@ -1717,8 +1588,7 @@ xf86XVQueryBestSize(ClientPtr client, } static int -xf86XVPutImage(ClientPtr client, - DrawablePtr pDraw, +xf86XVPutImage(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 src_x, INT16 src_y, @@ -1780,21 +1650,6 @@ xf86XVPutImage(ClientPtr client, goto PUT_IMAGE_BAILOUT; } - if (portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = RegionRects(&ClipRegion); - - if ((RegionNumRects(&ClipRegion) != 1) || - (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || - (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { - clippedAway = TRUE; - goto PUT_IMAGE_BAILOUT; - } - } - - if (portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); - } - ret = (*portPriv->AdaptorRec->PutImage) (portPriv->pScrn, src_x, src_y, WinBox.x1, WinBox.y1, src_w, src_h, drw_w, drw_h, @@ -1838,8 +1693,7 @@ xf86XVPutImage(ClientPtr client, } static int -xf86XVQueryImageAttributes(ClientPtr client, - XvPortPtr pPort, +xf86XVQueryImageAttributes(XvPortPtr pPort, XvImagePtr format, CARD16 *width, CARD16 *height, int *pitches, int *offsets) @@ -1856,34 +1710,11 @@ void xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr fillboxes) { ScreenPtr pScreen = pDraw->pScreen; - ChangeGCVal pval[2]; - BoxPtr pbox = RegionRects(fillboxes); - int i, nbox = RegionNumRects(fillboxes); - xRectangle *rects; - GCPtr gc; if (!xf86ScreenToScrn(pScreen)->vtSema) return; - gc = GetScratchGC(pDraw->depth, pScreen); - pval[0].val = key; - pval[1].val = IncludeInferiors; - (void) ChangeGC(NullClient, gc, GCForeground | GCSubwindowMode, pval); - ValidateGC(pDraw, gc); - - rects = malloc(nbox * sizeof(xRectangle)); - - for (i = 0; i < nbox; i++, pbox++) { - rects[i].x = pbox->x1 - pDraw->x; - rects[i].y = pbox->y1 - pDraw->y; - rects[i].width = pbox->x2 - pbox->x1; - rects[i].height = pbox->y2 - pbox->y1; - } - - (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects); - - free(rects); - FreeScratchGC(gc); + XvFillColorKey(pDraw, key, fillboxes); } void diff --git a/xorg-server/hw/xfree86/common/xf86xv.h b/xorg-server/hw/xfree86/common/xf86xv.h index de17eb133..c6455d703 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.h +++ b/xorg-server/hw/xfree86/common/xf86xv.h @@ -32,8 +32,6 @@ #include "xvdix.h" #include "xf86str.h" -#define VIDEO_NO_CLIPPING 0x00000001 -#define VIDEO_INVERT_CLIPLIST 0x00000002 #define VIDEO_OVERLAID_IMAGES 0x00000004 #define VIDEO_OVERLAID_STILLS 0x00000008 /* diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h index e95f959a8..c0dff16d5 100644 --- a/xorg-server/hw/xfree86/common/xf86xvpriv.h +++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h @@ -45,6 +45,7 @@ typedef struct { Bool (*EnterVT) (ScrnInfoPtr); void (*LeaveVT) (ScrnInfoPtr); xf86ModeSetProc *ModeSet; + CloseScreenProcPtr CloseScreen; } XF86XVScreenRec, *XF86XVScreenPtr; typedef struct { diff --git a/xorg-server/hw/xfree86/doc/ddxDesign.xml b/xorg-server/hw/xfree86/doc/ddxDesign.xml index d1fd9af7b..6a9de9e7f 100644 --- a/xorg-server/hw/xfree86/doc/ddxDesign.xml +++ b/xorg-server/hw/xfree86/doc/ddxDesign.xml @@ -4543,31 +4543,6 @@ as follows: <variablelist> <varlistentry> - <term><constant>VIDEO_NO_CLIPPING</constant></term> - <listitem><para> - This indicates that the video adaptor does not support - clipping. The driver will never receive <quote>Put</quote> requests - where less than the entire area determined by - <parameter>drw_x</parameter>, <parameter>drw_y</parameter>, - <parameter>drw_w</parameter> and <parameter>drw_h</parameter> is visible. - This flag does not apply to <quote>Get</quote> requests. Hardware - that is incapable of clipping <quote>Gets</quote> may punt or get - the extents of the clipping region passed to it. - </para></listitem> - - </varlistentry> - - <varlistentry> - <term><constant>VIDEO_INVERT_CLIPLIST</constant></term> - <listitem><para> - This indicates that the video driver requires the clip - list to contain the regions which are obscured rather - than the regions which are are visible. - </para></listitem> - - </varlistentry> - - <varlistentry> <term><constant>VIDEO_OVERLAID_STILLS</constant></term> <listitem><para> Implementing PutStill for hardware that does video as an @@ -4724,18 +4699,13 @@ as follows: </para> <para> - If the <constant>VIDEO_NO_CLIPPING</constant> - flag is set, the <literal remap="tt">clipBoxes</literal> may be ignored by - the driver. <literal remap="tt">ClipBoxes</literal> is an <literal remap="tt">X-Y</literal> + <literal remap="tt">ClipBoxes</literal> is an <literal remap="tt">X-Y</literal> banded region identical to those used throughout the server. The clipBoxes represent the visible portions of the area determined by <literal remap="tt">drw_x</literal>, <literal remap="tt">drw_y</literal>, <literal remap="tt">drw_w</literal> and <literal remap="tt">drw_h</literal> in the Get/Put function. The boxes are in screen coordinates, are guaranteed not to overlap and an empty region will never be passed. - If the driver has specified <constant>VIDEO_INVERT_CLIPLIST</constant>, - <literal remap="tt">clipBoxes</literal> will indicate the areas of the primitive - which are obscured rather than the areas visible. </para></listitem></varlistentry> </variablelist> @@ -9094,8 +9064,7 @@ ZZZScreenInit(ScreenPtr pScreen, int argc, char **argv) xf86SetBlackWhitePixels(pScreen); /* - * Install colourmap functions. If using the vgahw module, - * vgaHandleColormaps would usually be called here. + * Install colourmap functions. */ ... diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index 95828bbac..3f2f6a9b3 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -595,14 +595,6 @@ DRIFinishScreenInit(ScreenPtr pScreen) DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; /* Wrap DRI support */ - if (pDRIInfo->wrap.ValidateTree) { - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = pDRIInfo->wrap.ValidateTree; - } - if (pDRIInfo->wrap.PostValidateTree) { - pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = pDRIInfo->wrap.PostValidateTree; - } if (pDRIInfo->wrap.WindowExposures) { pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; pScreen->WindowExposures = pDRIInfo->wrap.WindowExposures; @@ -652,14 +644,6 @@ DRICloseScreen(ScreenPtr pScreen) if (pDRIPriv->wrapped) { /* Unwrap DRI Functions */ - if (pDRIInfo->wrap.ValidateTree) { - pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; - pDRIPriv->wrap.ValidateTree = NULL; - } - if (pDRIInfo->wrap.PostValidateTree) { - pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; - pDRIPriv->wrap.PostValidateTree = NULL; - } if (pDRIInfo->wrap.WindowExposures) { pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; pDRIPriv->wrap.WindowExposures = NULL; @@ -1601,8 +1585,6 @@ DRICreateInfoRec(void) inforec->wrap.BlockHandler = DRIDoBlockHandler; inforec->wrap.WindowExposures = DRIWindowExposures; inforec->wrap.CopyWindow = DRICopyWindow; - inforec->wrap.ValidateTree = DRIValidateTree; - inforec->wrap.PostValidateTree = DRIPostValidateTree; inforec->wrap.ClipNotify = DRIClipNotify; inforec->wrap.AdjustFrame = DRIAdjustFrame; @@ -2064,61 +2046,6 @@ DRILockTree(ScreenPtr pScreen) } } -int -DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen = pParent->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - int returnValue = 1; /* always return 1, not checked by dix/window.c */ - - if (!pDRIPriv) - return returnValue; - - /* call lower wrapped functions */ - if (pDRIPriv->wrap.ValidateTree) { - /* unwrap */ - pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; - - /* call lower layers */ - returnValue = (*pScreen->ValidateTree) (pParent, pChild, kind); - - /* rewrap */ - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = DRIValidateTree; - } - - return returnValue; -} - -void -DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - - if (pParent) { - pScreen = pParent->drawable.pScreen; - } - else { - pScreen = pChild->drawable.pScreen; - } - if (!(pDRIPriv = DRI_SCREEN_PRIV(pScreen))) - return; - - if (pDRIPriv->wrap.PostValidateTree) { - /* unwrap */ - pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; - - /* call lower layers */ - (*pScreen->PostValidateTree) (pParent, pChild, kind); - - /* rewrap */ - pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = DRIPostValidateTree; - } -} - void DRIClipNotify(WindowPtr pWin, int dx, int dy) { diff --git a/xorg-server/hw/xfree86/dri/dri.h b/xorg-server/hw/xfree86/dri/dri.h index 64cd7c9d4..dec688582 100644 --- a/xorg-server/hw/xfree86/dri/dri.h +++ b/xorg-server/hw/xfree86/dri/dri.h @@ -85,8 +85,6 @@ typedef struct { ScreenBlockHandlerProcPtr BlockHandler; WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; - ValidateTreeProcPtr ValidateTree; - PostValidateTreeProcPtr PostValidateTree; ClipNotifyProcPtr ClipNotify; AdjustFramePtr AdjustFrame; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; @@ -290,12 +288,6 @@ extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); extern _X_EXPORT void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -extern _X_EXPORT int DRIValidateTree(WindowPtr pParent, - WindowPtr pChild, VTKind kind); - -extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent, - WindowPtr pChild, VTKind kind); - extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, int dx, int dy); extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin); diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index abbd36f3c..73a1e5e49 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -20,6 +20,42 @@ #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) +#include <string.h> /* needed for memmove */ + +static __inline__ uint32_t +ldl_u(uint32_t * p) +{ + uint32_t ret; + + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ uint16_t +ldw_u(uint16_t * p) +{ + uint16_t ret; + + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ void +stl_u(uint32_t val, uint32_t * p) +{ + uint32_t tmp = val; + + memmove(p, &tmp, sizeof(*p)); +} + +static __inline__ void +stw_u(uint16_t val, uint16_t * p) +{ + uint16_t tmp = val; + + memmove(p, &tmp, sizeof(*p)); +} + static uint8_t read_b(xf86Int10InfoPtr pInt, int addr); static uint16_t read_w(xf86Int10InfoPtr pInt, int addr); static uint32_t read_l(xf86Int10InfoPtr pInt, int addr); diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index 64c69bb8a..cc41dcb4c 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -65,7 +65,6 @@ #include "loaderProcs.h" #include "xf86.h" #include "xf86Priv.h" -#include "compiler.h" #ifdef HAVE_DLFCN_H diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c index 1627e61dd..9c00a443f 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rotate.c +++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c @@ -35,7 +35,6 @@ #include "xf86.h" #include "xf86DDC.h" -#include "fb.h" #include "windowstr.h" #include "xf86Crtc.h" #include "xf86Modes.h" @@ -310,6 +309,8 @@ xf86RotateCloseScreen(ScreenPtr screen) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; + /* This has already been destroyed when the root window was destroyed */ + xf86_config->rotation_damage = NULL; for (c = 0; c < xf86_config->num_crtc; c++) xf86RotateDestroy(xf86_config->crtc[c]); } diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c index 95bd0591a..f656f5595 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c @@ -431,12 +431,6 @@ extern int readDense8(void *Base, register unsigned long Offset); extern int readDense16(void *Base, register unsigned long Offset); extern int readDense32(void *Base, register unsigned long Offset); extern void - writeDenseNB8(int Value, void *Base, register unsigned long Offset); -extern void - writeDenseNB16(int Value, void *Base, register unsigned long Offset); -extern void - writeDenseNB32(int Value, void *Base, register unsigned long Offset); -extern void writeDense8(int Value, void *Base, register unsigned long Offset); extern void writeDense16(int Value, void *Base, register unsigned long Offset); @@ -666,12 +660,6 @@ void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; -void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset) - = writeDenseNB8; -void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset) - = writeDenseNB16; -void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset) - = writeDenseNB32; int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; int (*xf86ReadMmio16) (void *Base, unsigned long Offset) diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c index 6a977c2db..e295c9244 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c @@ -487,142 +487,3 @@ xf86DisableIO() } #endif /* USE_ARC_MMAP */ - -#if 0 -/* - * XXX This is here for reference. It needs to be handled differently for the - * ND. - */ -#if defined(USE_ARC_MMAP) || defined(__arm32__) - -#ifdef USE_ARM32_MMAP -#define DEV_MEM_IOBASE 0x43000000 -#endif - -static Bool ScreenEnabled[MAXSCREENS]; -static Bool ExtendedEnabled = FALSE; -static Bool InitDone = FALSE; - -Bool -xf86EnableIOPorts(ScreenNum) -int ScreenNum; -{ - int i; - int fd; - void *base; - -#ifdef __arm32__ - struct memAccess *memInfoP; - int *Size; -#endif - - ScreenEnabled[ScreenNum] = TRUE; - - if (ExtendedEnabled) - return TRUE; - -#ifdef USE_ARC_MMAP - if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) { - /* Try to map a page at the pccons I/O space */ - base = (void *) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE, - MAP_FLAGS, fd, (off_t) 0x0000); - - if (base != (void *) -1) { - IOPortBase = base; - } - else { - xf86Msg(X_ERROR, - "EnableIOPorts: failed to mmap %s (%s)\n", - "/dev/ttyC0", strerror(errno)); - } - } - else { - xf86Msg(X_ERROR, "EnableIOPorts: failed to open %s (%s)\n", - "/dev/ttyC0", strerror(errno)); - } -#endif - -#ifdef __arm32__ - IOPortBase = (unsigned int) -1; - - if ((memInfoP = checkMapInfo(TRUE, MMIO_REGION)) != NULL) { - /* - * xf86MapInfoMap maps an offset from the start of video IO - * space (e.g. 0x3B0), but IOPortBase is expected to map to - * physical address 0x000, so subtract the start of video I/O - * space from the result. This is safe for now becase we - * actually mmap the start of the page, then the start of video - * I/O space is added as an internal offset. - */ - IOPortBase = (unsigned int) xf86MapInfoMap(memInfoP, (caddr_t) 0x0, 0L) - - memInfoP->memInfo.u.map_info_mmap.internal_offset; - ExtendedEnabled = TRUE; - return TRUE; - } -#ifdef USE_ARM32_MMAP - checkDevMem(TRUE); - - if (devMemFd >= 0 && useDevMem) { - base = (void *) mmap((caddr_t) 0, 0x400, PROT_READ | PROT_WRITE, - MAP_FLAGS, devMemFd, (off_t) DEV_MEM_IOBASE); - - if (base != (void *) -1) - IOPortBase = (unsigned int) base; - } - - if (IOPortBase == (unsigned int) -1) { - xf86Msg(X_WARNING, - "xf86EnableIOPorts: failed to open mem device or map IO base. \n\ -Make sure you have the Aperture Driver installed, or a kernel built with the INSECURE option\n"); - return FALSE; - } -#else - /* We don't have the IOBASE, so we can't map the address */ - xf86Msg(X_WARNING, - "xf86EnableIOPorts: failed to open mem device or map IO base. \n\ -Try building the server with USE_ARM32_MMAP defined\n"); - return FALSE; -#endif -#endif - - ExtendedEnabled = TRUE; - - return TRUE; -} - -void -xf86DisableIOPorts(ScreenNum) -int ScreenNum; -{ - int i; - -#ifdef __arm32__ - struct memAccess *memInfoP; -#endif - - ScreenEnabled[ScreenNum] = FALSE; - -#ifdef __arm32__ - if ((memInfoP = checkMapInfo(FALSE, MMIO_REGION)) != NULL) { - xf86MapInfoUnmap(memInfoP, 0); - } -#endif - -#ifdef USE_ARM32_MMAP - if (!ExtendedEnabled) - return; - - for (i = 0; i < MAXSCREENS; i++) - if (ScreenEnabled[i]) - return; - - munmap((caddr_t) IOPortBase, 0x400); - IOPortBase = (unsigned int) -1; - ExtendedEnabled = FALSE; -#endif - - return; -} - -#endif /* USE_ARC_MMAP || USE_ARM32_MMAP */ -#endif diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c index 320bb23b6..95883491b 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c @@ -26,12 +26,6 @@ int readDense8(void *Base, register unsigned long Offset); int readDense16(void *Base, register unsigned long Offset); int readDense32(void *Base, register unsigned long Offset); void - writeDenseNB8(int Value, void *Base, register unsigned long Offset); -void - writeDenseNB16(int Value, void *Base, register unsigned long Offset); -void - writeDenseNB32(int Value, void *Base, register unsigned long Offset); -void writeDense8(int Value, void *Base, register unsigned long Offset); void writeDense16(int Value, void *Base, register unsigned long Offset); @@ -60,24 +54,6 @@ readDense32(void *Base, register unsigned long Offset) } void -writeDenseNB8(int Value, void *Base, register unsigned long Offset) -{ - alpha_stb((void *) ((unsigned long) Base + (Offset)), Value); -} - -void -writeDenseNB16(int Value, void *Base, register unsigned long Offset) -{ - alpha_stw((void *) ((unsigned long) Base + (Offset)), Value); -} - -void -writeDenseNB32(int Value, void *Base, register unsigned long Offset) -{ - *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; -} - -void writeDense8(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h index f69e55b39..210ab3d89 100644 --- a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h @@ -232,28 +232,7 @@ * Typedefs, etc... */ -/* Primitive Types */ -typedef unsigned long ADDRESS; /* Memory/PCI address */ -typedef unsigned long IOADDRESS _X_DEPRECATED; /* Must be large enough for a pointer */ -typedef CARD32 PCITAG _X_DEPRECATED; - -typedef enum { - PCI_MEM, - PCI_MEM_SIZE, - PCI_MEM_SPARSE_BASE, - PCI_MEM_SPARSE_MASK, - PCI_IO, - PCI_IO_SIZE, - PCI_IO_SPARSE_BASE, - PCI_IO_SPARSE_MASK -} PciAddrType; - /* Public PCI access functions */ extern _X_EXPORT Bool xf86scanpci(void); -/* Domain access functions. Some of these probably shouldn't be public */ -extern _X_EXPORT struct pci_io_handle *xf86MapLegacyIO(struct pci_device *dev); -extern _X_EXPORT void xf86UnmapLegacyIO(struct pci_device *, - struct pci_io_handle *); - #endif /* _XF86PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c index b6950009c..4e886b6ce 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c @@ -10,12 +10,6 @@ int readDense8(void *Base, register unsigned long Offset); int readDense16(void *Base, register unsigned long Offset); int readDense32(void *Base, register unsigned long Offset); void - writeDenseNB8(int Value, void *Base, register unsigned long Offset); -void - writeDenseNB16(int Value, void *Base, register unsigned long Offset); -void - writeDenseNB32(int Value, void *Base, register unsigned long Offset); -void writeDense8(int Value, void *Base, register unsigned long Offset); void writeDense16(int Value, void *Base, register unsigned long Offset); @@ -44,24 +38,6 @@ readDense32(void *Base, register unsigned long Offset) } void -writeDenseNB8(int Value, void *Base, register unsigned long Offset) -{ - *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; -} - -void -writeDenseNB16(int Value, void *Base, register unsigned long Offset) -{ - *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; -} - -void -writeDenseNB32(int Value, void *Base, register unsigned long Offset) -{ - *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; -} - -void writeDense8(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 652f963a2..ffffc81c5 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -571,12 +571,6 @@ extern int readDense8(void *Base, register unsigned long Offset); extern int readDense16(void *Base, register unsigned long Offset); extern int readDense32(void *Base, register unsigned long Offset); extern void - writeDenseNB8(int Value, void *Base, register unsigned long Offset); -extern void - writeDenseNB16(int Value, void *Base, register unsigned long Offset); -extern void - writeDenseNB32(int Value, void *Base, register unsigned long Offset); -extern void writeDense8(int Value, void *Base, register unsigned long Offset); extern void writeDense16(int Value, void *Base, register unsigned long Offset); @@ -867,12 +861,6 @@ void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; -void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset) - = writeDenseNB8; -void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset) - = writeDenseNB16; -void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset) - = writeDenseNB32; int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; int (*xf86ReadMmio16) (void *Base, unsigned long Offset) diff --git a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h index 7f003e8ce..b56f45a3e 100644 --- a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h +++ b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h @@ -36,14 +36,12 @@ typedef void *(*MapMemProcPtr) (int, unsigned long, unsigned long, int); typedef void (*UnmapMemProcPtr) (int, void *, unsigned long); typedef void *(*SetWCProcPtr) (int, unsigned long, unsigned long, Bool, MessageType); -typedef void (*ProtectMemProcPtr) (int, void *, unsigned long, Bool); typedef void (*UndoWCProcPtr) (int, void *); typedef struct { Bool initialised; MapMemProcPtr mapMem; UnmapMemProcPtr unmapMem; - ProtectMemProcPtr protectMem; SetWCProcPtr setWC; UndoWCProcPtr undoWC; Bool linearSupported; diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h index eb0a338c9..9120bd7dc 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h @@ -364,8 +364,4 @@ struct pcvtid { #define XF86_OS_PRIVS #include "xf86_OSproc.h" -#ifndef NO_COMPILER_H -#include "compiler.h" -#endif - #endif /* _XF86_OSLIB_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c index fa7a86663..2a0f75569 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c @@ -35,7 +35,6 @@ #include "micmap.h" #include "xf86.h" -#include "compiler.h" #include "colormapst.h" #include "xf86RamDacPriv.h" diff --git a/xorg-server/hw/xfree86/vgahw/Makefile.am b/xorg-server/hw/xfree86/vgahw/Makefile.am index 4b718b489..b8196a695 100644 --- a/xorg-server/hw/xfree86/vgahw/Makefile.am +++ b/xorg-server/hw/xfree86/vgahw/Makefile.am @@ -6,5 +6,3 @@ AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = vgaHW.h - -EXTRA_DIST = vgaCmap.c diff --git a/xorg-server/hw/xfree86/vgahw/vgaCmap.c b/xorg-server/hw/xfree86/vgahw/vgaCmap.c deleted file mode 100644 index 6e028a7f5..000000000 --- a/xorg-server/hw/xfree86/vgahw/vgaCmap.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Thomas Roell not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Thomas Roell makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/X.h> -#include <X11/Xproto.h> -#include "windowstr.h" -#include "compiler.h" -#include "mipointer.h" -#include "micmap.h" - -#include "xf86.h" -#include "vgaHW.h" - -#include <X11/extensions/xf86dgaproto.h> -#include "dgaproc.h" - -#define NOMAPYET (ColormapPtr) 0 - -int -vgaListInstalledColormaps(pScreen, pmaps) -ScreenPtr pScreen; -Colormap *pmaps; -{ - /* By the time we are processing requests, we can guarantee that there - * is always a colormap installed */ - - *pmaps = GetInstalledmiColormap(pScreen)->mid; - return 1; -} - -int -vgaGetInstalledColormaps(pScreen, pmaps) -ScreenPtr pScreen; -ColormapPtr *pmaps; -{ - /* By the time we are processing requests, we can guarantee that there - * is always a colormap installed */ - - *pmaps = GetInstalledmiColormap(pScreen); - return 1; -} - -int -vgaCheckColorMap(ColormapPtr pmap) -{ - return (pmap != GetInstalledmiColormap(pmap->pScreen)); -} - -void -vgaStoreColors(pmap, ndef, pdefs) -ColormapPtr pmap; -int ndef; -xColorItem *pdefs; -{ - int i; - unsigned char *cmap, *tmp = NULL; - xColorItem directDefs[256]; - Bool new_overscan = FALSE; - Bool writeColormap; - int scrnIndex = pmap->pScreen->myNum; - ScrnInfoPtr scrninfp = xf86ScreenToScrn(pmap->pScreen); - vgaHWPtr hwp = VGAHWPTR(scrninfp); - - unsigned char overscan = hwp->ModeReg.Attribute[OVERSCAN]; - unsigned char tmp_overscan = 0; - - if (vgaCheckColorMap(pmap)) - return; - - if ((pmap->pVisual->class | DynamicClass) == DirectColor) { - ndef = miExpandDirectColors(pmap, ndef, pdefs, directDefs); - pdefs = directDefs; - } - - writeColormap = scrninfp->vtSema; - if (DGAScreenAvailable(pmap->pScreen)) { - writeColormap = writeColormap || - (DGAGetDirectMode(scrnIndex) && - !(DGAGetFlags(scrnIndex) & XF86DGADirectColormap)) || - (DGAGetFlags(scrnIndex) & XF86DGAHasColormap); - } - - if (writeColormap) - hwp->enablePalette(hwp); - - for (i = 0; i < ndef; i++) { - if (pdefs[i].pixel == overscan) { - new_overscan = TRUE; - } - cmap = &(hwp->ModeReg.DAC[pdefs[i].pixel * 3]); - if (scrninfp->rgbBits == 8) { - cmap[0] = pdefs[i].red >> 8; - cmap[1] = pdefs[i].green >> 8; - cmap[2] = pdefs[i].blue >> 8; - } - else { - cmap[0] = pdefs[i].red >> 10; - cmap[1] = pdefs[i].green >> 10; - cmap[2] = pdefs[i].blue >> 10; - } -#if 0 - if (clgd6225Lcd) { - /* The LCD doesn't like white */ - if (cmap[0] == 63) - cmap[0] = 62; - if (cmap[1] == 63) - cmap[1] = 62; - if (cmap[2] == 63) - cmap[2] = 62; - } -#endif - - if (writeColormap) { - if (hwp->ShowOverscan && i == 255) - continue; - hwp->writeDacWriteAddr(hwp, pdefs[i].pixel); - DACDelay(hwp); - hwp->writeDacData(hwp, cmap[0]); - DACDelay(hwp); - hwp->writeDacData(hwp, cmap[1]); - DACDelay(hwp); - hwp->writeDacData(hwp, cmap[2]); - DACDelay(hwp); - } - } - if (new_overscan && !hwp->ShowOverscan) { - new_overscan = FALSE; - for (i = 0; i < ndef; i++) { - if (pdefs[i].pixel == overscan) { - if ((pdefs[i].red != 0) || - (pdefs[i].green != 0) || (pdefs[i].blue != 0)) { - new_overscan = TRUE; - tmp_overscan = overscan; - tmp = &(hwp->ModeReg.DAC[pdefs[i].pixel * 3]); - } - break; - } - } - if (new_overscan) { - /* - * Find a black pixel, or the nearest match. - */ - for (i = 255; i >= 0; i--) { - cmap = &(hwp->ModeReg.DAC[i * 3]); - if ((cmap[0] == 0) && (cmap[1] == 0) && (cmap[2] == 0)) { - overscan = i; - break; - } - else { - if ((cmap[0] < tmp[0]) && - (cmap[1] < tmp[1]) && (cmap[2] < tmp[2])) { - tmp = cmap; - tmp_overscan = i; - } - } - } - if (i < 0) { - overscan = tmp_overscan; - } - hwp->ModeReg.Attribute[OVERSCAN] = overscan; - if (writeColormap) { - hwp->writeAttr(hwp, OVERSCAN, overscan); - } - } - } - - if (writeColormap) - hwp->disablePalette(hwp); -} - -void -vgaInstallColormap(pmap) -ColormapPtr pmap; -{ - ColormapPtr oldmap = GetInstalledmiColormap(pmap->pScreen); - int entries; - Pixel *ppix; - xrgb *prgb; - xColorItem *defs; - int i; - - if (pmap == oldmap) - return; - - if ((pmap->pVisual->class | DynamicClass) == DirectColor) - entries = (pmap->pVisual->redMask | - pmap->pVisual->greenMask | pmap->pVisual->blueMask) + 1; - else - entries = pmap->pVisual->ColormapEntries; - - ppix = (Pixel *) malloc(entries * sizeof(Pixel)); - prgb = (xrgb *) malloc(entries * sizeof(xrgb)); - defs = (xColorItem *) malloc(entries * sizeof(xColorItem)); - - if (oldmap != NOMAPYET) - WalkTree(pmap->pScreen, TellLostMap, &oldmap->mid); - - SetInstalledmiColormap(pmap->pScreen, pmap); - - for (i = 0; i < entries; i++) - ppix[i] = i; - - QueryColors(pmap, entries, ppix, prgb, serverClient); - - for (i = 0; i < entries; i++) { /* convert xrgbs to xColorItems */ - defs[i].pixel = ppix[i]; - defs[i].red = prgb[i].red; - defs[i].green = prgb[i].green; - defs[i].blue = prgb[i].blue; - defs[i].flags = DoRed | DoGreen | DoBlue; - } - pmap->pScreen->StoreColors(pmap, entries, defs); - - WalkTree(pmap->pScreen, TellGainedMap, &pmap->mid); - - free(ppix); - free(prgb); - free(defs); -} - -void -vgaUninstallColormap(pmap) -ColormapPtr pmap; -{ - - ColormapPtr defColormap; - - if (pmap != GetInstalledmiColormap(pmap->pScreen)) - return; - - dixLookupResourceByType((void **) &defColormap, - pmap->pScreen->defColormap, RT_COLORMAP, - serverClient, DixInstallAccess); - - if (defColormap == GetInstalledmiColormap(pmap->pScreen)) - return; - - (*pmap->pScreen->InstallColormap) (defColormap); -} - -void -vgaHandleColormaps(ScreenPtr pScreen, ScrnInfoPtr scrnp) -{ - if (scrnp->bitsPerPixel > 1) { - if (scrnp->bitsPerPixel <= 8) { /* For 8bpp SVGA and VGA16 */ - pScreen->InstallColormap = vgaInstallColormap; - pScreen->UninstallColormap = vgaUninstallColormap; - pScreen->ListInstalledColormaps = vgaListInstalledColormaps; - pScreen->StoreColors = vgaStoreColors; - } - } -} diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c index 014709b04..0f1904738 100644 --- a/xorg-server/hw/xquartz/xpr/dri.c +++ b/xorg-server/hw/xquartz/xpr/dri.c @@ -138,12 +138,6 @@ DRIFinishScreenInit(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); /* Wrap DRI support */ - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = DRIValidateTree; - - pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = DRIPostValidateTree; - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; pScreen->WindowExposures = DRIWindowExposures; @@ -624,51 +618,6 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) pScreen->CopyWindow = DRICopyWindow; } -int -DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen = pParent->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - int returnValue; - - /* unwrap */ - pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; - - /* call lower layers */ - returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); - - /* rewrap */ - pScreen->ValidateTree = DRIValidateTree; - - return returnValue; -} - -void -DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - - if (pParent) { - pScreen = pParent->drawable.pScreen; - } - else { - pScreen = pChild->drawable.pScreen; - } - pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv->wrap.PostValidateTree) { - /* unwrap */ - pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; - - /* call lower layers */ - (*pScreen->PostValidateTree)(pParent, pChild, kind); - - /* rewrap */ - pScreen->PostValidateTree = DRIPostValidateTree; - } -} - void DRIClipNotify(WindowPtr pWin, int dx, int dy) { diff --git a/xorg-server/hw/xquartz/xpr/dri.h b/xorg-server/hw/xquartz/xpr/dri.h index 70cb8b6d6..4476b06af 100644 --- a/xorg-server/hw/xquartz/xpr/dri.h +++ b/xorg-server/hw/xquartz/xpr/dri.h @@ -53,8 +53,6 @@ typedef void (*ClipNotifyPtr)(WindowPtr, int, int); typedef struct { WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; - ValidateTreeProcPtr ValidateTree; - PostValidateTreeProcPtr PostValidateTree; ClipNotifyProcPtr ClipNotify; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; @@ -107,12 +105,6 @@ DRIGetWrappedFuncs(ScreenPtr pScreen); extern void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -extern int -DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); - -extern void -DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); - extern void DRIClipNotify(WindowPtr pWin, int dx, int dy); diff --git a/xorg-server/hw/xwayland/xwayland.h b/xorg-server/hw/xwayland/xwayland.h index fc6855044..60b0c2964 100644 --- a/xorg-server/hw/xwayland/xwayland.h +++ b/xorg-server/hw/xwayland/xwayland.h @@ -27,7 +27,6 @@ #define XWAYLAND_H #include <dix-config.h> -#include <xorg-server.h> #include <stdio.h> #include <unistd.h> diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index 43718ce2b..2e2dca0c3 100755 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -67,15 +67,11 @@ SOFTWARE. typedef struct _FontPathRec *FontPathPtr; typedef struct _NewClientRec *NewClientPtr; -#ifndef xalloc +#ifndef xnfalloc #define xnfalloc(size) XNFalloc((unsigned long)(size)) #define xnfcalloc(_num, _size) XNFcalloc((unsigned long)(_num)*(unsigned long)(_size)) #define xnfrealloc(ptr, size) XNFrealloc((void *)(ptr), (unsigned long)(size)) -#define xalloc(size) Xalloc((unsigned long)(size)) -#define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size)) -#define xrealloc(ptr, size) Xrealloc((void *)(ptr), (unsigned long)(size)) -#define xfree(ptr) Xfree((void *)(ptr)) #define xstrdup(s) Xstrdup(s) #define xnfstrdup(s) XNFstrdup(s) #endif @@ -216,37 +212,6 @@ extern _X_EXPORT int set_font_authorizations(char **authorizations, int *authlen, void *client); -#ifndef _HAVE_XALLOC_DECLS -#define _HAVE_XALLOC_DECLS - -/* - * Use malloc(3) instead. - */ -extern _X_EXPORT void * -Xalloc(unsigned long /*amount */ ) _X_DEPRECATED; - -/* - * Use calloc(3) instead - */ -extern _X_EXPORT void * -Xcalloc(unsigned long /*amount */ ) _X_DEPRECATED; - -/* - * Use realloc(3) instead - */ -extern _X_EXPORT void * -Xrealloc(void * /*ptr */ , unsigned long /*amount */ ) - _X_DEPRECATED; - -/* - * Use free(3) instead - */ -extern _X_EXPORT void -Xfree(void * /*ptr */ ) - _X_DEPRECATED; - -#endif - /* * This function malloc(3)s buffer, terminating the server if there is not * enough memory. @@ -417,9 +382,6 @@ typedef struct sockaddr *sockaddrPtr; extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client); -extern _X_EXPORT int -LocalClientCred(ClientPtr, int *, int *); - #define LCC_UID_SET (1 << 0) #define LCC_GID_SET (1 << 1) #define LCC_PID_SET (1 << 2) diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h index e75228ebb..3e6bcf45f 100755 --- a/xorg-server/include/servermd.h +++ b/xorg-server/include/servermd.h @@ -47,7 +47,10 @@ SOFTWARE. #ifndef SERVERMD_H #define SERVERMD_H 1 -#include "dix-config.h" +#if !defined(_DIX_CONFIG_H_) && !defined(_XORG_SERVER_H_) +#error Drivers must include xorg-server.h before any other xserver headers +#error xserver code must include dix-config.h before any other headers +#endif #if X_BYTE_ORDER == X_LITTLE_ENDIAN #define IMAGE_BYTE_ORDER LSBFirst diff --git a/xorg-server/include/xorg-server.h.in b/xorg-server/include/xorg-server.h.in index 8bf9d38f2..4cb94875c 100644 --- a/xorg-server/include/xorg-server.h.in +++ b/xorg-server/include/xorg-server.h.in @@ -16,6 +16,10 @@ #ifndef _XORG_SERVER_H_ #define _XORG_SERVER_H_ +#ifdef HAVE_XORG_CONFIG_H +#error Include xorg-config.h when building the X server +#endif + /* Support BigRequests extension */ #undef BIGREQS @@ -227,4 +231,7 @@ /* Ask fontsproto to make font path element names const */ #define FONT_PATH_ELEMENT_NAME_CONST 1 +/* byte order */ +#undef X_BYTE_ORDER + #endif /* _XORG_SERVER_H_ */ diff --git a/xorg-server/mi/mi.h b/xorg-server/mi/mi.h index feba5cb0c..d5a5ba374 100755 --- a/xorg-server/mi/mi.h +++ b/xorg-server/mi/mi.h @@ -515,9 +515,6 @@ extern _X_EXPORT void miMarkUnrealizedWindow(WindowPtr /*pChild */ , Bool /*fromConfigure */ ); -extern _X_EXPORT void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, - int depth); - extern _X_EXPORT WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); extern _X_EXPORT WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); diff --git a/xorg-server/mi/micoord.h b/xorg-server/mi/micoord.h index c6fa41d53..71587c033 100644 --- a/xorg-server/mi/micoord.h +++ b/xorg-server/mi/micoord.h @@ -32,27 +32,7 @@ /* Macros which handle a coordinate in a single register */ -/* - * Most compilers will convert divisions by 65536 into shifts, if signed - * shifts exist. If your machine does arithmetic shifts and your compiler - * can't get it right, add to this line. - */ - -/* - * mips compiler - what a joke - it CSEs the 65536 constant into a reg - * forcing as to use div instead of shift. Let's be explicit. - */ - -#if defined(mips) || \ - defined(sparc) || defined(__sparc64__) || \ - defined(__alpha) || defined(__alpha__) || \ - defined(__i386__) || defined(__i386) || defined(__ia64__) || \ - defined(__s390x__) || defined(__s390__) || \ - defined(__amd64__) || defined(amd64) || defined(__amd64) #define GetHighWord(x) (((int) (x)) >> 16) -#else -#define GetHighWord(x) (((int) (x)) / 65536) -#endif #if IMAGE_BYTE_ORDER == MSBFirst #define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) ((i)&0xffff)))) diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c index 3ee83d7c0..31b196fe7 100644 --- a/xorg-server/mi/miwindow.c +++ b/xorg-server/mi/miwindow.c @@ -746,20 +746,6 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) } } -void -miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth) -{ - WindowPtr pChild; - - for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { - if (pChild->drawable.depth == depth) - RegionUnion(pReg, pReg, &pChild->borderClip); - - if (pChild->firstChild) - miSegregateChildren(pChild, pReg, depth); - } -} - WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y) { diff --git a/xorg-server/miext/shadow/shadow.c b/xorg-server/miext/shadow/shadow.c index 522e21bd0..0dd3604a7 100644 --- a/xorg-server/miext/shadow/shadow.c +++ b/xorg-server/miext/shadow/shadow.c @@ -93,8 +93,6 @@ shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, wrap(pBuf, pScreen, GetImage); } -#define BACKWARDS_COMPATIBILITY - static Bool shadowCloseScreen(ScreenPtr pScreen) { @@ -104,35 +102,12 @@ shadowCloseScreen(ScreenPtr pScreen) unwrap(pBuf, pScreen, CloseScreen); shadowRemove(pScreen, pBuf->pPixmap); DamageDestroy(pBuf->pDamage); -#ifdef BACKWARDS_COMPATIBILITY - RegionUninit(&pBuf->damage); /* bc */ -#endif if (pBuf->pPixmap) pScreen->DestroyPixmap(pBuf->pPixmap); free(pBuf); return pScreen->CloseScreen(pScreen); } -#ifdef BACKWARDS_COMPATIBILITY -static void -shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure) -{ - ScreenPtr pScreen = closure; - shadowBufPtr pBuf = (shadowBufPtr) - dixLookupPrivate(&pScreen->devPrivates, shadowScrPrivateKey); - - /* Register the damaged region, use DamageReportNone below when we - * want to break BC below... */ - RegionUnion(&pDamage->damage, &pDamage->damage, pRegion); - - /* - * BC hack. In 7.0 and earlier several drivers would inspect the - * 'damage' member directly, so we have to keep it existing. - */ - RegionCopy(&pBuf->damage, pRegion); -} -#endif - Bool shadowSetup(ScreenPtr pScreen) { @@ -147,15 +122,9 @@ shadowSetup(ScreenPtr pScreen) pBuf = malloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; -#ifdef BACKWARDS_COMPATIBILITY - pBuf->pDamage = DamageCreate((DamageReportFunc) shadowReportFunc, - (DamageDestroyFunc) NULL, - DamageReportRawRegion, TRUE, pScreen, pScreen); -#else pBuf->pDamage = DamageCreate((DamageReportFunc) NULL, (DamageDestroyFunc) NULL, DamageReportNone, TRUE, pScreen, pScreen); -#endif if (!pBuf->pDamage) { free(pBuf); return FALSE; @@ -168,9 +137,6 @@ shadowSetup(ScreenPtr pScreen) pBuf->pPixmap = 0; pBuf->closure = 0; pBuf->randr = 0; -#ifdef BACKWARDS_COMPATIBILITY - RegionNull(&pBuf->damage); /* bc */ -#endif dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf); return TRUE; @@ -230,23 +196,3 @@ shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap) RemoveBlockAndWakeupHandlers(shadowBlockHandler, shadowWakeupHandler, (void *) pScreen); } - -Bool -shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window) -{ - PixmapPtr pPixmap; - - pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height, - pScreen->rootDepth, 0); - if (!pPixmap) - return FALSE; - - if (!shadowSetup(pScreen)) { - pScreen->DestroyPixmap(pPixmap); - return FALSE; - } - - shadowAdd(pScreen, pPixmap, update, window, SHADOW_ROTATE_0, 0); - - return TRUE; -} diff --git a/xorg-server/miext/shadow/shadow.h b/xorg-server/miext/shadow/shadow.h index 421ae96a6..86fa94479 100644 --- a/xorg-server/miext/shadow/shadow.h +++ b/xorg-server/miext/shadow/shadow.h @@ -43,12 +43,10 @@ typedef void *(*ShadowWindowProc) (ScreenPtr pScreen, CARD32 offset, int mode, CARD32 *size, void *closure); -/* BC hack: do not move the damage member. see shadow.c for explanation. */ typedef struct _shadowBuf { DamagePtr pDamage; ShadowUpdateProc update; ShadowWindowProc window; - RegionRec damage; PixmapPtr pPixmap; void *closure; int randr; @@ -89,10 +87,6 @@ shadowAdd(ScreenPtr pScreen, extern _X_EXPORT void shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap); -extern _X_EXPORT Bool - -shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window); - extern _X_EXPORT void *shadowAlloc(int width, int height, int bpp); extern _X_EXPORT void diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c index 31b07720d..0dda35bb5 100644 --- a/xorg-server/os/access.c +++ b/xorg-server/os/access.c @@ -1183,33 +1183,6 @@ ComputeLocalClient(ClientPtr client) } /* - * Return the uid and gid of a connected local client - * - * Used by XShm to test access rights to shared memory segments - */ -int -LocalClientCred(ClientPtr client, int *pUid, int *pGid) -{ - LocalClientCredRec *lcc; - int ret = GetLocalClientCreds(client, &lcc); - - if (ret == 0) { -#ifdef HAVE_GETZONEID /* only local if in the same zone */ - if ((lcc->fieldsSet & LCC_ZID_SET) && (lcc->zoneid != getzoneid())) { - FreeLocalClientCreds(lcc); - return -1; - } -#endif - if ((lcc->fieldsSet & LCC_UID_SET) && (pUid != NULL)) - *pUid = lcc->euid; - if ((lcc->fieldsSet & LCC_GID_SET) && (pGid != NULL)) - *pGid = lcc->egid; - FreeLocalClientCreds(lcc); - } - return ret; -} - -/* * Return the uid and all gids of a connected local client * Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds * diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index 153096aa0..0e231537a 100755 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -1110,24 +1110,6 @@ set_font_authorizations(char **authorizations, int *authlen, void *client) } void * -Xalloc(unsigned long amount) -{ - /* - * Xalloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xalloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return malloc(amount); -} - -void * XNFalloc(unsigned long amount) { void *ptr = malloc(amount); @@ -1138,12 +1120,6 @@ XNFalloc(unsigned long amount) } void * -Xcalloc(unsigned long amount) -{ - return calloc(1, amount); -} - -void * XNFcalloc(unsigned long amount) { void *ret = calloc(1, amount); @@ -1154,24 +1130,6 @@ XNFcalloc(unsigned long amount) } void * -Xrealloc(void *ptr, unsigned long amount) -{ - /* - * Xrealloc used to return NULL when large amount of memory is requested. In - * order to catch the buggy callers this warning has been added, slated to - * removal by anyone who touches this code (or just looks at it) in 2011. - * - * -- Mikhail Gusarov - */ - if ((long) amount <= 0) - ErrorF("Warning: Xrealloc: " - "requesting unpleasantly large amount of memory: %lu bytes.\n", - amount); - - return realloc(ptr, amount); -} - -void * XNFrealloc(void *ptr, unsigned long amount) { void *ret = realloc(ptr, amount); @@ -1181,12 +1139,6 @@ XNFrealloc(void *ptr, unsigned long amount) return ret; } -void -Xfree(void *ptr) -{ - free(ptr); -} - char * Xstrdup(const char *s) { diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c index 6528bd231..c0b83f705 100644 --- a/xorg-server/present/present.c +++ b/xorg-server/present/present.c @@ -291,14 +291,18 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc if (crtc != window_priv->crtc) { uint64_t old_ust, old_msc; - /* The old CRTC may have been turned off, in which case - * we'll just use whatever previous MSC we'd seen from this CRTC - */ + if (window_priv->crtc == PresentCrtcNeverSet) { + window_priv->msc_offset = 0; + } else { + /* The old CRTC may have been turned off, in which case + * we'll just use whatever previous MSC we'd seen from this CRTC + */ - if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success) - old_msc = window_priv->msc; + if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success) + old_msc = window_priv->msc; - window_priv->msc_offset += new_msc - old_msc; + window_priv->msc_offset += new_msc - old_msc; + } window_priv->crtc = crtc; } @@ -395,7 +399,8 @@ present_set_abort_flip(ScreenPtr screen) present_set_tree_pixmap(screen_priv->flip_window, (*screen->GetScreenPixmap)(screen)); - present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen)); + if (screen->root) + present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen)); screen_priv->flip_pending->abort_flip = TRUE; } @@ -725,7 +730,7 @@ present_pixmap(WindowPtr window, if (!pixmap) target_crtc = window_priv->crtc; - if (!target_crtc) + if (!target_crtc || target_crtc == PresentCrtcNeverSet) target_crtc = present_get_crtc(window); } diff --git a/xorg-server/present/present_priv.h b/xorg-server/present/present_priv.h index d8569a2b6..f5c1652d1 100644 --- a/xorg-server/present/present_priv.h +++ b/xorg-server/present/present_priv.h @@ -134,6 +134,8 @@ typedef struct present_window_priv { struct xorg_list notifies; } present_window_priv_rec, *present_window_priv_ptr; +#define PresentCrtcNeverSet ((RRCrtcPtr) 1) + extern DevPrivateKeyRec present_window_private_key; static inline present_window_priv_ptr diff --git a/xorg-server/present/present_screen.c b/xorg-server/present/present_screen.c index 1e4f55d37..7bfebf1d2 100644 --- a/xorg-server/present/present_screen.c +++ b/xorg-server/present/present_screen.c @@ -45,6 +45,7 @@ present_get_window_priv(WindowPtr window, Bool create) return NULL; xorg_list_init(&window_priv->vblank); xorg_list_init(&window_priv->notifies); + window_priv->crtc = PresentCrtcNeverSet; dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv); return window_priv; } diff --git a/xorg-server/randr/rrpointer.c b/xorg-server/randr/rrpointer.c index eb6b6770c..b301d050d 100644 --- a/xorg-server/randr/rrpointer.c +++ b/xorg-server/randr/rrpointer.c @@ -77,21 +77,22 @@ RRPointerToNearestCrtc(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, if (x < crtc->x) dx = crtc->x - x; - else if (x > crtc->x + scan_width) - dx = x - (crtc->x + scan_width); + else if (x > crtc->x + scan_width - 1) + dx = crtc->x + (scan_width - 1) - x; else dx = 0; if (y < crtc->y) dy = crtc->y - y; - else if (y > crtc->y + scan_height) - dy = y - (crtc->y + scan_height); + else if (y > crtc->y + scan_height - 1) + dy = crtc->y + (scan_height - 1) - y; else dy = 0; - dist = dx + dy; + dist = dx * dx + dy * dy; if (!nearest || dist < best) { nearest = crtc; best_dx = dx; best_dy = dy; + best = dist; } } if (best_dx || best_dy) diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c index 7da93102b..58535d475 100644 --- a/xorg-server/render/picture.c +++ b/xorg-server/render/picture.c @@ -1332,87 +1332,6 @@ SetPictureTransform(PicturePtr pPicture, PictTransform * transform) return Success; } -void -CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst) -{ - PictureScreenPtr ps = GetPictureScreen(pSrc->pDrawable->pScreen); - Mask origMask = mask; - - pDst->serialNumber |= GC_CHANGE_SERIAL_BIT; - pDst->stateChanges |= mask; - - while (mask) { - Mask bit = lowbit(mask); - - switch (bit) { - case CPRepeat: - pDst->repeat = pSrc->repeat; - pDst->repeatType = pSrc->repeatType; - break; - case CPAlphaMap: - if (pSrc->alphaMap && - pSrc->alphaMap->pDrawable->type == DRAWABLE_PIXMAP) - pSrc->alphaMap->refcnt++; - if (pDst->alphaMap) - FreePicture((void *) pDst->alphaMap, (XID) 0); - pDst->alphaMap = pSrc->alphaMap; - break; - case CPAlphaXOrigin: - pDst->alphaOrigin.x = pSrc->alphaOrigin.x; - break; - case CPAlphaYOrigin: - pDst->alphaOrigin.y = pSrc->alphaOrigin.y; - break; - case CPClipXOrigin: - pDst->clipOrigin.x = pSrc->clipOrigin.x; - break; - case CPClipYOrigin: - pDst->clipOrigin.y = pSrc->clipOrigin.y; - break; - case CPClipMask: - switch (pSrc->clientClipType) { - case CT_NONE: - (*ps->ChangePictureClip) (pDst, CT_NONE, NULL, 0); - break; - case CT_REGION: - if (!pSrc->clientClip) { - (*ps->ChangePictureClip) (pDst, CT_NONE, NULL, 0); - } - else { - RegionPtr clientClip; - RegionPtr srcClientClip = (RegionPtr) pSrc->clientClip; - - clientClip = RegionCreate(RegionExtents(srcClientClip), - RegionNumRects(srcClientClip)); - (*ps->ChangePictureClip) (pDst, CT_REGION, clientClip, 0); - } - break; - default: - /* XXX: CT_PIXMAP unimplemented */ - break; - } - break; - case CPGraphicsExposure: - pDst->graphicsExposures = pSrc->graphicsExposures; - break; - case CPPolyEdge: - pDst->polyEdge = pSrc->polyEdge; - break; - case CPPolyMode: - pDst->polyMode = pSrc->polyMode; - break; - case CPDither: - break; - case CPComponentAlpha: - pDst->componentAlpha = pSrc->componentAlpha; - break; - } - mask &= ~bit; - } - - (*ps->ChangePicture) (pDst, origMask); -} - static void ValidateOnePicture(PicturePtr pPicture) { diff --git a/xorg-server/render/picturestr.h b/xorg-server/render/picturestr.h index 8c8100d81..1278f620a 100644 --- a/xorg-server/render/picturestr.h +++ b/xorg-server/render/picturestr.h @@ -476,9 +476,6 @@ extern _X_EXPORT int SetPictureTransform(PicturePtr pPicture, PictTransform * transform); extern _X_EXPORT void - CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst); - -extern _X_EXPORT void ValidatePicture(PicturePtr pPicture); extern _X_EXPORT int diff --git a/xorg-server/xkb/xkbEvents.c b/xorg-server/xkb/xkbEvents.c index e2ba38886..ccf64215d 100644 --- a/xorg-server/xkb/xkbEvents.c +++ b/xorg-server/xkb/xkbEvents.c @@ -235,7 +235,6 @@ XkbSendStateNotify(DeviceIntPtr kbd, xkbStateNotify * pSN) while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->stateNotifyMask & changed)) { pSN->sequenceNumber = interest->client->sequence; @@ -398,7 +397,6 @@ XkbSendControlsNotify(DeviceIntPtr kbd, xkbControlsNotify * pCN) pCN->numGroups = xkbi->desc->ctrls->num_groups; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->ctrlsNotifyMask & changedControls)) { if (!initialized) { @@ -445,7 +443,6 @@ XkbSendIndicatorNotify(DeviceIntPtr kbd, int xkbType, xkbIndicatorNotify * pEv) changed = pEv->changed; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (((xkbType == XkbIndicatorStateNotify) && (interest->iStateNotifyMask & changed)) || @@ -526,7 +523,6 @@ XkbHandleBell(BOOL force, initialized = 0; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->bellNotifyMask)) { if (!initialized) { @@ -579,7 +575,6 @@ XkbSendAccessXNotify(DeviceIntPtr kbd, xkbAccessXNotify * pEv) db_delay = pEv->debounceDelay; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->accessXNotifyMask & (1 << pEv->detail))) { if (!initialized) { @@ -625,7 +620,6 @@ XkbSendNamesNotify(DeviceIntPtr kbd, xkbNamesNotify * pEv) changedVirtualMods = pEv->changedVirtualMods; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->namesNotifyMask & pEv->changed)) { if (!initialized) { @@ -669,7 +663,6 @@ XkbSendCompatMapNotify(DeviceIntPtr kbd, xkbCompatMapNotify * pEv) initialized = 0; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->compatNotifyMask)) { if (!initialized) { @@ -720,7 +713,6 @@ XkbSendActionMessage(DeviceIntPtr kbd, xkbActionMessage * pEv) pEv->group = xkbi->state.group; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->actionMessageMask)) { if (!initialized) { @@ -764,7 +756,6 @@ XkbSendExtensionDeviceNotify(DeviceIntPtr dev, state = pEv->ledState; while (interest) { if ((!interest->client->clientGone) && - (interest->client->requestVector != InitialVector) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->extDevNotifyMask & reason)) { if (!initialized) { diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in index 9107c03f2..2bda88ba7 100644 --- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in +++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in @@ -815,6 +815,21 @@ </languageList> </configItem> </layout> + <layout> + <configItem> + <name>cm</name> + <_shortDescription>cm</_shortDescription> + <_description>English (Cameroon)</_description> + </configItem> + <variantList> + <variant> + <configItem> + <name>mmuock</name> + <_description>Mmuock</_description> + </configItem> + </variant> + </variantList> + </layout> </layoutList> <optionList/> </xkbConfigRegistry> diff --git a/xorg-server/xkeyboard-config/symbols/cm b/xorg-server/xkeyboard-config/symbols/cm index 6b7a51854..685ef2afa 100644 --- a/xorg-server/xkeyboard-config/symbols/cm +++ b/xorg-server/xkeyboard-config/symbols/cm @@ -324,3 +324,128 @@ xkb_symbols "semicolon_switch_dvorak" { modifier_map Mod5 { ISO_Level3_Latch }; }; +// EXTRAS: + +// ------- begin Mmuock keyboard map ------------------------------------------ +// This layout is used for the Mmuock alphabet as described in the book +// _The Sound of Mmuock: Orthography_ [isbn: 978-9956-645-17-6]. Mmuock +// is the language of the Mmuock (local: Muòk) people of Western Cameroon. +// +// Author: Tano Fotang <fotang at mmuock dot org> +// Created: 2014-06-24 +// Version: 1.0 +// +// CHANGES: +// 2014-07-06 corrected shifted level3 of <AC11> to quotedbl +// +// NOTES: +// 0. This map is based on the Latin layout for the US keyboard. +// +// 1. We use combining diacritical marks to create tone markings. There are 13 +// tones that need to be indicated. +// +// 2. When composing Mmuock text, about every fourth symbol is for tone. To +// facilitate easy and fast input, the combining diacritics are placed on +// the home row (AC). To reduce the number of key strokes required, the +// unshifted third level is used. Only 5 of the combining diacritics are not +// on the AC row; they are in the top number row, AE. +// +// 3. Symbols that are used infrequently (`r', `h', `ɛ', `ǝ', etc.) are placed +// in level3. Additionally, the letter eng (`ŋ'), although commonly used, +// is found in level3 because it can alternatively be represented by <ng>. +// (Indeed, the keyman keyboard actually replaces <ng> with `ŋ'.) +// +// 4. The unshifted AB10 key (normally assigned to the slash `/') is used as +// level 3 switch since the slash is not used in the ordinary course of +// typing Mmuock text. +// +// 5. The 'Cameroon Multilingual' keyboard that is defined elsewhere, does not +// fit our needs because: (a) it is based on a different alphabet, (b) the +// vast majority of its symbols are not used in Mmuock, and (b) for the few +// symbols that are shared, the placing of the symbols is not egonomic for +// typing Mmuock as the _PRIMARY_ language. The aim of this keyboard, is to +// give priority to symbols that are actually used in the Mmuock alphabet. +// +// 6. The following fonts have been found to produce the best results with this +// keyboard: +// Family Accuracy +// DejaVu (except Sans Mono) 9/10 +// Linux Libertine 8/10 +// Ubuntu (except light) 8/10 +// Droid (except sans mono) 7/10 +// Gentium, Gentium Alt 6.5/10 +// In the terminal emulator, the following font variants are most suitable: +// Ubuntu Mono 9/10 +// Unifont (Medium) 9/10 +// DejaVu Sans Mono 7.5/10 +// Droid Sans Mono 6.5/10 +// These fonts are all freely available. +// +// ------the layout----------- +// +// ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓ +// │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & | * │ ( │ ) │ _ │ + ┃ ⌫ Back- ┃ +// AE│ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 ̂│ 7 ̑│ 8 ̍│ 9 ̓│ 0 ̊│ - │ = ┃ space ┃ +// ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫ +// ┃ ┃ Q │ W │ E Ǝ │ Š R │ T │ Y │ U Ω │ I Ɛ │ O Φ │ P ∏ │ Ø { │ Σ } ┃ Enter ┃ +// AD┃Tab ↹ ┃ q │ w │ e ǝ │ š r │ t │ y │ u ω │ i ɛ │ o φ │ p π │ ø [ │ σ ] ┃ ⏎ ┃ +// ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓ ┃ +// ┃ ┃ A │ S │ D │ F │ G │ ̇ H │ J │ K │ L │ Œ : │ " ” │ Æ | ┃ ┃ +// AC┃Caps ⇬ ┃ a │ s ̃| d ̀| f ̌| g ̈| ̣ h │ j ̆│ k ̏│ l ̄│ Œ ; │ ' ’ │ æ \ ┃ ┃ +// ┣━━━━━━━━┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━┫ +// ┃ │ Z │ X │ C │ V │ B │ N ŋ │ M │ < « │ > » │ ? ┃ ┃ +// AB┃Shift ⇧ │ z │ x │ c │ v │ b │ n Ŋ │ m │ , ‹ │ . › │ / ┃Shift ⇧ ┃ +// ┣━━━━━━━┳━━━━━┷━┳━━━┷━━━┱─┴─────┴─────┴─────┴─────┴─────┴───┲━┷━━━━━╈━━━━━┻━┳━━━━━━━┳━━━┛ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ +// AA┃Ctrl ┃Meta ┃Alt ┃ Space ┃AltGr ⇮┃Menu ┃Ctrl ┃ +// ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛ +// + +partial alphanumeric_keys +xkb_symbols "mmuock" { + + include "latin" + include "level3(ralt_switch)" + + name[Group1]= "Mmuock"; + key <AE06> { [ 6, asciicircum, U0302, NoSymbol ] }; // tone 10 + key <AE07> { [ 7, ampersand, U0311, NoSymbol ] }; // tone 12 + key <AE08> { [ 8, asterisk, U030D, trademark ] }; // tone 13 + key <AE09> { [ 9, parenleft, U0313, plusminus ] }; // tone 14 + key <AE10> { [ 0, parenright, U030A, degree ] }; // tone 6 + key <AD03> { [ e, E, U01DD, U018E ] }; // U01DD = reversed E + key <AD04> { [ scaron, Scaron, r, R ] }; + key <AD07> { [ u, U, Greek_omega, Greek_OMEGA ] }; + key <AD08> { [ i, I, U025B, U0190 ] }; // U025B = open E + key <AD09> { [ o, O, Greek_phi, Greek_PHI ] }; + key <AD10> { [ p, P, Greek_pi, Greek_PI ] }; + key <AD11> { [ oslash, Ooblique, bracketleft, braceleft ] }; + key <AD12> { [Greek_sigma, Greek_SIGMA, bracketright, braceright ] }; + key <AC02> { [ s, S, U0303, NoSymbol ] }; // tone 1 + key <AC03> { [ d, D, U0300, NoSymbol ] }; // tone 4 + key <AC04> { [ f, F, U030C, NoSymbol ] }; // tone 5 + key <AC05> { [ g, G, U0308, NoSymbol ] }; // tone 7 + key <AC06> { [ U0323, U0307, h, H ] }; // COMBINING DOT BELOW, ABOVE + key <AC07> { [ j, J, U0306, NoSymbol ] }; // tone 9 + key <AC08> { [ k, K, U030F, NoSymbol ] }; // tone 11 + key <AC09> { [ l, L, U0304, NoSymbol ] }; // tone 0 + key <AC10> { [ oe, OE, semicolon, colon ] }; + key <AC11> { [ U0301, U030B, apostrophe, quotedbl ] }; // tone 3, 8 + key <AB06> { [ n, N, eng, ENG ] }; + key <AB08> { [ comma, less, guillemotleft, U2039 ] }; + key <AB09> { [ period, greater, guillemotright, U203A ] }; + key <BKSL> { [ ae, AE, backslash, bar ] }; + + include "cm(solidus_switch)" +}; + +// use slash as special key for switching to level3 +partial hidden modifier_keys +xkb_symbols "solidus_switch" { + key <AB10> { + symbols[Group1] = [ ISO_Level3_Latch, question, slash, NoSymbol ] + }; + modifier_map Mod5 { ISO_Level3_Latch }; +}; +// ------- end Mmuock keyboard map -------------------------------------------- + diff --git a/xorg-server/xkeyboard-config/symbols/md b/xorg-server/xkeyboard-config/symbols/md index cd3430beb..f890233b0 100644 --- a/xorg-server/xkeyboard-config/symbols/md +++ b/xorg-server/xkeyboard-config/symbols/md @@ -11,11 +11,11 @@ xkb_symbols "basic" { // │ ~ │ ! │ " │ # │ ; │ % │ : │ ? │ * │ ( ̣ │ ) │ -- │ + ┃ ⌫ Back ┃ // │ ` │ 1 │ 2 @ │ 3 │ 4 $ │ 5 € │ 6 ^ │ 7 & │ 8 │ 9 │ 0 │ - │ = ┃ space ┃ // ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫ -// ┃ ┃ Ţ Q │ Ê W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ö { │ Ü } ┃ Enter ┃ +// ┃ ┃ Ţ Q │ Ê W │ E │ R │ T │ Y │ U │ İ │ O │ P │ Ö { │ Ü } ┃ Enter ┃ // ┃Tab ↹ ┃ ţ q │ ê w │ e │ r │ t │ y │ u │ i │ o │ p │ ö [ │ ü ] ┃ ⏎ ┃ // ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓ ┃ // ┃ ┃ A │ S │ D │ F │ G │ H │ J │ K │ L │Ş │I │ / ┃ ┃ -// ┃Caps ⇬ ┃ a │ s │ d │ f │ g │ h │ j │ k │ l │ş │ı │ \ ┃ ┃ +// ┃Caps ⇬ ┃ a │ s │ d │ f │ g │ h │ j │ k │ l │ş │ı' │ \ ┃ ┃ // ┣━━━━━━━━┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━┫ // ┃ │ Z │ Ç X │ C │ V │ B │ N │ M │Ä │< │> ┃ ┃ // ┃Shift ⇧ │ z │ ç x │ c │ v │ b │ n │ m │ä │, │. ┃Shift ⇧ ┃ @@ -75,7 +75,7 @@ xkb_symbols "gag" { key <AB01> { [ z, Z ] }; key <AB02> { [ ccedilla, Ccedilla, x, X ] }; - key <AB03> { [ c, Ccedilla ] }; + key <AB03> { [ c, C ] }; key <AB04> { [ v, V ] }; key <AB05> { [ b, B ] }; key <AB06> { [ n, N ] }; |