diff options
author | Luc Verhaegen <libv@skynet.be> | 2005-10-10 04:47:46 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2005-10-10 04:47:46 +0000 |
commit | eb74d5cb108ecca8ddd88dcffd115813245afe27 (patch) | |
tree | 2d13604e41b63aed6b96b4d6dd575942e7ea860b | |
parent | b2743c68db9f1b30ec7f121b14eb058612e07faf (diff) |
[devel-MemorySize_fallback] When CR34 is not set on VT3122, try using CR39
instead. (Brad Davis).
-rw-r--r-- | src/via_driver.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/via_driver.c b/src/via_driver.c index 0727ed1..fda5a9a 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -677,7 +677,7 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) const char *reqSym = NULL; #endif vgaHWPtr hwp; - int i, bMemSize = 0; + int i; VIAFUNC(pScrn->scrnIndex); @@ -1259,10 +1259,17 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) /* detect amount of installed ram */ if (pScrn->videoRam < 16384 || pScrn->videoRam > 65536) { + int bMemSize = 0; + if (pVia->Chipset == VT3122) bMemSize = hwp->readSeq(hwp, 0x34); - else + + if (!bMemSize) { + if (pVia->Chipset == VT3122) + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "videoRam: BIOS didn't" + " set up CR34 properly. Trying CR39.\n"); bMemSize = hwp->readSeq(hwp, 0x39); + } if (bMemSize > 16 && bMemSize <= 128) pScrn->videoRam = (bMemSize + 1) << 9; |