diff options
author | Julien Cristau <jcristau@debian.org> | 2012-01-03 23:35:18 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2012-01-03 23:41:32 +0100 |
commit | 9223c44a731f48c66c226eb88dcb6f9d574cb599 (patch) | |
tree | 9845951793ca695900cb673d8f473c669e4083dd | |
parent | cc9d2e808de20723c9035952242d966455d583b7 (diff) |
When we can't load the xaa or exa modules, use shadowfb instead
Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | src/mga_driver.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c index ae36378..00469e7 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -2101,6 +2101,31 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) } } + /* Load XAA if needed */ + if (!pMga->NoAccel) { +#ifdef USE_EXA + if (pMga->Exa) { + if (!xf86LoadSubModule(pScrn, "exa")) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Falling back to shadowfb\n"); + pMga->ShadowFB = TRUE; + pMga->NoAccel = TRUE; + } + } else { +#endif +#ifdef USE_XAA + if (!xf86LoadSubModule(pScrn, "xaa")) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Falling back to shadowfb\n"); + pMga->ShadowFB = TRUE; + pMga->NoAccel = TRUE; + } +#endif +#ifdef USE_EXA + } +#endif + } + switch (pMga->Chipset) { case PCI_CHIP_MGA2064: case PCI_CHIP_MGA2164: @@ -2596,27 +2621,6 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) return FALSE; } - /* Load XAA if needed */ - if (!pMga->NoAccel) { -#ifdef USE_EXA - if (pMga->Exa) { - if (!xf86LoadSubModule(pScrn, "exa")) { - MGAFreeRec(pScrn); - return FALSE; - } - } else { -#endif -#ifdef USE_XAA - if (!xf86LoadSubModule(pScrn, "xaa")) { - MGAFreeRec(pScrn); - return FALSE; - } -#endif -#ifdef USE_EXA - } -#endif - } - /* Load ramdac if needed */ if (pMga->HWCursor) { if (!xf86LoadSubModule(pScrn, "ramdac")) { |