summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/dri')
-rw-r--r--hw/xfree86/dri/dri.c144
-rw-r--r--hw/xfree86/dri/dri.h26
-rw-r--r--hw/xfree86/dri/drimodule.c4
-rw-r--r--hw/xfree86/dri/dristruct.h14
-rw-r--r--hw/xfree86/dri/sarea.h2
-rw-r--r--hw/xfree86/dri/xf86dri.c23
6 files changed, 147 insertions, 66 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index acef4c54b..4748f17df 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -34,8 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#ifdef XFree86LOADER
#include "xf86.h"
+#ifdef XFree86LOADER
#include "xf86_ansic.h"
#else
#include <sys/time.h>
@@ -57,6 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _XF86DRI_SERVER_
#include "xf86dristr.h"
#include "swaprep.h"
+#include "xf86str.h"
#include "dri.h"
#include "sarea.h"
#include "dristruct.h"
@@ -113,11 +114,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 +152,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 +211,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 +295,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 +484,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 +635,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 +646,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 +680,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 +705,7 @@ DRICreateContextPriv(ScreenPtr pScreen,
DRIContextPrivPtr
DRICreateContextPrivFromHandle(ScreenPtr pScreen,
- drmContext hHWContext,
+ drm_context_t hHWContext,
DRIContextFlags flags)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -720,8 +780,8 @@ static Bool
DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- __GLXscreenInfo *pGLXScreen = &__glXActiveScreens[pScreen->myNum];
- __GLXvisualConfig *pGLXVis = pGLXScreen->pGlxVisual;
+ __GLXscreenInfo *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
+ __GLcontextModes *modes = pGLXScreen->modes;
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
DRIContextPrivPtr pDRIContextPriv;
void *contextStore;
@@ -734,7 +794,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 +841,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;
+ __GLXscreenInfo *pGLXScreen = __glXgetActiveScreen(pScreen->myNum);
+ __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 +859,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 +988,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 +1005,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 +1125,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 +1225,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 */
@@ -1222,7 +1282,7 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
Bool
DRIGetDeviceInfo(ScreenPtr pScreen,
- drmHandlePtr hFrameBuffer,
+ drm_handle_t * hFrameBuffer,
int* fbOrigin,
int* fbSize,
int* fbStride,
@@ -1870,7 +1930,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 +2027,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 +2175,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 149534417..f556d261e 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/drimodule.c b/hw/xfree86/dri/drimodule.c
index 1a6a4c696..1fa7a8edc 100644
--- a/hw/xfree86/dri/drimodule.c
+++ b/hw/xfree86/dri/drimodule.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/GL/dri/drimodule.c,v 1.1.4.1.4.2 2004/03/04 17:47:18 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/GL/dri/drimodule.c,v 1.2 2004/04/23 18:44:36 eich Exp $ */
/**************************************************************************
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -44,7 +44,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION,
diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h
index 6d90d770a..cf1b1eacf 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 d4d83df93..77c16e0ef 100644
--- a/hw/xfree86/dri/sarea.h
+++ b/hw/xfree86/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/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index bc8a17ad2..ae5a6d608 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -35,8 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#ifdef XFree86LOADER
#include "xf86.h"
+#ifdef XFree86LOADER
#include "xf86_ansic.h"
#endif
@@ -54,6 +54,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _XF86DRI_SERVER_
#include "xf86dristr.h"
#include "swaprep.h"
+#include "xf86str.h"
#include "dri.h"
#include "sarea.h"
#include "dristruct.h"
@@ -184,7 +185,7 @@ ProcXF86DRIOpenConnection(
)
{
xXF86DRIOpenConnectionReply rep;
- drmHandle hSAREA;
+ drm_handle_t hSAREA;
char* busIdString;
REQUEST(xXF86DRIOpenConnectionReq);
@@ -340,7 +341,7 @@ ProcXF86DRICreateContext(
if (!DRICreateContext( pScreen,
visual,
stuff->context,
- (drmContextPtr)&rep.hHWContext)) {
+ (drm_context_t *)&rep.hHWContext)) {
return BadValue;
}
@@ -397,7 +398,7 @@ ProcXF86DRICreateDrawable(
if (!DRICreateDrawable( screenInfo.screens[stuff->screen],
(Drawable)stuff->drawable,
pDrawable,
- (drmDrawablePtr)&rep.hHWDrawable)) {
+ (drm_drawable_t *)&rep.hHWDrawable)) {
return BadValue;
}
@@ -442,8 +443,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 +493,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 +504,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 +523,7 @@ ProcXF86DRIGetDeviceInfo(
)
{
xXF86DRIGetDeviceInfoReply rep;
- drmHandle hFrameBuffer;
+ drm_handle_t hFrameBuffer;
void *pDevPrivate;
REQUEST(xXF86DRIGetDeviceInfoReq);