diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:37:10 +0100 |
commit | b7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch) | |
tree | 1dbf32344313ad7e5884e6686251cad398a231fa /xorg-server/hw/xfree86/dri/dri.c | |
parent | 7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff) | |
parent | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff) | |
download | vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2 vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
mesa xkeyboard-config xserver git update 15 jan 2014
randrproto libfontenc mesa xserver git update 10 Jan 2014
randsrproto fontconfig libX11 git update 6 Jan 2014
Conflicts:
mesalib/src/glsl/builtin_functions.cpp
mesalib/src/glsl/ir_builder.h
xorg-server/Xext/xres.c
xorg-server/dix/dispatch.c
xorg-server/dix/dixfonts.c
xorg-server/hw/xwin/wingc.c
xorg-server/hw/xwin/winwindowswm.c
xorg-server/include/gc.h
xorg-server/os/access.c
Diffstat (limited to 'xorg-server/hw/xfree86/dri/dri.c')
-rw-r--r-- | xorg-server/hw/xfree86/dri/dri.c | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index 6292e87cc..38bfc1def 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -100,6 +100,11 @@ drmServerInfo DRIDRMServerInfo; * easily changed here. */ #define DRI_MSG_VERBOSITY 1 + +static void +DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...) + _X_ATTRIBUTE_PRINTF(3,4); + static void DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...) { @@ -400,7 +405,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] added %d byte SAREA at %p\n", - pDRIPriv->pDriverInfo->SAREASize, pDRIPriv->hSAREA); + (int) pDRIPriv->pDriverInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA); /* Backwards compat. */ if (drmMap(pDRIPriv->drmFD, @@ -414,7 +419,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA %p to %p\n", - pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize); } else { @@ -442,7 +447,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer handle = %p\n", - pDRIPriv->pDriverInfo->hFrameBuffer); + (void *) (uintptr_t) pDRIPriv->pDriverInfo->hFrameBuffer); } else { DRIDrvMsg(pScreen->myNum, X_INFO, @@ -513,7 +518,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIPriv->myContextPriv = pDRIContextPriv; DRIDrvMsg(pScreen->myNum, X_INFO, - "X context handle = %p\n", pDRIPriv->myContext); + "X context handle = %p\n", (void *) (uintptr_t) pDRIPriv->myContext); /* Now that we have created the X server's context, we can grab the * hardware lock for the X server. @@ -731,13 +736,13 @@ DRICloseScreen(ScreenPtr pScreen) if (closeMaster || pDRIPriv->hSAREA != pDRIEntPriv->hLSAREA) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA %p at %p\n", - pDRIInfo->SAREASize, pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (int) pDRIInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); if (drmUnmap(pDRIPriv->pSAREA, pDRIInfo->SAREASize)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] unable to unmap %d bytes" " of SAREA %p at %p\n", - pDRIInfo->SAREASize, - pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (int) pDRIInfo->SAREASize, + (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); } } else { @@ -761,6 +766,10 @@ DRICloseScreen(ScreenPtr pScreen) static int dri_drm_debug_print(const char *format, va_list ap) + _X_ATTRIBUTE_PRINTF(1,0); + +static int +dri_drm_debug_print(const char *format, va_list ap) { xf86VDrvMsgVerb(-1, X_NONE, DRM_MSG_VERBOSITY, format, ap); return 0; @@ -1043,7 +1052,7 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual, } /* track this in case the client dies before cleanup */ - AddResource(context, DRIContextPrivResType, (pointer) pDRIContextPriv); + AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv); return TRUE; } @@ -1058,7 +1067,7 @@ DRIDestroyContext(ScreenPtr pScreen, XID context) /* DRIContextPrivDelete is called by the resource manager. */ Bool -DRIContextPrivDelete(pointer pResource, XID id) +DRIContextPrivDelete(void *pResource, XID id) { DRIContextPrivPtr pDRIContextPriv = (DRIContextPrivPtr) pResource; DRIScreenPrivPtr pDRIPriv; @@ -1141,7 +1150,7 @@ DRITransitionTo2d(ScreenPtr pScreen) } static int -DRIDCNTreeTraversal(WindowPtr pWin, pointer data) +DRIDCNTreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); @@ -1180,7 +1189,7 @@ DRIDriverClipNotify(ScreenPtr pScreen) if (pDRIPriv->nrWindows > 0) { pDRIPriv->nrWalked = 0; TraverseTree(pScreen->root, DRIDCNTreeTraversal, - (pointer) pDRIWindows); + (void *) pDRIWindows); } pDRIInfo->ClipNotify(pScreen, pDRIWindows, pDRIPriv->nrWindows); @@ -1275,7 +1284,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, /* track this in case the client dies */ AddResource(FakeClientID(client->index), DRIDrawablePrivResType, - (pointer) (intptr_t) pDrawable->id); + (void *) (intptr_t) pDrawable->id); if (pDRIDrawablePriv->hwDrawable) { drmUpdateDrawableInfo(pDRIPriv->drmFD, @@ -1328,7 +1337,7 @@ DRIDrawablePrivDestroy(WindowPtr pWin) } static Bool -DRIDestroyDrawableCB(pointer value, XID id, pointer data) +DRIDestroyDrawableCB(void *value, XID id, void *data) { if (value == data) { /* This calls back DRIDrawablePrivDelete which frees private area */ @@ -1346,7 +1355,7 @@ DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable) if (pDrawable->type == DRAWABLE_WINDOW) { LookupClientResourceComplex(client, DRIDrawablePrivResType, DRIDestroyDrawableCB, - (pointer) (intptr_t) pDrawable->id); + (void *) (intptr_t) pDrawable->id); } else { /* pixmap (or for GLX 1.3, a PBuffer) */ /* NOT_DONE */ @@ -1357,7 +1366,7 @@ DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable) } Bool -DRIDrawablePrivDelete(pointer pResource, XID id) +DRIDrawablePrivDelete(void *pResource, XID id) { WindowPtr pWin; int rc; @@ -1616,7 +1625,7 @@ DRIDestroyInfoRec(DRIInfoPtr DRIInfo) } void -DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask) +DRIWakeupHandler(void *wakeupData, int result, void *pReadmask) { int i; @@ -1631,7 +1640,7 @@ DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask) } void -DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) +DRIBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask) { int i; @@ -1647,7 +1656,7 @@ DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) void DRIDoWakeupHandler(ScreenPtr pScreen, - unsigned long result, pointer pReadmask) + unsigned long result, void *pReadmask) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1665,7 +1674,7 @@ DRIDoWakeupHandler(ScreenPtr pScreen, void DRIDoBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask) + void *pTimeout, void *pReadmask) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1868,7 +1877,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) } static int -DRITreeTraversal(WindowPtr pWin, pointer data) +DRITreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); @@ -1928,7 +1937,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionNull(®); pDRIPriv->nrWalked = 0; - TraverseTree(pWin, DRITreeTraversal, (pointer) (®)); + TraverseTree(pWin, DRITreeTraversal, (void *) (®)); if (RegionNotEmpty(®)) { RegionTranslate(®, ptOldOrg.x - pWin->drawable.x, @@ -2214,9 +2223,9 @@ DRILock(ScreenPtr pScreen, int flags) else if (*pDRIPriv->pLockingContext != pDRIPriv->myContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Locking deadlock.\n" - "\tAlready locked with context %d,\n" - "\ttrying to lock with context %d.\n", - pDRIPriv->pLockingContext, pDRIPriv->myContext); + "\tAlready locked with context %p,\n" + "\ttrying to lock with context %p.\n", + pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)++; } @@ -2233,8 +2242,8 @@ DRIUnlock(ScreenPtr pScreen) if (pDRIPriv->myContext != *pDRIPriv->pLockingContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Unlocking inconsistency:\n" - "\tContext %d trying to unlock lock held by context %d\n", - pDRIPriv->pLockingContext, pDRIPriv->myContext); + "\tContext %p trying to unlock lock held by context %p\n", + pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)--; } |