summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:06 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-15 16:34:06 +0000
commitfacdf2486cc03024cd7fc8f76325419c02ad9267 (patch)
treee7c63d45f294a81a0e7550d5926c01710a4d8f9f
parent2570065924dae394595dd3b3180687572612dfad (diff)
-rw-r--r--src/tdfx_dri.c24
-rw-r--r--src/tdfx_dri.h2
-rw-r--r--src/tdfx_driver.c3
-rw-r--r--src/tdfx_video.c2
4 files changed, 18 insertions, 13 deletions
diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
index 2fc9d16..1757ae4 100644
--- a/src/tdfx_dri.c
+++ b/src/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,
@@ -329,11 +329,15 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
pDRIInfo->drmDriverName = TDFXKernelDriverName;
pDRIInfo->clientDriverName = TDFXClientDriverName;
- pDRIInfo->busIdString = xalloc(64);
- sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
- ((pciConfigPtr)pTDFX->PciInfo->thisCard)->busnum,
- ((pciConfigPtr)pTDFX->PciInfo->thisCard)->devnum,
- ((pciConfigPtr)pTDFX->PciInfo->thisCard)->funcnum);
+ if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+ pDRIInfo->busIdString = DRICreatePCIBusID(pTDFX->PciInfo);
+ } else {
+ pDRIInfo->busIdString = xalloc(64);
+ sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
+ ((pciConfigPtr)pTDFX->PciInfo->thisCard)->busnum,
+ ((pciConfigPtr)pTDFX->PciInfo->thisCard)->devnum,
+ ((pciConfigPtr)pTDFX->PciInfo->thisCard)->funcnum);
+ }
pDRIInfo->ddxDriverMajorVersion = TDFX_MAJOR_VERSION;
pDRIInfo->ddxDriverMinorVersion = TDFX_MINOR_VERSION;
pDRIInfo->ddxDriverPatchVersion = TDFX_PATCHLEVEL;
@@ -429,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");
@@ -470,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/src/tdfx_dri.h b/src/tdfx_dri.h
index ecd4022..98c6733 100644
--- a/src/tdfx_dri.h
+++ b/src/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/src/tdfx_driver.c b/src/tdfx_driver.c
index 7957aab..968ce95 100644
--- a/src/tdfx_driver.c
+++ b/src/tdfx_driver.c
@@ -264,6 +264,7 @@ static const char *driSymbols[] = {
"DRIScreenInit",
"DRIUnlock",
"GlxSetVisualConfigs",
+ "DRICreatePCIBusID",
NULL
};
@@ -279,7 +280,7 @@ static XF86ModuleVersionInfo tdfxVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
TDFX_MAJOR_VERSION, TDFX_MINOR_VERSION, TDFX_PATCHLEVEL,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
diff --git a/src/tdfx_video.c b/src/tdfx_video.c
index 09983f4..04b3cac 100644
--- a/src/tdfx_video.c
+++ b/src/tdfx_video.c
@@ -796,7 +796,7 @@ TDFXDisplayVideoOverlay(
int dudx, dvdy;
dudx = (src_w << 20) / drw_w;
- /* subract 1 to eliminate garbage on last line */
+ /* subtract 1 to eliminate garbage on last line */
dvdy = (( src_h - 1 )<< 20) / drw_h;
offset += ((left >> 16) & ~1) << 1;