diff options
author | Eric Anholt <anholt@freebsd.org> | 2006-03-09 06:06:25 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2006-03-09 06:06:25 +0000 |
commit | daf6a54ec89dbe9f943c02f9ba5cea20b02e66a8 (patch) | |
tree | 69e317ef510ffed3175f42c37624a3ddf5b14d41 | |
parent | 4778b0724cb0edb53e110d4774ec7af26d6348bc (diff) |
Update drivers that support EXA for the new EXA ABI. This consists ofi128-1_2_0XORG-7_1
moving all the accel and card members into the driver ptr, filling in
the exa_major/ exa_minor fields, and always using LoadSubModule so we
can check the module version up front. Only tested on ATI.
-rw-r--r-- | src/i128_driver.c | 12 | ||||
-rw-r--r-- | src/i128exa.c | 50 |
2 files changed, 32 insertions, 30 deletions
diff --git a/src/i128_driver.c b/src/i128_driver.c index e0aadb7..5c095cf 100644 --- a/src/i128_driver.c +++ b/src/i128_driver.c @@ -197,10 +197,10 @@ static const char *fbSymbols[] = { }; static const char *exaSymbols[] = { + "exaDriverAlloc", "exaDriverInit", "exaDriverFini", "exaGetPixmapOffset", - "exaGetVersion", NULL }; @@ -1189,7 +1189,15 @@ I128PreInit(ScrnInfoPtr pScrn, int flags) /* Load the acceleration engine */ if (!pI128->NoAccel) { if (pI128->exa) { - if (!xf86LoadSubModule(pScrn, "exa")) { + XF86ModReqInfo req; + int errmaj, errmin; + + req.majorversion = 2; + req.minorversion = 0; + if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req, + &errmaj, &errmin)) + { + LoaderErrorMsg(NULL, "exa", errmaj, errmin); I128FreeRec(pScrn); return FALSE; } else xf86LoaderReqSymLists(exaSymbols, NULL); diff --git a/src/i128exa.c b/src/i128exa.c index 598a427..a2d6c7e 100644 --- a/src/i128exa.c +++ b/src/i128exa.c @@ -602,51 +602,45 @@ I128ExaInit(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; I128Ptr pI128 = I128PTR(pScrn); - if (exaGetVersion() < EXA_MAKE_VERSION(0, 2, 0)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "EXA version is too old " - "(got 0x%3x, need >= 0x020)\n", exaGetVersion()); - return FALSE; - } - - if (!(pExa = xf86calloc(1, sizeof(*pExa)))) { + if (!(pExa = exaDriverAlloc())) { pI128->NoAccel = TRUE; return FALSE; } pI128->ExaDriver = pExa; - pExa->card.flags = EXA_OFFSCREEN_PIXMAPS | EXA_OFFSCREEN_ALIGN_POT; - pExa->card.memoryBase = pI128->MemoryPtr; - pExa->card.memorySize = pI128->MemorySize * 1024; - pExa->card.offScreenBase = (pScrn->virtualX * pScrn->virtualY) * + pExa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_OFFSCREEN_ALIGN_POT; + pExa->memoryBase = pI128->MemoryPtr; + pExa->memorySize = pI128->MemorySize * 1024; + pExa->offScreenBase = (pScrn->virtualX * pScrn->virtualY) * (pScrn->bitsPerPixel / 8) + 4096; /* these two are probably right */ - pExa->card.pixmapOffsetAlign = 16; - pExa->card.pixmapPitchAlign = 16; + pExa->pixmapOffsetAlign = 16; + pExa->pixmapPitchAlign = 16; /* these two are guesses */ - pExa->card.maxX = 2048; - pExa->card.maxY = 2048; + pExa->maxX = 2048; + pExa->maxY = 2048; - pExa->accel.WaitMarker = i128WaitMarker; + pExa->WaitMarker = i128WaitMarker; - pExa->accel.PrepareSolid = i128PrepareSolid; - pExa->accel.Solid = i128Solid; - pExa->accel.DoneSolid = i128Done; + pExa->PrepareSolid = i128PrepareSolid; + pExa->Solid = i128Solid; + pExa->DoneSolid = i128Done; - pExa->accel.PrepareCopy = i128PrepareCopy; - pExa->accel.Copy = i128Copy; - pExa->accel.DoneCopy = i128Done; + pExa->PrepareCopy = i128PrepareCopy; + pExa->Copy = i128Copy; + pExa->DoneCopy = i128Done; if (0 && (pI128->Chipset == PCI_CHIP_I128_T2R || pI128->Chipset == PCI_CHIP_I128_T2R4)) { #if 0 - pExa->accel.DownloadFromScreen = i128DownloadFromScreen; - pExa->accel.UploadToScreen = i128UploadToScreen; + pExa->DownloadFromScreen = i128DownloadFromScreen; + pExa->UploadToScreen = i128UploadToScreen; #endif - pExa->accel.CheckComposite = i128CheckComposite; - pExa->accel.PrepareComposite = i128PrepareComposite; - pExa->accel.Composite = i128Composite; - pExa->accel.DoneComposite = i128Done; + pExa->CheckComposite = i128CheckComposite; + pExa->PrepareComposite = i128PrepareComposite; + pExa->Composite = i128Composite; + pExa->DoneComposite = i128Done; } /* |