diff options
author | idr <idr> | 2004-06-02 04:56:15 +0000 |
---|---|---|
committer | idr <idr> | 2004-06-02 04:56:15 +0000 |
commit | 351d891661ee21e5c9cb1a2057ab860c2ad95a63 (patch) | |
tree | 6200db2ffcb6450f0fa255802c25f761fb539fe2 /xc/programs | |
parent | bf4bb37f4fb294dadb146a0f45f1a1b9b40144e1 (diff) |
Replace drmHandle, drmContext, drmDrawable, drmMagic and related types with
drm_handle_t, drm_context_t, drm_drawable_t, drm_magic_t.
Diffstat (limited to 'xc/programs')
35 files changed, 217 insertions, 221 deletions
diff --git a/xc/programs/Xserver/GL/dri/dri.c b/xc/programs/Xserver/GL/dri/dri.c index eed69cbf6..446259287 100644 --- a/xc/programs/Xserver/GL/dri/dri.c +++ b/xc/programs/Xserver/GL/dri/dri.c @@ -113,7 +113,7 @@ 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; @@ -294,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, @@ -483,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) { @@ -634,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); @@ -645,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); @@ -679,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); @@ -704,7 +704,7 @@ DRICreateContextPriv(ScreenPtr pScreen, DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, - drmContext hHWContext, + drm_context_t hHWContext, DRIContextFlags flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -840,7 +840,7 @@ 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]; @@ -987,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; @@ -1004,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; @@ -1281,7 +1281,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen, Bool DRIGetDeviceInfo(ScreenPtr pScreen, - drmHandlePtr hFrameBuffer, + drm_handle_t * hFrameBuffer, int* fbOrigin, int* fbSize, int* fbStride, @@ -1929,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); diff --git a/xc/programs/Xserver/GL/dri/dri.h b/xc/programs/Xserver/GL/dri/dri.h index cfe0450b2..8a4462bb8 100644 --- a/xc/programs/Xserver/GL/dri/dri.h +++ b/xc/programs/Xserver/GL/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, @@ -225,7 +225,7 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, 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, diff --git a/xc/programs/Xserver/GL/dri/dristruct.h b/xc/programs/Xserver/GL/dri/dristruct.h index ef7aedeef..268a2a655 100644 --- a/xc/programs/Xserver/GL/dri/dristruct.h +++ b/xc/programs/Xserver/GL/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,10 +78,10 @@ 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 */ diff --git a/xc/programs/Xserver/GL/dri/sarea.h b/xc/programs/Xserver/GL/dri/sarea.h index d4d83df93..77c16e0ef 100644 --- a/xc/programs/Xserver/GL/dri/sarea.h +++ b/xc/programs/Xserver/GL/dri/sarea.h @@ -88,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/xc/programs/Xserver/GL/dri/xf86dri.c b/xc/programs/Xserver/GL/dri/xf86dri.c index 1c542f6c1..1be253a42 100644 --- a/xc/programs/Xserver/GL/dri/xf86dri.c +++ b/xc/programs/Xserver/GL/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; } @@ -522,7 +522,7 @@ ProcXF86DRIGetDeviceInfo( ) { xXF86DRIGetDeviceInfoReply rep; - drmHandle hFrameBuffer; + drm_handle_t hFrameBuffer; void *pDevPrivate; REQUEST(xXF86DRIGetDeviceInfoReq); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atidri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/atidri.c index d7604476d..d5e1c898b 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atidri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/atidri.c @@ -261,7 +261,7 @@ static Bool ATIInitVisualConfigs( ScreenPtr pScreen ) /* Create the ATI-specific context information */ static Bool ATICreateContext( ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore ) { /* Nothing yet */ @@ -269,7 +269,7 @@ static Bool ATICreateContext( ScreenPtr pScreen, VisualPtr visual, } /* Destroy the ATI-specific context information */ -static void ATIDestroyContext( ScreenPtr pScreen, drmContext hwContext, +static void ATIDestroyContext( ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore ) { /* Nothing yet */ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/mach64_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/mach64_dri.h index 01c4dcf20..139668e3f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/mach64_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/mach64_dri.h @@ -34,28 +34,28 @@ #include "xf86drm.h" typedef struct { - drmHandle fbHandle; + drm_handle_t fbHandle; - drmHandle regsHandle; + drm_handle_t regsHandle; drmSize regsSize; int IsPCI; - drmHandle agpHandle; /* Handle from drmAgpAlloc */ + drm_handle_t agpHandle; /* Handle from drmAgpAlloc */ unsigned long agpOffset; drmSize agpSize; int agpMode; /* DMA descriptor ring */ unsigned long ringStart; /* Offset into AGP space */ - drmHandle ringHandle; /* Handle from drmAddMap */ + drm_handle_t ringHandle; /* Handle from drmAddMap */ drmSize ringMapSize; /* Size of map */ int ringSize; /* Size of ring (in kB) */ drmAddress ringMap; /* Map */ /* vertex buffer data */ unsigned long bufferStart; /* Offset into AGP space */ - drmHandle bufferHandle; /* Handle from drmAddMap */ + drm_handle_t bufferHandle; /* Handle from drmAddMap */ drmSize bufferMapSize; /* Size of map */ int bufferSize; /* Size of buffers (in MB) */ drmAddress bufferMap; /* Map */ @@ -65,7 +65,7 @@ typedef struct { /* AGP Texture data */ unsigned long agpTexStart; /* Offset into AGP space */ - drmHandle agpTexHandle; /* Handle from drmAddMap */ + drm_handle_t agpTexHandle; /* Handle from drmAddMap */ drmSize agpTexMapSize; /* Size of map */ int agpTexSize; /* Size of AGP tex space (in MB) */ drmAddress agpTexMap; /* Map */ @@ -113,10 +113,10 @@ typedef struct { unsigned int textureSize; int logTextureGranularity; - drmHandle regs; + drm_handle_t regs; drmSize regsSize; - drmHandle agp; + drm_handle_t agp; drmSize agpSize; unsigned int agpTextureOffset; unsigned int agpTextureSize; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h index deaf52364..eac70f86f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128.h @@ -289,19 +289,19 @@ typedef struct { Bool directRenderingEnabled; DRIInfoPtr pDRIInfo; int drmFD; - drmContext drmCtx; + drm_context_t drmCtx; int numVisualConfigs; __GLXvisualConfig *pVisualConfigs; R128ConfigPrivPtr pVisualConfigsPriv; - drmHandle fbHandle; + drm_handle_t fbHandle; drmSize registerSize; - drmHandle registerHandle; + drm_handle_t registerHandle; Bool IsPCI; /* Current card is a PCI card */ drmSize pciSize; - drmHandle pciMemHandle; + drm_handle_t pciMemHandle; unsigned char *PCI; /* Map */ Bool allowPageFlip; /* Enable 3d page flipping */ @@ -309,7 +309,7 @@ typedef struct { int drmMinor; drmSize agpSize; - drmHandle agpMemHandle; /* Handle from drmAgpAlloc */ + drm_handle_t agpMemHandle; /* Handle from drmAgpAlloc */ unsigned long agpOffset; unsigned char *AGP; /* Map */ int agpMode; @@ -322,20 +322,20 @@ typedef struct { /* CCE ring buffer data */ unsigned long ringStart; /* Offset into AGP space */ - drmHandle ringHandle; /* Handle from drmAddMap */ + drm_handle_t ringHandle; /* Handle from drmAddMap */ drmSize ringMapSize; /* Size of map */ int ringSize; /* Size of ring (in MB) */ unsigned char *ring; /* Map */ int ringSizeLog2QW; unsigned long ringReadOffset; /* Offset into AGP space */ - drmHandle ringReadPtrHandle; /* Handle from drmAddMap */ + drm_handle_t ringReadPtrHandle; /* Handle from drmAddMap */ drmSize ringReadMapSize; /* Size of map */ unsigned char *ringReadPtr; /* Map */ /* CCE vertex/indirect buffer data */ unsigned long bufStart; /* Offset into AGP space */ - drmHandle bufHandle; /* Handle from drmAddMap */ + drm_handle_t bufHandle; /* Handle from drmAddMap */ drmSize bufMapSize; /* Size of map */ int bufSize; /* Size of buffers (in MB) */ unsigned char *buf; /* Map */ @@ -344,7 +344,7 @@ typedef struct { /* CCE AGP Texture data */ unsigned long agpTexStart; /* Offset into AGP space */ - drmHandle agpTexHandle; /* Handle from drmAddMap */ + drm_handle_t agpTexHandle; /* Handle from drmAddMap */ drmSize agpTexMapSize; /* Size of map */ int agpTexSize; /* Size of AGP tex space (in MB) */ unsigned char *agpTex; /* Map */ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c index 079362893..ef2f9daad 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c @@ -278,7 +278,7 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen) /* Create the Rage 128-specific context information */ static Bool R128CreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -289,7 +289,7 @@ static Bool R128CreateContext(ScreenPtr pScreen, VisualPtr visual, } /* Destroy the Rage 128-specific context information */ -static void R128DestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void R128DestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { /* Nothing yet */ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h index afdf6eb2d..c3ab27595 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h @@ -87,11 +87,11 @@ typedef struct { int log2TexGran; /* MMIO register data */ - drmHandle registerHandle; + drm_handle_t registerHandle; drmSize registerSize; /* CCE AGP Texture data */ - drmHandle agpTexHandle; + drm_handle_t agpTexHandle; drmSize agpTexMapSize; int log2AGPTexGran; int agpTexOffset; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h index 24e771550..8b2c8f91e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h @@ -426,14 +426,14 @@ typedef struct { __GLXvisualConfig *pVisualConfigs; RADEONConfigPrivPtr pVisualConfigsPriv; - drmHandle fbHandle; + drm_handle_t fbHandle; drmSize registerSize; - drmHandle registerHandle; + drm_handle_t registerHandle; Bool IsPCI; /* Current card is a PCI card */ drmSize pciSize; - drmHandle pciMemHandle; + drm_handle_t pciMemHandle; unsigned char *PCI; /* Map */ Bool depthMoves; /* Enable depth moves -- slow! */ @@ -442,7 +442,7 @@ typedef struct { int drmMinor; drmSize gartSize; - drmHandle agpMemHandle; /* Handle from drmAgpAlloc */ + drm_handle_t agpMemHandle; /* Handle from drmAgpAlloc */ unsigned long gartOffset; unsigned char *AGP; /* Map */ int agpMode; @@ -459,20 +459,20 @@ typedef struct { /* CP ring buffer data */ unsigned long ringStart; /* Offset into GART space */ - drmHandle ringHandle; /* Handle from drmAddMap */ + drm_handle_t ringHandle; /* Handle from drmAddMap */ drmSize ringMapSize; /* Size of map */ int ringSize; /* Size of ring (in MB) */ unsigned char *ring; /* Map */ int ringSizeLog2QW; unsigned long ringReadOffset; /* Offset into GART space */ - drmHandle ringReadPtrHandle; /* Handle from drmAddMap */ + drm_handle_t ringReadPtrHandle; /* Handle from drmAddMap */ drmSize ringReadMapSize; /* Size of map */ unsigned char *ringReadPtr; /* Map */ /* CP vertex/indirect buffer data */ unsigned long bufStart; /* Offset into GART space */ - drmHandle bufHandle; /* Handle from drmAddMap */ + drm_handle_t bufHandle; /* Handle from drmAddMap */ drmSize bufMapSize; /* Size of map */ int bufSize; /* Size of buffers (in MB) */ unsigned char *buf; /* Map */ @@ -481,7 +481,7 @@ typedef struct { /* CP GART Texture data */ unsigned long gartTexStart; /* Offset into GART space */ - drmHandle gartTexHandle; /* Handle from drmAddMap */ + drm_handle_t gartTexHandle; /* Handle from drmAddMap */ drmSize gartTexMapSize; /* Size of map */ int gartTexSize; /* Size of GART tex space (in MB) */ unsigned char *gartTex; /* Map */ diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c index 9048db32b..f0af09493 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c @@ -284,7 +284,7 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) /* Create the Radeon-specific context information */ static Bool RADEONCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { #ifdef PER_CONTEXT_SAREA @@ -321,7 +321,7 @@ static Bool RADEONCreateContext(ScreenPtr pScreen, VisualPtr visual, } /* Destroy the Radeon-specific context information */ -static void RADEONDestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void RADEONDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { #ifdef PER_CONTEXT_SAREA diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h index 1b00c7469..4453fe6fe 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h @@ -87,15 +87,15 @@ typedef struct { int log2TexGran; /* MMIO register data */ - drmHandle registerHandle; + drm_handle_t registerHandle; drmSize registerSize; /* CP in-memory status information */ - drmHandle statusHandle; + drm_handle_t statusHandle; drmSize statusSize; /* CP GART Texture data */ - drmHandle gartTexHandle; + drm_handle_t gartTexHandle; drmSize gartTexMapSize; int log2GARTTexGran; int gartTexOffset; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h index 5f011928d..59f54589e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h @@ -53,8 +53,8 @@ typedef struct { typedef struct { #ifdef PER_CONTEXT_SAREA - drmContext ctx_id; - drmHandle sarea_handle; + drm_context_t ctx_id; + drm_handle_t sarea_handle; #else /* Nothing here yet */ int dummy; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c index ba4f70675..a85cb8043 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c @@ -54,7 +54,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static char GLINTKernelDriverName[] = "gamma"; static char GLINTClientDriverName[] = "gamma"; -static void GLINTDestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void GLINTDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); @@ -639,7 +639,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, first 4k page, priveledged writes */ pGlintDRI->registers0.size = 0x1000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)pGlint->IOAddress, + (drm_handle_t)pGlint->IOAddress, pGlintDRI->registers0.size, DRM_REGISTERS, DRM_READ_ONLY, &pGlintDRI->registers0.handle) < 0) @@ -654,7 +654,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, following region, client access */ pGlintDRI->registers1.size = 0xf000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x1000), + (drm_handle_t)(pGlint->IOAddress + 0x1000), pGlintDRI->registers1.size, DRM_REGISTERS, 0, &pGlintDRI->registers1.handle) < 0) @@ -669,7 +669,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, second MX, first 4k page */ pGlintDRI->registers2.size = 0x1000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x10000), + (drm_handle_t)(pGlint->IOAddress + 0x10000), pGlintDRI->registers2.size, DRM_REGISTERS, DRM_READ_ONLY, &pGlintDRI->registers2.handle) < 0) @@ -684,7 +684,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, second MX, following region */ pGlintDRI->registers3.size = 0xf000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x11000), + (drm_handle_t)(pGlint->IOAddress + 0x11000), pGlintDRI->registers3.size, DRM_REGISTERS, 0, &pGlintDRI->registers3.handle) < 0) @@ -828,7 +828,7 @@ GLINTDRICloseScreen(ScreenPtr pScreen) Bool GLINTCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { @@ -859,7 +859,7 @@ GLINTCreateContext(ScreenPtr pScreen, static void GLINTDestroyContext(ScreenPtr pScreen, - drmContext hwContext, + drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h index 15d5e487e..bb8648091 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dripriv.h @@ -41,7 +41,7 @@ extern void GlxSetVisualConfigs( extern Bool GLINTCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, + drm_context_t hwContext, void* pVisualConfigPriv, DRIContextType contextStore); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h index d82665dc7..332cd81af 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h @@ -238,11 +238,11 @@ typedef struct _I810Rec { unsigned long xvmcHandle; unsigned long sysmemHandle; Bool agpAcquired; - drmHandle buffer_map; - drmHandle ring_map; - drmHandle overlay_map; - drmHandle mc_map; - drmHandle xvmcContext; + drm_handle_t buffer_map; + drm_handle_t ring_map; + drm_handle_t overlay_map; + drm_handle_t mc_map; + drm_handle_t xvmcContext; #endif Bool agpAcquired2d; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c index ea33b8b5d..787eef563 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c @@ -34,9 +34,9 @@ static char I810ClientDriverName[] = "i810"; static Bool I810InitVisualConfigs(ScreenPtr pScreen); static Bool I810CreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore); -static void I810DestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void I810DestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); static void I810DRISwapContext(ScreenPtr pScreen, DRISyncType syncType, DRIContextType readContextType, @@ -481,7 +481,7 @@ I810DRIScreenInit(ScreenPtr pScreen) } pI810DRI->regsSize = I810_REG_SIZE; - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->MMIOAddr, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->MMIOAddr, pI810DRI->regsSize, DRM_REGISTERS, 0, &pI810DRI->regs) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(regs) failed\n"); DRICloseScreen(pScreen); @@ -824,7 +824,7 @@ I810DRIScreenInit(ScreenPtr pScreen) pI810->SavedDcacheMem = pI810->DcacheMem; pI810DRI->backbufferSize = pI810->BackBuffer.Size; - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->BackBuffer.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->BackBuffer.Start, pI810->BackBuffer.Size, DRM_AGP, 0, &pI810DRI->backbuffer) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -834,7 +834,7 @@ I810DRIScreenInit(ScreenPtr pScreen) } pI810DRI->depthbufferSize = pI810->DepthBuffer.Size; - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->DepthBuffer.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->DepthBuffer.Start, pI810->DepthBuffer.Size, DRM_AGP, 0, &pI810DRI->depthbuffer) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -864,7 +864,7 @@ I810DRIScreenInit(ScreenPtr pScreen) DRICloseScreen(pScreen); return FALSE; } - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->BufferMem.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->BufferMem.Start, pI810->BufferMem.Size, DRM_AGP, 0, &pI810->buffer_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(buffer_map) failed. Disabling DRI.\n"); @@ -875,7 +875,7 @@ I810DRIScreenInit(ScreenPtr pScreen) pI810DRI->agp_buffers = pI810->buffer_map; pI810DRI->agp_buf_size = pI810->BufferMem.Size; - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->LpRing.mem.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->LpRing.mem.Start, pI810->LpRing.mem.Size, DRM_AGP, 0, &pI810->ring_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(ring_map) failed. Disabling DRI.\n"); @@ -903,7 +903,7 @@ I810DRIScreenInit(ScreenPtr pScreen) I810AllocLow(&(pI810->TexMem), &(pI810->SysMem), pI810DRI->textureSize); - if (drmAddMap(pI810->drmSubFD, (drmHandle) pI810->TexMem.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->TexMem.Start, pI810->TexMem.Size, DRM_AGP, 0, &pI810DRI->textures) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(textures) failed. Disabling DRI.\n"); @@ -1043,14 +1043,14 @@ I810DRICloseScreen(ScreenPtr pScreen) static Bool I810CreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { return TRUE; } static void -I810DestroyContext(ScreenPtr pScreen, drmContext hwContext, +I810DestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h index 253ea26a2..e62d3b796 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h @@ -10,20 +10,20 @@ #define I810_MAX_DRAWABLES 256 typedef struct { - drmHandle regs; + drm_handle_t regs; drmSize regsSize; drmAddress regsMap; drmSize backbufferSize; - drmHandle backbuffer; + drm_handle_t backbuffer; drmSize depthbufferSize; - drmHandle depthbuffer; + drm_handle_t depthbuffer; - drmHandle textures; + drm_handle_t textures; int textureSize; - drmHandle agp_buffers; + drm_handle_t agp_buffers; drmSize agp_buf_size; int deviceID; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c index 525ad361c..8c9c3050a 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_hwmc.c @@ -71,7 +71,7 @@ void I810XvMCDestroySubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSurf); typedef struct { - drmContext drmcontext; + drm_context_t drmcontext; unsigned int fbBase; unsigned int OverlayOffset; unsigned int OverlaySize; @@ -206,12 +206,12 @@ void I810InitMC(ScreenPtr pScreen) } /* Cursor is at a page boundary, Overlay regs are not, don't forget */ - if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->CursorStart, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t)pI810->CursorStart, 4096, DRM_AGP, 0, &pI810->overlay_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(overlay) failed\n"); return; } - if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->MC.Start, + if (drmAddMap(pI810->drmSubFD, (drm_handle_t)pI810->MC.Start, pI810->MC.Size, DRM_AGP, 0, &pI810->mc_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(MC) failed\n"); return; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h index a0d3f7a78..6942fad11 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h @@ -246,8 +246,8 @@ typedef struct _I830Rec { int numVisualConfigs; __GLXvisualConfig *pVisualConfigs; I830ConfigPrivPtr pVisualConfigsPriv; - drmHandle buffer_map; - drmHandle ring_map; + drm_handle_t buffer_map; + drm_handle_t ring_map; #endif OptionInfoPtr Options; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c index a1512baa3..9ed9bb799 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c @@ -80,9 +80,9 @@ static char I830ClientDriverName[] = "i830"; static Bool I830InitVisualConfigs(ScreenPtr pScreen); static Bool I830CreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore); -static void I830DestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void I830DestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); static void I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType, DRIContextType readContextType, @@ -588,7 +588,7 @@ I830DRIDoMappings(ScreenPtr pScreen) DPRINTF(PFX, "I830DRIDoMappings\n"); pI830DRI->regsSize = I830_REG_SIZE; - if (drmAddMap(pI830->drmSubFD, (drmHandle)pI830->MMIOAddr, + if (drmAddMap(pI830->drmSubFD, (drm_handle_t)pI830->MMIOAddr, pI830DRI->regsSize, DRM_REGISTERS, 0, &pI830DRI->regs) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(regs) failed\n"); DRICloseScreen(pScreen); @@ -607,7 +607,7 @@ I830DRIDoMappings(ScreenPtr pScreen) pI830DRI->backbufferSize = pI830->BackBuffer.Size; if (drmAddMap(pI830->drmSubFD, - (drmHandle)pI830->BackBuffer.Start + pI830->LinearAddr, + (drm_handle_t)pI830->BackBuffer.Start + pI830->LinearAddr, pI830->BackBuffer.Size, DRM_AGP, 0, &pI830DRI->backbuffer) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -620,7 +620,7 @@ I830DRIDoMappings(ScreenPtr pScreen) pI830DRI->depthbufferSize = pI830->DepthBuffer.Size; if (drmAddMap(pI830->drmSubFD, - (drmHandle)pI830->DepthBuffer.Start + pI830->LinearAddr, + (drm_handle_t)pI830->DepthBuffer.Start + pI830->LinearAddr, pI830->DepthBuffer.Size, DRM_AGP, 0, &pI830DRI->depthbuffer) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -632,7 +632,7 @@ I830DRIDoMappings(ScreenPtr pScreen) pI830DRI->depthbuffer); if (drmAddMap(pI830->drmSubFD, - (drmHandle)pI830->BufferMem.Start + pI830->LinearAddr, + (drm_handle_t)pI830->BufferMem.Start + pI830->LinearAddr, pI830->BufferMem.Size, DRM_AGP, 0, &pI830->buffer_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -647,7 +647,7 @@ I830DRIDoMappings(ScreenPtr pScreen) pI830DRI->agp_buf_size = pI830->BufferMem.Size; if (drmAddMap(pI830->drmSubFD, - (drmHandle)pI830->LpRing.mem.Start + pI830->LinearAddr, + (drm_handle_t)pI830->LpRing.mem.Start + pI830->LinearAddr, pI830->LpRing.mem.Size, DRM_AGP, 0, &pI830->ring_map) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -662,7 +662,7 @@ I830DRIDoMappings(ScreenPtr pScreen) pI830DRI->logTextureGranularity = pI830->TexGranularity; if (drmAddMap(pI830->drmSubFD, - (drmHandle)pI830->TexMem.Start + pI830->LinearAddr, + (drm_handle_t)pI830->TexMem.Start + pI830->LinearAddr, pI830->TexMem.Size, DRM_AGP, 0, &pI830DRI->textures) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -789,14 +789,14 @@ I830DRICloseScreen(ScreenPtr pScreen) static Bool I830CreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { return TRUE; } static void -I830DestroyContext(ScreenPtr pScreen, drmContext hwContext, +I830DestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.h index 4c5d88c3a..b427dc84e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.h @@ -16,20 +16,20 @@ #define I830_REG_SIZE 0x80000 typedef struct _I830DRIRec { - drmHandle regs; + drm_handle_t regs; drmSize regsSize; drmAddress regsMap; drmSize backbufferSize; - drmHandle backbuffer; + drm_handle_t backbuffer; drmSize depthbufferSize; - drmHandle depthbuffer; + drm_handle_t depthbuffer; - drmHandle textures; + drm_handle_t textures; int textureSize; - drmHandle agp_buffers; + drm_handle_t agp_buffers; drmSize agp_buf_size; int deviceID; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c index 50c5bd5b0..e42902787 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c @@ -322,14 +322,14 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen ) } static Bool MGACreateContext( ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore ) { /* Nothing yet */ return TRUE; } -static void MGADestroyContext( ScreenPtr pScreen, drmContext hwContext, +static void MGADestroyContext( ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore ) { /* Nothing yet */ @@ -810,7 +810,7 @@ static Bool MGADRIMapInit( ScreenPtr pScreen ) pMGADRIServer->registers.size = MGAIOMAPSIZE; if ( drmAddMap( pMga->drmFD, - (drmHandle)pMga->IOAddress, + (drm_handle_t)pMga->IOAddress, pMGADRIServer->registers.size, DRM_REGISTERS, DRM_READ_ONLY, &pMGADRIServer->registers.handle ) < 0 ) { diff --git a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c index 9c7b59f31..de3b07317 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c @@ -324,7 +324,7 @@ static Bool SAVAGEInitVisualConfigs( ScreenPtr pScreen ) } static Bool SAVAGECreateContext( ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore ) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -390,7 +390,7 @@ static Bool SAVAGECreateContext( ScreenPtr pScreen, VisualPtr visual, } -static void SAVAGEDestroyContext( ScreenPtr pScreen, drmContext hwContext, +static void SAVAGEDestroyContext( ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore ) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -823,7 +823,7 @@ static Bool SAVAGEDRIMapInit( ScreenPtr pScreen ) pSAVAGEDRIServer->registers.size = SAVAGEIOMAPSIZE; if ( drmAddMap( psav->drmFD, - (drmHandle)psav->MmioBase, + (drm_handle_t)psav->MmioBase, pSAVAGEDRIServer->registers.size, DRM_REGISTERS,0, &pSAVAGEDRIServer->registers.handle ) < 0 ) { @@ -835,7 +835,7 @@ static Bool SAVAGEDRIMapInit( ScreenPtr pScreen ) pSAVAGEDRIServer->aperture.size = 5 * 0x01000000; if ( drmAddMap( psav->drmFD, - (drmHandle)(psav->ApertureBase), + (drm_handle_t)(psav->ApertureBase), pSAVAGEDRIServer->aperture.size, DRM_FRAME_BUFFER,0, &pSAVAGEDRIServer->aperture.handle ) < 0 ) { diff --git a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.h index 2d319ba1c..af62e761c 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.h @@ -40,7 +40,7 @@ #define SAVAGE_BUFFER_ALIGN 0x00000fff typedef struct{ - drmContext ctxOwner; + drm_context_t ctxOwner; unsigned long agp_offset; unsigned long agp_handle; unsigned long map_handle; @@ -116,20 +116,20 @@ typedef struct { int agpMode; - drmHandle frontbuffer; + drm_handle_t frontbuffer; unsigned int frontbufferSize; unsigned int frontOffset; unsigned int frontPitch; unsigned int frontBitmapDesc; /*Bitmap Descriptior*/ unsigned int IsfrontTiled; - drmHandle backbuffer; + drm_handle_t backbuffer; unsigned int backbufferSize; unsigned int backOffset; unsigned int backPitch; unsigned int backBitmapDesc; /*Bitmap Descriptior*/ - drmHandle depthbuffer; + drm_handle_t depthbuffer; unsigned int depthbufferSize; unsigned int depthOffset; unsigned int depthPitch; @@ -137,8 +137,8 @@ typedef struct { - drmHandle textures; - drmHandle xvmcSurfHandle; + drm_handle_t textures; + drm_handle_t xvmcSurfHandle; unsigned int textureOffset; unsigned int textureSize; int logTextureGranularity; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_hwmc.c b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_hwmc.c index d4ce79d82..37d314d97 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_hwmc.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_hwmc.c @@ -64,7 +64,7 @@ void SAVAGEXvMCDestroySubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSurf); typedef struct { - drmContext drmcontext; + drm_context_t drmcontext; unsigned int fbBase; unsigned int MMIOHandle; unsigned int MMIOSize; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c index 173712faa..b5ece2e62 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c @@ -67,9 +67,9 @@ static char SISClientDriverName[] = "sis"; static Bool SISInitVisualConfigs(ScreenPtr pScreen); static Bool SISCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore); -static void SISDestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void SISDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); static void SISDRISwapContext(ScreenPtr pScreen, DRISyncType syncType, DRIContextType readContextType, @@ -373,7 +373,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) pSISDRI->regs.size = SISIOMAPSIZE; pSISDRI->regs.map = 0; - if(drmAddMap(pSIS->drmSubFD, (drmHandle)pSIS->IOAddress, + if(drmAddMap(pSIS->drmSubFD, (drm_handle_t)pSIS->IOAddress, pSISDRI->regs.size, DRM_REGISTERS, 0, &pSISDRI->regs.handle) < 0) { SISDRICloseScreen(pScreen); @@ -433,7 +433,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) /* pSIS->agpBase = */ pSISDRI->agp.size = pSIS->agpSize; - if(drmAddMap(pSIS->drmSubFD, (drmHandle)0, + if(drmAddMap(pSIS->drmSubFD, (drm_handle_t)0, pSISDRI->agp.size, DRM_AGP, 0, &pSISDRI->agp.handle) < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -541,14 +541,14 @@ SISDRICloseScreen(ScreenPtr pScreen) */ static Bool SISCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { return TRUE; } static void -SISDestroyContext(ScreenPtr pScreen, drmContext hwContext, +SISDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.h index d38e39a05..ce7c9a311 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.h @@ -35,7 +35,7 @@ typedef struct { #define SIS_DEPTH 2 typedef struct { - drmHandle handle; + drm_handle_t handle; drmSize size; drmAddress map; } sisRegion, *sisRegionPtr; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c index 49dfe2d21..b90521663 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c @@ -57,9 +57,9 @@ static char FFBKernelDriverName[] = "ffb"; static char FFBClientDriverName[] = "ffb"; /* Forward declarations. */ -static Bool FFBDRICreateContext(ScreenPtr, VisualPtr, drmContext, +static Bool FFBDRICreateContext(ScreenPtr, VisualPtr, drm_context_t, void *, DRIContextType); -static void FFBDRIDestroyContext(ScreenPtr, drmContext, DRIContextType); +static void FFBDRIDestroyContext(ScreenPtr, drm_context_t, DRIContextType); static void FFBDRIInitBuffers(WindowPtr, RegionPtr, CARD32); static void FFBDRIMoveBuffers(WindowPtr, DDXPointRec, RegionPtr, CARD32); @@ -416,7 +416,7 @@ FFBDRICloseScreen(ScreenPtr pScreen) } static Bool -FFBDRICreateContext(ScreenPtr pScreen, VisualPtr visual, drmContext hwContext, +FFBDRICreateContext(ScreenPtr pScreen, VisualPtr visual, drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType context) { /* Nothing to do... */ @@ -424,7 +424,7 @@ FFBDRICreateContext(ScreenPtr pScreen, VisualPtr visual, drmContext hwContext, } static void -FFBDRIDestroyContext(ScreenPtr pScreen, drmContext hwContext, DRIContextType context) +FFBDRIDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType context) { /* Nothing to do... */ } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_drishare.h b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_drishare.h index 501dd5b21..1c983d005 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_drishare.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_drishare.h @@ -19,23 +19,23 @@ typedef struct ffb_dri_state { ((ffb_dri_state_t *) (((char *)(SAREA)) + sizeof(XF86DRISAREARec))) typedef struct { - drmHandle hFbcRegs; + drm_handle_t hFbcRegs; drmSize sFbcRegs; drmAddress mFbcRegs; - drmHandle hDacRegs; + drm_handle_t hDacRegs; drmSize sDacRegs; drmAddress mDacRegs; - drmHandle hSfb8r; + drm_handle_t hSfb8r; drmSize sSfb8r; drmAddress mSfb8r; - drmHandle hSfb32; + drm_handle_t hSfb32; drmSize sSfb32; drmAddress mSfb32; - drmHandle hSfb64; + drm_handle_t hSfb64; drmSize sSfb64; drmAddress mSfb64; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c index d63e29b76..1757ae43e 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c @@ -17,9 +17,9 @@ static char TDFXKernelDriverName[] = "tdfx"; static char TDFXClientDriverName[] = "tdfx"; static Bool TDFXCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore); -static void TDFXDestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void TDFXDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); static void TDFXDRISwapContext(ScreenPtr pScreen, DRISyncType syncType, DRIContextType readContextType, @@ -433,7 +433,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) } pTDFXDRI->regsSize=TDFXIOMAPSIZE; - if (drmAddMap(pTDFX->drmSubFD, (drmHandle)pTDFX->MMIOAddr[0], + if (drmAddMap(pTDFX->drmSubFD, (drm_handle_t)pTDFX->MMIOAddr[0], pTDFXDRI->regsSize, DRM_REGISTERS, 0, &pTDFXDRI->regs)<0) { TDFXDRICloseScreen(pScreen); xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap failed, disabling DRI.\n"); @@ -474,14 +474,14 @@ TDFXDRICloseScreen(ScreenPtr pScreen) static Bool TDFXCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, void *pVisualConfigPriv, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { return TRUE; } static void -TDFXDestroyContext(ScreenPtr pScreen, drmContext hwContext, +TDFXDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.h index 956b7e703..e7ad87d1b 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.h +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.h @@ -6,7 +6,7 @@ #include "xf86drm.h" typedef struct { - drmHandle regs; + drm_handle_t regs; drmSize regsSize; drmAddress regsMap; int deviceID; diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c index 36a583ef6..2b0b1b9cc 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c @@ -804,7 +804,7 @@ int drmSetBusid(int fd, const char *busid) return 0; } -int drmGetMagic(int fd, drmMagicPtr magic) +int drmGetMagic(int fd, drm_magic_t * magic) { drm_auth_t auth; @@ -814,7 +814,7 @@ int drmGetMagic(int fd, drmMagicPtr magic) return 0; } -int drmAuthMagic(int fd, drmMagic magic) +int drmAuthMagic(int fd, drm_magic_t magic) { drm_auth_t auth; @@ -874,11 +874,11 @@ int drmAuthMagic(int fd, drmMagic magic) * the arguments in a drm_map structure. */ int drmAddMap(int fd, - drmHandle offset, + drm_handle_t offset, drmSize size, drmMapType type, drmMapFlags flags, - drmHandlePtr handle) + drm_handle_t * handle) { drm_map_t map; @@ -894,11 +894,11 @@ int drmAddMap(int fd, map.type = type; map.flags = flags; if (ioctl(fd, DRM_IOCTL_ADD_MAP, &map)) return -errno; - if (handle) *handle = (drmHandle)map.handle; + if (handle) *handle = (drm_handle_t)map.handle; return 0; } -int drmRmMap(int fd, drmHandle handle) +int drmRmMap(int fd, drm_handle_t handle) { drm_map_t map; @@ -1041,7 +1041,7 @@ int drmClose(int fd) * This function is a wrapper for mmap(). */ int drmMap(int fd, - drmHandle handle, + drm_handle_t handle, drmSize size, drmAddressPtr address) { @@ -1247,7 +1247,7 @@ int drmDMA(int fd, drmDMAReqPtr request) * This function translates the arguments into a drm_lock structure and issue * the DRM_IOCTL_LOCK ioctl until the lock is successfully acquired. */ -int drmGetLock(int fd, drmContext context, drmLockFlags flags) +int drmGetLock(int fd, drm_context_t context, drmLockFlags flags) { drm_lock_t lock; @@ -1277,7 +1277,7 @@ int drmGetLock(int fd, drmContext context, drmLockFlags flags) * This function is a wrapper around the DRM_IOCTL_UNLOCK ioctl, passing the * argument in a drm_lock structure. */ -int drmUnlock(int fd, drmContext context) +int drmUnlock(int fd, drm_context_t context) { drm_lock_t lock; @@ -1286,11 +1286,11 @@ int drmUnlock(int fd, drmContext context) return ioctl(fd, DRM_IOCTL_UNLOCK, &lock); } -drmContextPtr drmGetReservedContextList(int fd, int *count) +drm_context_t * drmGetReservedContextList(int fd, int *count) { drm_ctx_res_t res; drm_ctx_t *list; - drmContextPtr retval; + drm_context_t * retval; int i; res.count = 0; @@ -1315,7 +1315,7 @@ drmContextPtr drmGetReservedContextList(int fd, int *count) return retval; } -void drmFreeReservedContextList(drmContextPtr pt) +void drmFreeReservedContextList(drm_context_t * pt) { drmFree(pt); } @@ -1338,7 +1338,7 @@ void drmFreeReservedContextList(drmContextPtr pt) * This function is a wrapper around the DRM_IOCTL_ADD_CTX ioctl, passing the * argument in a drm_ctx structure. */ -int drmCreateContext(int fd, drmContextPtr handle) +int drmCreateContext(int fd, drm_context_t * handle) { drm_ctx_t ctx; @@ -1348,7 +1348,7 @@ int drmCreateContext(int fd, drmContextPtr handle) return 0; } -int drmSwitchToContext(int fd, drmContext context) +int drmSwitchToContext(int fd, drm_context_t context) { drm_ctx_t ctx; @@ -1357,7 +1357,7 @@ int drmSwitchToContext(int fd, drmContext context) return 0; } -int drmSetContextFlags(int fd, drmContext context, drmContextFlags flags) +int drmSetContextFlags(int fd, drm_context_t context, drm_context_tFlags flags) { drm_ctx_t ctx; @@ -1377,7 +1377,7 @@ int drmSetContextFlags(int fd, drmContext context, drmContextFlags flags) return 0; } -int drmGetContextFlags(int fd, drmContext context, drmContextFlagsPtr flags) +int drmGetContextFlags(int fd, drm_context_t context, drm_context_tFlagsPtr flags) { drm_ctx_t ctx; @@ -1406,7 +1406,7 @@ int drmGetContextFlags(int fd, drmContext context, drmContextFlagsPtr flags) * This function is a wrapper around the DRM_IOCTL_RM_CTX ioctl, passing the * argument in a drm_ctx structure. */ -int drmDestroyContext(int fd, drmContext handle) +int drmDestroyContext(int fd, drm_context_t handle) { drm_ctx_t ctx; ctx.handle = handle; @@ -1414,7 +1414,7 @@ int drmDestroyContext(int fd, drmContext handle) return 0; } -int drmCreateDrawable(int fd, drmDrawablePtr handle) +int drmCreateDrawable(int fd, drm_drawable_t * handle) { drm_draw_t draw; if (ioctl(fd, DRM_IOCTL_ADD_DRAW, &draw)) return -errno; @@ -1422,7 +1422,7 @@ int drmCreateDrawable(int fd, drmDrawablePtr handle) return 0; } -int drmDestroyDrawable(int fd, drmDrawable handle) +int drmDestroyDrawable(int fd, drm_drawable_t handle) { drm_draw_t draw; draw.handle = handle; @@ -1915,7 +1915,7 @@ int drmGetInterruptFromBusID(int fd, int busnum, int devnum, int funcnum) return p.irq; } -int drmAddContextTag(int fd, drmContext context, void *tag) +int drmAddContextTag(int fd, drm_context_t context, void *tag) { drmHashEntry *entry = drmGetEntry(fd); @@ -1926,14 +1926,14 @@ int drmAddContextTag(int fd, drmContext context, void *tag) return 0; } -int drmDelContextTag(int fd, drmContext context) +int drmDelContextTag(int fd, drm_context_t context) { drmHashEntry *entry = drmGetEntry(fd); return drmHashDelete(entry->tagTable, context); } -void *drmGetContextTag(int fd, drmContext context) +void *drmGetContextTag(int fd, drm_context_t context) { drmHashEntry *entry = drmGetEntry(fd); void *value; @@ -1943,7 +1943,7 @@ void *drmGetContextTag(int fd, drmContext context) return value; } -int drmAddContextPrivateMapping(int fd, drmContext ctx_id, drmHandle handle) +int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id, drm_handle_t handle) { drm_ctx_priv_map_t map; @@ -1954,20 +1954,20 @@ int drmAddContextPrivateMapping(int fd, drmContext ctx_id, drmHandle handle) return 0; } -int drmGetContextPrivateMapping(int fd, drmContext ctx_id, drmHandlePtr handle) +int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id, drm_handle_t * handle) { drm_ctx_priv_map_t map; map.ctx_id = ctx_id; if (ioctl(fd, DRM_IOCTL_GET_SAREA_CTX, &map)) return -errno; - if (handle) *handle = (drmHandle)map.handle; + if (handle) *handle = (drm_handle_t)map.handle; return 0; } -int drmGetMap(int fd, int idx, drmHandle *offset, drmSize *size, - drmMapType *type, drmMapFlags *flags, drmHandle *handle, +int drmGetMap(int fd, int idx, drm_handle_t *offset, drmSize *size, + drmMapType *type, drmMapFlags *flags, drm_handle_t *handle, int *mtrr) { drm_map_t map; @@ -2277,8 +2277,8 @@ static void drmSIGIOHandler(int interrupt, void *closure) drm_ctx_t ctx; typedef void (*_drmCallback)(int, void *, void *); char buf[256]; - drmContext old; - drmContext new; + drm_context_t old; + drm_context_t new; void *oldctx; void *newctx; char *pt; diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h index 5a7ff05ad..0559d1749 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86drm.h @@ -58,12 +58,8 @@ #define DRM_AGP_NO_HANDLE 0 -typedef unsigned long drmHandle, *drmHandlePtr; /**< To mapped regions */ typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */ typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */ -typedef unsigned int drmContext, *drmContextPtr; /**< GLXContext handle */ -typedef unsigned int drmDrawable, *drmDrawablePtr; /**< Unused */ -typedef unsigned int drmMagic, *drmMagicPtr; /**< Magic for authentication */ /** * Driver version information. @@ -170,7 +166,7 @@ typedef enum { DRM_CONTEXT_PRESERVED = 0x01, /**< This context is preserved and never swapped. */ DRM_CONTEXT_2DONLY = 0x02 /**< This context is for 2D rendering only. */ -} drmContextFlags, *drmContextFlagsPtr; +} drm_context_tFlags, *drm_context_tFlagsPtr; typedef struct _drmBufDesc { int count; /**< Number of buffers of this size */ @@ -223,7 +219,7 @@ typedef struct _drmLock { * list in drmBufInfo */ typedef struct _drmDMAReq { - drmContext context; /**< Context handle */ + drm_context_t context; /**< Context handle */ int send_count; /**< Number of buffers to send */ int *send_list; /**< List of handles to buffers */ int *send_sizes; /**< Lengths of data to send, in bytes */ @@ -236,7 +232,7 @@ typedef struct _drmDMAReq { } drmDMAReq, *drmDMAReqPtr; typedef struct _drmRegion { - drmHandle handle; + drm_handle_t handle; unsigned int offset; drmSize size; drmAddress map; @@ -501,13 +497,13 @@ extern int drmClose(int fd); extern drmVersionPtr drmGetVersion(int fd); extern drmVersionPtr drmGetLibVersion(int fd); extern void drmFreeVersion(drmVersionPtr); -extern int drmGetMagic(int fd, drmMagicPtr magic); +extern int drmGetMagic(int fd, drm_magic_t * magic); extern char *drmGetBusid(int fd); extern int drmGetInterruptFromBusID(int fd, int busnum, int devnum, int funcnum); -extern int drmGetMap(int fd, int idx, drmHandle *offset, +extern int drmGetMap(int fd, int idx, drm_handle_t *offset, drmSize *size, drmMapType *type, - drmMapFlags *flags, drmHandle *handle, + drmMapFlags *flags, drm_handle_t *handle, int *mtrr); extern int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid, unsigned long *magic, @@ -525,35 +521,35 @@ extern int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, /* General user-level programmer's API: X server (root) only */ extern void drmFreeBusid(const char *busid); extern int drmSetBusid(int fd, const char *busid); -extern int drmAuthMagic(int fd, drmMagic magic); +extern int drmAuthMagic(int fd, drm_magic_t magic); extern int drmAddMap(int fd, - drmHandle offset, + drm_handle_t offset, drmSize size, drmMapType type, drmMapFlags flags, - drmHandlePtr handle); -extern int drmRmMap(int fd, drmHandle handle); -extern int drmAddContextPrivateMapping(int fd, drmContext ctx_id, - drmHandle handle); + drm_handle_t * handle); +extern int drmRmMap(int fd, drm_handle_t handle); +extern int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id, + drm_handle_t handle); extern int drmAddBufs(int fd, int count, int size, drmBufDescFlags flags, int agp_offset); extern int drmMarkBufs(int fd, double low, double high); -extern int drmCreateContext(int fd, drmContextPtr handle); -extern int drmSetContextFlags(int fd, drmContext context, - drmContextFlags flags); -extern int drmGetContextFlags(int fd, drmContext context, - drmContextFlagsPtr flags); -extern int drmAddContextTag(int fd, drmContext context, void *tag); -extern int drmDelContextTag(int fd, drmContext context); -extern void *drmGetContextTag(int fd, drmContext context); -extern drmContextPtr drmGetReservedContextList(int fd, int *count); -extern void drmFreeReservedContextList(drmContextPtr); -extern int drmSwitchToContext(int fd, drmContext context); -extern int drmDestroyContext(int fd, drmContext handle); -extern int drmCreateDrawable(int fd, drmDrawablePtr handle); -extern int drmDestroyDrawable(int fd, drmDrawable handle); +extern int drmCreateContext(int fd, drm_context_t * handle); +extern int drmSetContextFlags(int fd, drm_context_t context, + drm_context_tFlags flags); +extern int drmGetContextFlags(int fd, drm_context_t context, + drm_context_tFlagsPtr flags); +extern int drmAddContextTag(int fd, drm_context_t context, void *tag); +extern int drmDelContextTag(int fd, drm_context_t context); +extern void *drmGetContextTag(int fd, drm_context_t context); +extern drm_context_t * drmGetReservedContextList(int fd, int *count); +extern void drmFreeReservedContextList(drm_context_t *); +extern int drmSwitchToContext(int fd, drm_context_t context); +extern int drmDestroyContext(int fd, drm_context_t handle); +extern int drmCreateDrawable(int fd, drm_drawable_t * handle); +extern int drmDestroyDrawable(int fd, drm_drawable_t handle); extern int drmCtlInstHandler(int fd, int irq); extern int drmCtlUninstHandler(int fd); extern int drmInstallSIGIOHandler(int fd, @@ -564,7 +560,7 @@ extern int drmRemoveSIGIOHandler(int fd); /* General user-level programmer's API: authenticated client and/or X */ extern int drmMap(int fd, - drmHandle handle, + drm_handle_t handle, drmSize size, drmAddressPtr address); extern int drmUnmap(drmAddress address, drmSize size); @@ -574,12 +570,12 @@ extern int drmUnmapBufs(drmBufMapPtr bufs); extern int drmDMA(int fd, drmDMAReqPtr request); extern int drmFreeBufs(int fd, int count, int *list); extern int drmGetLock(int fd, - drmContext context, + drm_context_t context, drmLockFlags flags); -extern int drmUnlock(int fd, drmContext context); +extern int drmUnlock(int fd, drm_context_t context); extern int drmFinish(int fd, int context, drmLockFlags flags); -extern int drmGetContextPrivateMapping(int fd, drmContext ctx_id, - drmHandlePtr handle); +extern int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id, + drm_handle_t * handle); /* AGP/GART support: X server (root) only */ extern int drmAgpAcquire(int fd); |