aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri/dri.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:23:25 +0100
commit1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch)
treed08c81de02b94da202195d84c99e192bc24ae69e /xorg-server/hw/xfree86/dri/dri.c
parentaaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff)
downloadvcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2
vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'xorg-server/hw/xfree86/dri/dri.c')
-rw-r--r--xorg-server/hw/xfree86/dri/dri.c61
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(&reg);
pDRIPriv->nrWalked = 0;
- TraverseTree(pWin, DRITreeTraversal, (pointer) (&reg));
+ TraverseTree(pWin, DRITreeTraversal, (void *) (&reg));
if (RegionNotEmpty(&reg)) {
RegionTranslate(&reg, 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)--;
}