drm_handle_t, drm_context_t, drm_drawable_t, drm_magic_t.
static PFNGLXWINDOWEXISTSPROC window_exists;
typedef Bool (*PFNGLXCREATECONTEXTWITHCONFIGPROC)( __DRInativeDisplay*, int, int, void *,
- drmContextPtr );
+ drm_context_t * );
static PFNGLXCREATECONTEXTWITHCONFIGPROC create_context_with_config;
*/
static Bool
fake_XF86DRICreateContextWithConfig( __DRInativeDisplay* dpy, int screen, int configID,
- XID* context, drmContextPtr hHWContext )
+ XID* context, drm_context_t * hHWContext )
{
Visual vis;
{
int directCapable;
__DRIscreenPrivate *psp = NULL;
- drmHandle hSAREA;
+ drm_handle_t hSAREA;
drmAddress pSAREA;
char *BusID;
__GLcontextModes *modes;
err_extra = strerror( -fd );
if (fd >= 0) {
- drmMagic magic;
+ drm_magic_t magic;
err_msg = "drmGetMagic";
err_extra = NULL;
&dri_version.major,
&dri_version.minor,
&dri_version.patch)) {
- drmHandle hFB;
+ drm_handle_t hFB;
int junk;
/*
/**
* Kernel drawable handle
*/
- drmDrawable hHWDrawable;
+ drm_drawable_t hHWDrawable;
/**
* Driver's private drawable information.
/**
* Kernel context handle used to access the device lock.
*/
- drmContext hHWContext;
+ drm_context_t hHWContext;
/**
* Device driver's private context data. This structure is opaque.
/* Fog state. */
float Znear, Zfar;
- drmContext hHWContext;
+ drm_context_t hHWContext;
drmLock *driHwLock;
int driFd;
((ffb_dri_state_t *) (((char *)(SAREA)) + sizeof(drm_sarea_t)))
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;
/* Mirrors of some DRI state
*/
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
typedef struct _gammaRegion {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
drmAddress map;
} gammaRegion, *gammaRegionPtr;
drm_clip_rect_t draw_rect;
drm_clip_rect_t scissor_rect;
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
#include "dri_util.h"
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
char *map;
} i810Region, *i810RegionPtr;
int depthSize = (((ctx->shared.virtualHeight+15) & ~15) * width_bytes);
int l;
- if (drmAddMap(ctx->drmFD, (drmHandle) info->BackBuffer.Start,
+ if (drmAddMap(ctx->drmFD, (drm_handle_t) info->BackBuffer.Start,
info->BackBuffer.Size, DRM_AGP, 0,
&info->backbuffer) < 0) {
fprintf(stderr, "[drm] drmAddMap(backbuffer) failed. Disabling DRI\n");
return 0;
}
- if (drmAddMap(ctx->drmFD, (drmHandle) info->DepthBuffer.Start,
+ if (drmAddMap(ctx->drmFD, (drm_handle_t) info->DepthBuffer.Start,
info->DepthBuffer.Size, DRM_AGP, 0,
&info->depthbuffer) < 0) {
fprintf(stderr, "[drm] drmAddMap(depthbuffer) failed. Disabling DRI.\n");
return 0;
}
- if (drmAddMap(ctx->drmFD, (drmHandle) info->BufferMem.Start,
+ if (drmAddMap(ctx->drmFD, (drm_handle_t) info->BufferMem.Start,
info->BufferMem.Size, DRM_AGP, 0, &info->buffer_map) < 0) {
fprintf(stderr, "[drm] drmAddMap(buffer_map) failed. Disabling DRI.\n");
return 0;
}
- if (drmAddMap(ctx->drmFD, (drmHandle) info->LpRing.mem.Start,
+ if (drmAddMap(ctx->drmFD, (drm_handle_t) info->LpRing.mem.Start,
info->LpRing.mem.Size, DRM_AGP, 0, &info->ring_map) < 0) {
fprintf(stderr, "[drm] drmAddMap(ring_map) failed. Disabling DRI. \n");
return 0;
I810AllocLow(&(info->TexMem), &(info->SysMem), info->textureSize);
- if (drmAddMap(ctx->drmFD, (drmHandle) info->TexMem.Start,
+ if (drmAddMap(ctx->drmFD, (drm_handle_t) info->TexMem.Start,
info->TexMem.Size, DRM_AGP, 0, &info->textures) < 0) {
fprintf(stderr,
"[drm] drmAddMap(textures) failed. Disabling DRI.\n");
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap( ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
#ifndef _EMBEDDED
#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;
drm_clip_rect_t draw_rect;
drm_clip_rect_t scissor_rect;
- drmContext hHWContext;
+ drm_context_t hHWContext;
drmLock *driHwLock;
int driFd;
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
char *map;
} i830Region, *i830RegionPtr;
#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;
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
#include "xmlconfig.h"
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
drmAddress *map; /* Mapping of the DRM region */
} mach64RegionRec, *mach64RegionPtr;
#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 */
/* 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 */
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;
/* Mirrors of some DRI state.
*/
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
__DRIdrawablePrivate *driDrawable;
pMga->registers.size = MGAIOMAPSIZE;
if ( drmAddMap( ctx->drmFD,
- (drmHandle)pMga->IOAddress,
+ (drm_handle_t)pMga->IOAddress,
pMga->registers.size,
DRM_REGISTERS, DRM_READ_ONLY,
&pMga->registers.handle ) < 0 ) {
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap( ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
0,
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
#include "xmlconfig.h"
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
unsigned char *map; /* Mapping of the DRM region */
} r128RegionRec, *r128RegionPtr;
R128FBLayout CurrentLayout;
#endif
#ifdef XF86DRI
- drmContext drmCtx;
+ drm_context_t drmCtx;
#ifndef _SOLO
DRIInfoPtr pDRIInfo;
int numVisualConfigs;
#endif
drmSize registerSize;
- drmHandle registerHandle;
+ drm_handle_t registerHandle;
GLboolean IsPCI; /* Current card is a PCI card */
drmSize pciSize;
- drmHandle pciMemHandle;
+ drm_handle_t pciMemHandle;
unsigned char *PCI; /* Map */
GLboolean allowPageFlip; /* Enable 3d page flipping */
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;
/* 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 */
/* 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 */
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap( ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
0,
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;
__DRIscreenPrivate *screen; /* DRI screen */
__DRIdrawablePrivate *drawable; /* DRI drawable bound to this ctx */
- drmContext hwContext;
+ drm_context_t hwContext;
drm_hw_lock_t *hwLock;
int fd;
int drmMinor;
#include "xmlconfig.h"
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
drmAddress map; /* Mapping of the DRM region */
} r200RegionRec, *r200RegionPtr;
__DRIscreenPrivate *screen; /* DRI screen */
__DRIdrawablePrivate *drawable; /* DRI drawable bound to this ctx */
- drmContext hwContext;
+ drm_context_t hwContext;
drm_hw_lock_t *hwLock;
int fd;
int drmMinor;
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
drmAddress map; /* Mapping of the DRM region */
} radeonRegionRec, *radeonRegionPtr;
#ifndef _RADEON_H_
#define _RADEON_H_
-#include "xf86drm.h" /* drmHandle, etc */
+#include "xf86drm.h" /* drm_handle_t, etc */
#define PCI_CHIP_R200_BB 0x4242
#define PCI_CHIP_RV250_Id 0x4964
drmSize registerSize; /**< \brief MMIO register map size */
- drmHandle registerHandle; /**< \brief MMIO register map handle */
+ drm_handle_t registerHandle; /**< \brief MMIO register map handle */
/**
* \name AGP
*/
/*@{*/
drmSize gartSize; /**< \brief AGP map size */
- drmHandle gartMemHandle; /**< \brief AGP map handle */
+ drm_handle_t gartMemHandle; /**< \brief AGP map handle */
unsigned long gartOffset; /**< \brief AGP offset */
int gartMode; /**< \brief AGP mode */
int gartFastWrite;
*/
/*@{*/
unsigned long ringStart; /**< \brief Offset into AGP space */
- drmHandle ringHandle; /**< \brief Handle from drmAddMap() */
+ drm_handle_t ringHandle; /**< \brief Handle from drmAddMap() */
drmSize ringMapSize; /**< \brief Size of map */
int ringSize; /**< \brief Size of ring (in MB) */
unsigned long ringReadOffset; /**< \brief Read offset into AGP space */
- drmHandle ringReadPtrHandle;/**< \brief Handle from drmAddMap() */
+ drm_handle_t ringReadPtrHandle;/**< \brief Handle from drmAddMap() */
drmSize ringReadMapSize; /**< \brief Size of map */
/*@}*/
*/
/*@{*/
unsigned long bufStart; /**< \brief Offset into AGP space */
- drmHandle bufHandle; /**< \brief Handle from drmAddMap() */
+ drm_handle_t bufHandle; /**< \brief Handle from drmAddMap() */
drmSize bufMapSize; /**< \brief Size of map */
int bufSize; /**< \brief Size of buffers (in MB) */
int bufNumBufs; /**< \brief Number of buffers */
*/
/*@{*/
unsigned long gartTexStart; /**< \brief Offset into AGP space */
- drmHandle gartTexHandle; /**< \brief Handle from drmAddMap() */
+ drm_handle_t gartTexHandle; /**< \brief Handle from drmAddMap() */
drmSize gartTexMapSize; /**< \brief Size of map */
int gartTexSize; /**< \brief Size of AGP tex space (in MB) */
int log2GARTTexGran;
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap( ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
#ifndef _EMBEDDED
* \name MMIO register data
*/
/*@{*/
- drmHandle registerHandle; /**< \brief MMIO register map size */
+ drm_handle_t registerHandle; /**< \brief MMIO register map size */
drmSize registerSize; /**< \brief MMIO register map handle */
/*@}*/
* \name CP in-memory status information
*/
/*@{*/
- drmHandle statusHandle; /**< \brief status map handle */
+ drm_handle_t statusHandle; /**< \brief status map handle */
drmSize statusSize; /**< \brief status map size */
/*@}*/
* \name CP AGP Texture data
*/
/*@{*/
- drmHandle gartTexHandle; /**< \brief AGP texture area map handle */
+ drm_handle_t gartTexHandle; /**< \brief AGP texture area map handle */
drmSize gartTexMapSize; /**< \brief AGP texture area map size */
int log2GARTTexGran; /**< \brief AGP texture granularity in log base 2 */
int gartTexOffset; /**< \brief AGP texture area offset in AGP space */
#include "mtypes.h"
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
char *map;
} savageRegion, *savageRegionPtr;
/*Texture aging and DMA based aging*/
unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
- drmContext hHWContext;
+ drm_context_t hHWContext;
drmLock *driHwLock;
GLuint driFd;
#define SIS_DEPTH 2
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
drmAddress map;
} sisRegion, *sisRegionPtr;
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
sisScreenPtr sisScreen; /* Screen private DRI data */
#define __SIS_SCREEN_H
typedef struct {
- drmHandle handle; /* Handle to the DRM region */
+ drm_handle_t handle; /* Handle to the DRM region */
drmSize size; /* Size of the DRM region */
drmAddress map; /* Mapping of the DRM region */
} sisRegionRec2, *sisRegionPtr2;
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap( ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
#ifndef _EMBEDDED
#include "xf86drm.h"
typedef struct {
- drmHandle regs;
+ drm_handle_t regs;
drmSize regsSize;
drmAddress regsMap;
int deviceID;
__DRIscreenPrivate *driScreen;
__DRIcontextPrivate *driContext;
__DRIdrawablePrivate *driDrawable;
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
tdfxScreenPrivate *fxScreen;
#ifdef GLX_DIRECT_RENDERING
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
drmAddress map;
} tdfxRegion, *tdfxRegionPtr;
"[drm] agpAddr = 0x%08lx\n",pVia->agpAddr);
pVIADRI->agp.size = pVia->agpSize;
- if (drmAddMap(pVia->drmFD, (drmHandle)0,
+ if (drmAddMap(pVia->drmFD, (drm_handle_t)0,
pVIADRI->agp.size, DRM_AGP, 0,
&pVIADRI->agp.handle) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
/* Need to AddMap the framebuffer and mmio regions here:
*/
if (drmAddMap(ctx->drmFD,
- (drmHandle)ctx->FBStart,
+ (drm_handle_t)ctx->FBStart,
ctx->FBSize,
DRM_FRAME_BUFFER,
#ifndef _EMBEDDED
typedef void (*via_point_func)(viaContextPtr, viaVertex *);
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
GLuint offset;
GLuint index;
} viaBuffer, *viaBufferPtr;
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
GLuint offset;
GLuint index;
drm_clip_rect_t drawRect;
drm_clip_rect_t scissorRect;
- drmContext hHWContext;
+ drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
#ifndef _SOLO
} VIASAREAPriv;
typedef struct {
- drmHandle handle;
+ drm_handle_t handle;
drmSize size;
drmAddress map;
} viaRegion, *viaRegionPtr;
return -errno;
}
- if (drmMap(fd,(drmHandle)buf->index,
+ if (drmMap(fd,(drm_handle_t)buf->index,
buf->size,(drmAddressPtr)(&buf->address)) < 0) {
return -errno;
}