diff options
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c index 6aabc62c3..b379022af 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c @@ -148,12 +148,7 @@ static void MGASave(ScrnInfoPtr pScrn); static void MGARestore(ScrnInfoPtr pScrn); static Bool MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); -#define VERSION 4000 -#define MGA_NAME "MGA" -#define MGA_DRIVER_NAME "mga" -#define MGA_MAJOR_VERSION 1 -#define MGA_MINOR_VERSION 0 -#define MGA_PATCHLEVEL 0 + /* * This contains the functions needed by the server after loading the @@ -164,7 +159,7 @@ static Bool MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); */ DriverRec MGA = { - VERSION, + MGA_VERSION, MGA_DRIVER_NAME, #if 0 "accelerated driver for Matrox Millennium and Mystique cards", @@ -298,31 +293,23 @@ static const char *ramdacSymbols[] = { #ifdef XF86DRI static const char *drmSymbols[] = { + "drmAvailable", "drmAddBufs", "drmAddMap", - "drmAvailable", - "drmCtlAddCommand", "drmCtlInstHandler", "drmGetInterruptFromBusID", - "drmMapBufs", - "drmMarkBufs", - "drmUnmapBufs", "drmAgpAcquire", "drmAgpRelease", "drmAgpEnable", "drmAgpAlloc", "drmAgpFree", "drmAgpBind", - "drmAgpUnbind", - "drmAgpVersionMajor", - "drmAgpVersionMinor", "drmAgpGetMode", "drmAgpBase", "drmAgpSize", - "drmAgpMemoryUsed", - "drmAgpMemoryAvail", - "drmAgpVendorId", - "drmAgpDeviceId", + "drmMgaCleanupDma", + "drmMgaLockUpdate", + "drmMgaInitDma", NULL }; @@ -601,7 +588,7 @@ MGAProbe(DriverPtr drv, int flags) pScrn = xf86AllocateScreen(drv, 0); /* Fill in what we can of the ScrnInfoRec */ - pScrn->driverVersion = VERSION; + pScrn->driverVersion = MGA_VERSION; pScrn->driverName = MGA_DRIVER_NAME; pScrn->name = MGA_NAME; pScrn->Probe = MGAProbe; @@ -794,7 +781,7 @@ static void MGASoftReset(ScrnInfoPtr pScrn) { MGAPtr pMga = MGAPTR(pScrn); - int i; +/* int i; */ pMga->FbMapSize = 8192 * 1024; MGAMapMem(pScrn); @@ -1065,7 +1052,7 @@ VgaIOEnable(void *arg) extern xf86MonPtr ConfiguredMonitor; -void +static void MGAProbeDDC(ScrnInfoPtr pScrn, int index) { vbeInfoPtr pVbe; @@ -1261,7 +1248,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) if (pScrn->depth == 8) pScrn->rgbBits = 8; - /* * Set the Chipset and ChipRev, allowing config file entries to * override. @@ -1305,8 +1291,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) } xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset); - - from = X_DEFAULT; pMga->HWCursor = TRUE; /* @@ -2142,13 +2126,14 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) #ifdef XF86DRI if (pMga->directRenderingEnabled) { - DRILock(screenInfo.screens[pScrn->scrnIndex]); - MGASwapContext(screenInfo.screens[pScrn->scrnIndex]); + DRILock(screenInfo.screens[pScrn->scrnIndex], 0); +/* MGADRISwapContext(screenInfo.screens[pScrn->scrnIndex]); */ } #endif (*pMga->Restore)(pScrn, vgaReg, mgaReg, FALSE); - + + MGAStormSync(pScrn); /* JEFF - Check */ MGAStormEngineInit(pScrn); vgaHWProtect(pScrn, FALSE); @@ -2322,10 +2307,10 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) * is called. cfbScreenInit will eventually call into the drivers * InitGLXVisuals call back. */ - - pMga->directRenderingEnabled = MGADRIScreenInit(pScreen); - /* Force the initialization of the context */ - MGALostContext(pScreen); + if (!pMga->NoAccel) + pMga->directRenderingEnabled = MGADRIScreenInit(pScreen); + else + pMga->directRenderingEnabled = FALSE; #endif @@ -2625,7 +2610,7 @@ MGALeaveVT(int scrnIndex, int flags) pMGA = MGAPTR(pScrn); if (pMGA->directRenderingEnabled) { pScreen = screenInfo.screens[scrnIndex]; - DRILock(pScreen); + DRILock(pScreen, 0); } #endif |