From 59774e9aca2d743e82d616bb644d20ff6d60d492 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 29 Jul 2008 22:57:09 -0700 Subject: Add UXA - the unified memory acceleration architecture. This eliminates the cost of EXA migration management while providing full pixmap allocation control to the driver. The goal is to make something useful for UMA drivers. --- src/i830_accel.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'src/i830_accel.c') diff --git a/src/i830_accel.c b/src/i830_accel.c index c3cd08e0..579de31c 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -67,12 +67,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. unsigned long intel_get_pixmap_offset(PixmapPtr pPix) { +#ifdef I830_USE_EXA ScreenPtr pScreen = pPix->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); -#ifdef I830_USE_EXA - if (pI830->useEXA) + if (pI830->accel == ACCEL_EXA) return exaGetPixmapOffset(pPix); #endif return (unsigned long)pPix->devPrivate.ptr - (unsigned long)pI830->FbBase; @@ -81,17 +81,15 @@ intel_get_pixmap_offset(PixmapPtr pPix) unsigned long intel_get_pixmap_pitch(PixmapPtr pPix) { +#ifdef I830_USE_EXA ScreenPtr pScreen = pPix->drawable.pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); -#ifdef I830_USE_EXA - if (pI830->useEXA) + if (pI830->accel == ACCEL_EXA) return exaGetPixmapPitch(pPix); #endif -#ifdef I830_USE_XAA return (unsigned long)pPix->devKind; -#endif } int @@ -150,6 +148,9 @@ I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis) #endif #ifdef I830_USE_EXA pI830->EXADriverPtr = NULL; +#endif +#ifdef I830_USE_UXA + pI830->uxa_driver = NULL; #endif FatalError("lockup\n"); } @@ -176,7 +177,7 @@ I830Sync(ScrnInfoPtr pScrn) if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC)) ErrorF("I830Sync\n"); - if (pI830->noAccel) + if (pI830->accel == ACCEL_NONE) return; #ifdef XF86DRI @@ -278,15 +279,25 @@ I830SelectBuffer(ScrnInfoPtr pScrn, int buffer) Bool I830AccelInit(ScreenPtr pScreen) { -#ifdef I830_USE_EXA ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); - if (pI830->useEXA) + switch (pI830->accel) { +#ifdef I830_USE_UXA + case ACCEL_UXA: + return i830_uxa_init(pScreen); +#endif +#ifdef I830_USE_EXA + case ACCEL_EXA: return I830EXAInit(pScreen); #endif #ifdef I830_USE_XAA - return I830XAAInit(pScreen); + case ACCEL_XAA: + return I830XAAInit(pScreen); #endif + case ACCEL_UNINIT: + case ACCEL_NONE: + break; + } return FALSE; } -- cgit v1.2.3