diff options
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c index e39828343..50a982597 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.40 2000/08/04 16:13:32 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/r128/r128_driver.c,v 1.46 2000/09/20 00:09:26 keithp Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -120,6 +120,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r128_sarea.h" #endif +#ifdef RENDER +#include "picturestr.h" +#endif /* Driver data structures */ #include "ati2.h" #include "r128.h" @@ -245,10 +248,7 @@ R128RAMRec R128RAM[] = { /* Memory Specifications extern const char *vgahwSymbols[]; extern const char *fbdevHWSymbols[]; -#if 0 extern const char *ddcSymbols[]; -extern const char *i2cSymbols[]; -#endif /* Allocate our private R128InfoRec. */ static Bool R128GetRec(ScrnInfoPtr pScrn) @@ -977,33 +977,19 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn) static Bool R128PreInitDDC(ScrnInfoPtr pScrn) { - /* FIXME: DDC support goes here. */ -#if 0 - /* Using the GPIO_MONID register for DDC2 - does not appear to work as expected. - Hence, the implementation of DDC is - deferred. */ R128InfoPtr info = R128PTR(pScrn); - Bool ret = TRUE; - + vbeInfoPtr pVbe; + if (!xf86LoadSubModule(pScrn, "ddc")) return FALSE; xf86LoaderReqSymLists(ddcSymbols, NULL); - if (!xf86LoadSubModule(pScrn, "i2c")) return FALSE; - xf86LoaderReqSymLists(i2cSymbols, NULL); - - R128MapMMIO(pScrn); - if (!R128I2CInit(pScrn)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I2C initialization failed\n"); - ret = FALSE; - } else { - xf86SetDDCProperties(pScrn,xf86PrintEDID( - xf86DoEDID_DDC2(pScrn->scrnIndex, info->i2c))); - } - R128UnmapMMIO(pScrn); - return ret; -#else - return TRUE; -#endif + if (xf86LoadSubModule(pScrn, "vbe")) { + pVbe = VBEInit(NULL,info->pEnt->index); + if (!pVbe) return FALSE; + + xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(pVbe,NULL))); + return TRUE; + } else + return FALSE; } /* This is called by R128PreInit to initialize gamma correction. */ @@ -1094,6 +1080,11 @@ static Bool R128PreInitModes(ScrnInfoPtr pScrn) #endif if (mod && !xf86LoadSubModule(pScrn, mod)) return FALSE; xf86LoaderReqSymbols(Sym, NULL); +#ifdef USE_FB +#ifdef RENDER + xf86LoaderReqSymbols("fbPictureInit", NULL); +#endif +#endif info->CurrentLayout.displayWidth = pScrn->displayWidth; info->CurrentLayout.mode = pScrn->currentMode; @@ -1471,7 +1462,8 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; - + miSetPixmapDepths (); + #ifdef XF86DRI /* Setup DRI after visuals have been established, but before cfbScreenInit is @@ -1511,6 +1503,9 @@ static Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) return FALSE; +#ifdef RENDER + fbPictureInit (pScreen, 0, 0); +#endif #else switch (pScrn->bitsPerPixel) { case 8: |