diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:21 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:25:21 +0000 |
commit | 2e1868b560315a8b20d688e646c489a5ad93eeae (patch) | |
tree | ebe22dc92bc971e96deebba2b95ef690289f0292 /hw | |
parent | f45c46c630855e8e0d1c28b1f0d3b2ad54334619 (diff) |
DRI trunk-20040613 importDRI-trunk-20040721DRI-trunk-20040613
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/dixmods/glxmodule.c | 1 | ||||
-rw-r--r-- | hw/xfree86/dri/dri.c | 141 | ||||
-rw-r--r-- | hw/xfree86/dri/dri.h | 26 | ||||
-rw-r--r-- | hw/xfree86/dri/dristruct.h | 14 | ||||
-rw-r--r-- | hw/xfree86/dri/sarea.h | 3 | ||||
-rw-r--r-- | hw/xfree86/dri/xf86dri.c | 20 | ||||
-rw-r--r-- | hw/xfree86/os-support/xf86_libc.h | 1 |
7 files changed, 143 insertions, 63 deletions
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index eb8e54f26..d03ce6464 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -776,7 +776,6 @@ static const char *glcoreSymbols[] = { "__glXFogfvReqSize", "__glXFogivReqSize", "__glXForceCurrent", - "__glXFormatGLModes", "__glXFree", "__glXFreeBuffers", "__glXFreeContext", diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index b08379099..446259287 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -113,11 +113,14 @@ Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) { DRIScreenPrivPtr pDRIPriv; - drmContextPtr reserved; + drm_context_t * reserved; int reserved_count; int i, fd, drmWasAvailable; Bool xineramaInCore = FALSE; int err = 0; + char *openbusid; + drmVersionPtr drmlibv; + int drmlibmajor, drmlibminor, drmdimajor, drmdiminor; if (DRIGeneration != serverGeneration) { if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) @@ -148,8 +151,31 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) drmWasAvailable = drmAvailable(); + /* Check the DRM lib version. + * drmGetLibVersion was not supported in version 1.0, so check for + * symbol first to avoid possible crash or hang. + */ + drmlibmajor = 1; + drmlibminor = 0; + if (xf86LoaderCheckSymbol("drmGetLibVersion")) { + drmlibv = drmGetLibVersion(-1); + if (drmlibv != NULL) { + drmlibmajor = drmlibv->version_major; + drmlibminor = drmlibv->version_minor; + drmFreeVersion(drmlibv); + } + } + + /* Check if the libdrm can handle falling back to loading based on name + * if a busid string is passed. + */ + if (drmlibmajor == 1 && drmlibminor >= 2) + openbusid = pDRIInfo->busIdString; + else + openbusid = NULL; + /* Note that drmOpen will try to load the kernel module, if needed. */ - fd = drmOpen(pDRIInfo->drmDriverName, NULL ); + fd = drmOpen(pDRIInfo->drmDriverName, openbusid); if (fd < 0) { /* failed to open DRM */ pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -184,7 +210,40 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIPriv->grabbedDRILock = FALSE; pDRIPriv->drmSIGIOHandlerInstalled = FALSE; - if ((err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString)) < 0) { + if (drmlibmajor == 1 && drmlibminor >= 2) { + drmSetVersion sv; + + /* Get the interface version, asking for 1.1. */ + sv.drm_di_major = 1; + sv.drm_di_minor = 1; + sv.drm_dd_major = -1; + err = drmSetInterfaceVersion(pDRIPriv->drmFD, &sv); + if (err == 0) { + drmdimajor = sv.drm_di_major; + drmdiminor = sv.drm_di_minor; + } else { + /* failure, so set it to 1.0.0. */ + drmdimajor = 1; + drmdiminor = 0; + } + } + else { + /* We can't check the DI DRM interface version, so set it to 1.0.0. */ + drmdimajor = 1; + drmdiminor = 0; + } + DRIDrvMsg(pScreen->myNum, X_INFO, + "[drm] DRM interface version %d.%d\n", drmdimajor, drmdiminor); + + /* If the interface minor number is 1.1, then we've opened a DRM device + * that already had the busid set through drmOpen. + */ + if (drmdimajor == 1 && drmdiminor >= 1) + err = 0; + else + err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString); + + if (err < 0) { pDRIPriv->directRenderingSupport = FALSE; pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; drmClose(pDRIPriv->drmFD); @@ -235,7 +294,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIPriv->hSAREA, pDRIPriv->pSAREA); if (drmAddMap( pDRIPriv->drmFD, - (drmHandle)pDRIPriv->pDriverInfo->frameBufferPhysicalAddress, + (drm_handle_t)pDRIPriv->pDriverInfo->frameBufferPhysicalAddress, pDRIPriv->pDriverInfo->frameBufferSize, DRM_FRAME_BUFFER, 0, @@ -424,7 +483,7 @@ DRICloseScreen(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo; - drmContextPtr reserved; + drm_context_t * reserved; int reserved_count; if (pDRIPriv && pDRIPriv->directRenderingSupport) { @@ -575,7 +634,7 @@ DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable) } Bool -DRIOpenConnection(ScreenPtr pScreen, drmHandlePtr hSAREA, char **busIdString) +DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -586,7 +645,7 @@ DRIOpenConnection(ScreenPtr pScreen, drmHandlePtr hSAREA, char **busIdString) } Bool -DRIAuthConnection(ScreenPtr pScreen, drmMagic magic) +DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -620,18 +679,18 @@ DRIGetClientDriverName(ScreenPtr pScreen, /* DRICreateContextPriv and DRICreateContextPrivFromHandle are helper functions that layer on drmCreateContext and drmAddContextTag. - DRICreateContextPriv always creates a kernel drmContext and then calls + DRICreateContextPriv always creates a kernel drm_context_t and then calls DRICreateContextPrivFromHandle to create a DRIContextPriv structure for - DRI tracking. For the SIGIO handler, the drmContext is associated with + DRI tracking. For the SIGIO handler, the drm_context_t is associated with DRIContextPrivPtr. Any special flags are stored in the DRIContextPriv area and are passed to the kernel (if necessary). DRICreateContextPriv returns a pointer to newly allocated - DRIContextPriv, and returns the kernel drmContext in pHWContext. */ + DRIContextPriv, and returns the kernel drm_context_t in pHWContext. */ DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, - drmContextPtr pHWContext, + drm_context_t * pHWContext, DRIContextFlags flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -645,7 +704,7 @@ DRICreateContextPriv(ScreenPtr pScreen, DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, - drmContext hHWContext, + drm_context_t hHWContext, DRIContextFlags flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -721,7 +780,7 @@ DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum]; - __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual; + __GLcontextModes *modes = pGLXScreen->modes; void **pVisualConfigPriv = pGLXScreen->pVisualPriv; DRIContextPrivPtr pDRIContextPriv; void *contextStore; @@ -734,7 +793,7 @@ DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv) for (visNum = 0; visNum < pScreen->numVisuals; visNum++, visual++) { - if (pGLXVis->vid == visual->vid) + if (modes->visualID == visual->vid) break; } if (visNum == pScreen->numVisuals) return FALSE; @@ -781,15 +840,14 @@ DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv) Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, - XID context, drmContextPtr pHWContext) + XID context, drm_context_t * pHWContext) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum]; - __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual; + __GLcontextModes *modes = pGLXScreen->modes; void **pVisualConfigPriv = pGLXScreen->pVisualPriv; DRIContextPrivPtr pDRIContextPriv; void *contextStore; - int visNum; if (pDRIPriv->createDummyCtx && !pDRIPriv->dummyCtxPriv) { if (!DRICreateDummyContext(pScreen, pDRIPriv->createDummyCtxPriv)) { @@ -800,12 +858,13 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual, } /* Find the GLX visual associated with the one requested */ - for (visNum = 0; - visNum < pGLXScreen->numVisuals; - visNum++, pGLXVis++, pVisualConfigPriv++) - if (pGLXVis->vid == visual->vid) + for (modes = pGLXScreen->modes; modes != NULL; modes = modes->next) { + if (modes->visualID == visual->vid) break; - if (visNum == pGLXScreen->numVisuals) { + pVisualConfigPriv++; + } + + if (modes == NULL) { /* No matching GLX visual found */ return FALSE; } @@ -928,7 +987,7 @@ DRITransitionTo2d(ScreenPtr pScreen) Bool DRICreateDrawable(ScreenPtr pScreen, Drawable id, - DrawablePtr pDrawable, drmDrawablePtr hHWDrawable) + DrawablePtr pDrawable, drm_drawable_t * hHWDrawable) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; @@ -945,7 +1004,7 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id, return FALSE; } - /* Only create a drmDrawable once */ + /* Only create a drm_drawable_t once */ if (drmCreateDrawable(pDRIPriv->drmFD, hHWDrawable)) { xfree(pDRIDrawablePriv); return FALSE; @@ -1065,11 +1124,11 @@ DRIGetDrawableInfo(ScreenPtr pScreen, int* W, int* H, int* numClipRects, - XF86DRIClipRectPtr* pClipRects, + drm_clip_rect_t ** pClipRects, int* backX, int* backY, int* numBackClipRects, - XF86DRIClipRectPtr* pBackClipRects) + drm_clip_rect_t ** pBackClipRects) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv, pOldDrawPriv; @@ -1165,7 +1224,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen, *W = (int)(pWin->drawable.width); *H = (int)(pWin->drawable.height); *numClipRects = REGION_NUM_RECTS(&pWin->clipList); - *pClipRects = (XF86DRIClipRectPtr)REGION_RECTS(&pWin->clipList); + *pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList); if (!*numClipRects && pDRIPriv->fullscreen) { /* use fake full-screen clip rect */ @@ -1191,8 +1250,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen, if (x0 < 0) x0 = 0; if (y0 < 0) y0 = 0; - if (x1 > pScreen->width-1) x1 = pScreen->width-1; - if (y1 > pScreen->height-1) y1 = pScreen->height-1; + if (x1 > pScreen->width) x1 = pScreen->width; + if (y1 > pScreen->height) y1 = pScreen->height; pDRIPriv->private_buffer_rect.x1 = x0; pDRIPriv->private_buffer_rect.y1 = y0; @@ -1222,7 +1281,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen, Bool DRIGetDeviceInfo(ScreenPtr pScreen, - drmHandlePtr hFrameBuffer, + drm_handle_t * hFrameBuffer, int* fbOrigin, int* fbSize, int* fbStride, @@ -1870,7 +1929,7 @@ DRIGetSAREAPrivate(ScreenPtr pScreen) return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec)); } -drmContext +drm_context_t DRIGetContext(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1967,7 +2026,7 @@ DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; WindowPtr pWin = (WindowPtr)pDrawable; - XF86DRIClipRectPtr pClipRects = (void *)REGION_RECTS(&pWin->clipList); + drm_clip_rect_t * pClipRects = (void *)REGION_RECTS(&pWin->clipList); _DRIAdjustFrame(pScrn, pDRIPriv, pScrn->frameX0, pScrn->frameY0); @@ -2115,3 +2174,21 @@ DRIMoveBuffersHelper( } else *xdir = 1; } + +char * +DRICreatePCIBusID(pciVideoPtr PciInfo) +{ + char *busID; + int domain; + PCITAG tag; + + busID = xalloc(20); + if (busID == NULL) + return NULL; + + tag = pciTag(PciInfo->bus, PciInfo->device, PciInfo->func); + domain = xf86GetPciDomain(tag); + snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", domain, PciInfo->bus, + PciInfo->device, PciInfo->func); + return busID; +} diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h index 80602d3dd..8a4462bb8 100644 --- a/hw/xfree86/dri/dri.h +++ b/hw/xfree86/dri/dri.h @@ -105,11 +105,11 @@ typedef struct { */ Bool (*CreateContext)(ScreenPtr pScreen, VisualPtr visual, - drmContext hHWContext, + drm_context_t hHWContext, void* pVisualConfigPriv, DRIContextType context); void (*DestroyContext)(ScreenPtr pScreen, - drmContext hHWContext, + drm_context_t hHWContext, DRIContextType context); void (*SwapContext)(ScreenPtr pScreen, DRISyncType syncType, @@ -175,10 +175,10 @@ extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable); extern Bool DRIOpenConnection(ScreenPtr pScreen, - drmHandlePtr hSAREA, + drm_handle_t * hSAREA, char **busIdString); -extern Bool DRIAuthConnection(ScreenPtr pScreen, drmMagic magic); +extern Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); extern Bool DRICloseConnection(ScreenPtr pScreen); @@ -191,7 +191,7 @@ extern Bool DRIGetClientDriverName(ScreenPtr pScreen, extern Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, XID context, - drmContextPtr pHWContext); + drm_context_t * pHWContext); extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context); @@ -200,7 +200,7 @@ extern Bool DRIContextPrivDelete(pointer pResource, XID id); extern Bool DRICreateDrawable(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, - drmDrawablePtr hHWDrawable); + drm_drawable_t * hHWDrawable); extern Bool DRIDestroyDrawable(ScreenPtr pScreen, Drawable id, @@ -218,14 +218,14 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, int* W, int* H, int* numClipRects, - XF86DRIClipRectPtr* pClipRects, + drm_clip_rect_t ** pClipRects, int* backX, int* backY, int* numBackClipRects, - XF86DRIClipRectPtr* pBackClipRects); + drm_clip_rect_t ** pBackClipRects); extern Bool DRIGetDeviceInfo(ScreenPtr pScreen, - drmHandlePtr hFrameBuffer, + drm_handle_t * hFrameBuffer, int* fbOrigin, int* fbSize, int* fbStride, @@ -298,16 +298,16 @@ extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index); extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, - drmContextPtr pHWContext, + drm_context_t * pHWContext, DRIContextFlags flags); extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, - drmContext hHWContext, + drm_context_t hHWContext, DRIContextFlags flags); extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); -extern drmContext DRIGetContext(ScreenPtr pScreen); +extern drm_context_t DRIGetContext(ScreenPtr pScreen); extern void DRIQueryVersion(int *majorVersion, int *minorVersion, @@ -325,6 +325,8 @@ extern void DRIMoveBuffersHelper(ScreenPtr pScreen, int *ydir, RegionPtr reg); +extern char *DRICreatePCIBusID(pciVideoPtr PciInfo); + #define _DRI_H_ #endif diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h index e733ac210..268a2a655 100644 --- a/hw/xfree86/dri/dristruct.h +++ b/hw/xfree86/dri/dristruct.h @@ -50,7 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. typedef struct _DRIDrawablePrivRec { - drmDrawable hwDrawable; + drm_drawable_t hwDrawable; int drawableIndex; ScreenPtr pScreen; int refCount; @@ -58,7 +58,7 @@ typedef struct _DRIDrawablePrivRec struct _DRIContextPrivRec { - drmContext hwContext; + drm_context_t hwContext; ScreenPtr pScreen; Bool valid3D; DRIContextFlags flags; @@ -78,19 +78,19 @@ typedef struct _DRIScreenPrivRec { Bool directRenderingSupport; int drmFD; /* File descriptor for /dev/video/? */ - drmHandle hSAREA; /* Handle to SAREA, for mapping */ + drm_handle_t hSAREA; /* Handle to SAREA, for mapping */ XF86DRISAREAPtr pSAREA; /* Mapped pointer to SAREA */ - drmHandle hFrameBuffer; /* Handle to framebuffer, for mapping */ - drmContext myContext; /* DDX Driver's context */ + drm_handle_t hFrameBuffer; /* Handle to framebuffer, for mapping */ + drm_context_t myContext; /* DDX Driver's context */ DRIContextPrivPtr myContextPriv;/* Pointer to server's private area */ DRIContextPrivPtr lastPartial3DContext; /* last one partially saved */ void** hiddenContextStore; /* hidden X context */ void** partial3DContextStore; /* parital 3D context */ DRIInfoPtr pDriverInfo; int nrWindows; - XF86DRIClipRectRec private_buffer_rect; /* management of private buffers */ + drm_clip_rect_t private_buffer_rect; /* management of private buffers */ DrawablePtr fullscreen; /* pointer to fullscreen drawable */ - XF86DRIClipRectRec fullscreen_rect; /* fake rect for fullscreen mode */ + drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */ DRIWrappedFuncsRec wrap; DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES]; DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */ diff --git a/hw/xfree86/dri/sarea.h b/hw/xfree86/dri/sarea.h index a79477d78..77c16e0ef 100644 --- a/hw/xfree86/dri/sarea.h +++ b/hw/xfree86/dri/sarea.h @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */ /** * \file sarea.h * SAREA definitions. @@ -87,7 +88,7 @@ typedef struct _XF86DRISAREA { drmLock drawable_lock; XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; XF86DRISAREAFrameRec frame; - drmContext dummy_context; + drm_context_t dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; #endif diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index 7920b217d..1be253a42 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -184,7 +184,7 @@ ProcXF86DRIOpenConnection( ) { xXF86DRIOpenConnectionReply rep; - drmHandle hSAREA; + drm_handle_t hSAREA; char* busIdString; REQUEST(xXF86DRIOpenConnectionReq); @@ -340,7 +340,7 @@ ProcXF86DRICreateContext( if (!DRICreateContext( pScreen, visual, stuff->context, - (drmContextPtr)&rep.hHWContext)) { + (drm_context_t *)&rep.hHWContext)) { return BadValue; } @@ -397,7 +397,7 @@ ProcXF86DRICreateDrawable( if (!DRICreateDrawable( screenInfo.screens[stuff->screen], (Drawable)stuff->drawable, pDrawable, - (drmDrawablePtr)&rep.hHWDrawable)) { + (drm_drawable_t *)&rep.hHWDrawable)) { return BadValue; } @@ -442,8 +442,8 @@ ProcXF86DRIGetDrawableInfo( xXF86DRIGetDrawableInfoReply rep; DrawablePtr pDrawable; int X, Y, W, H; - XF86DRIClipRectPtr pClipRects; - XF86DRIClipRectPtr pBackClipRects; + drm_clip_rect_t * pClipRects; + drm_clip_rect_t * pBackClipRects; int backX, backY; REQUEST(xXF86DRIGetDrawableInfoReq); @@ -492,10 +492,10 @@ ProcXF86DRIGetDrawableInfo( rep.backY = backY; if (rep.numBackClipRects) - rep.length += sizeof(XF86DRIClipRectRec) * rep.numBackClipRects; + rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects; if (rep.numClipRects) - rep.length += sizeof(XF86DRIClipRectRec) * rep.numClipRects; + rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects; rep.length = ((rep.length + 3) & ~3) >> 2; @@ -503,13 +503,13 @@ ProcXF86DRIGetDrawableInfo( if (rep.numClipRects) { WriteToClient(client, - sizeof(XF86DRIClipRectRec) * rep.numClipRects, + sizeof(drm_clip_rect_t) * rep.numClipRects, (char *)pClipRects); } if (rep.numBackClipRects) { WriteToClient(client, - sizeof(XF86DRIClipRectRec) * rep.numBackClipRects, + sizeof(drm_clip_rect_t) * rep.numBackClipRects, (char *)pBackClipRects); } @@ -522,7 +522,7 @@ ProcXF86DRIGetDeviceInfo( ) { xXF86DRIGetDeviceInfoReply rep; - drmHandle hFrameBuffer; + drm_handle_t hFrameBuffer; void *pDevPrivate; REQUEST(xXF86DRIGetDeviceInfoReq); diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h index a1d0fca08..1ac0b3930 100644 --- a/hw/xfree86/os-support/xf86_libc.h +++ b/hw/xfree86/os-support/xf86_libc.h @@ -45,6 +45,7 @@ #define XF86_LIBC_H 1 #include "Xfuncs.h" +#include <stddef.h> /* * The first set of definitions are required both for modules and |