summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--unichrome/via_driver.c16
2 files changed, 19 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0814f81..0a7274b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-06 Benno Schulenberg <bensberg-at-justemail-dot-net>
+
+ * unichrome/via_driver.c:
+
+ Try CR39 when CR34 says zero during memory detection on
+ the CLE266. Idea from Luc Verhaegen, patch by Mark Huijgen
+ <mark-dot-sf-dot-net-at-huijgen-dot-tk>.
+
2007-01-20 Benno Schulenberg <bensberg-at-justemail-dot-net>
* ChangeLog
diff --git a/unichrome/via_driver.c b/unichrome/via_driver.c
index cf038bd..47af56b 100644
--- a/unichrome/via_driver.c
+++ b/unichrome/via_driver.c
@@ -1350,11 +1350,16 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags)
}
}
- /* detect amount of installed ram */
+ /* Detect amount of installed RAM */
if (pScrn->videoRam < 16384 || pScrn->videoRam > 65536) {
- if(pVia->Chipset == VIA_CLE266)
+ if(pVia->Chipset == VIA_CLE266) {
bMemSize = hwp->readSeq(hwp, 0x34);
- else
+ if (!bMemSize) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "CR34 says nothing; trying CR39.\n");
+ bMemSize = hwp->readSeq(hwp, 0x39);
+ }
+ } else
bMemSize = hwp->readSeq(hwp, 0x39);
if (bMemSize > 16 && bMemSize <= 128)
@@ -1362,8 +1367,9 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags)
else if (bMemSize > 0 && bMemSize < 31)
pScrn->videoRam = bMemSize << 12;
else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Memory size detection failed: using 16MB\n");
- pScrn->videoRam = 16 << 10; /* Assume the base 16Mb */
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Memory size detection failed: using 16MB.\n");
+ pScrn->videoRam = 16 << 10; /* Assume the basic 16MB */
}
}