summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@justemail.net>2007-02-06 15:16:43 +0000
committerBenno Schulenberg <bensberg@justemail.net>2007-02-06 15:16:43 +0000
commitcb6b0ecd0fd994c4d73e913265116c6de63f5df0 (patch)
treef0346d7f684bf8bcbeecc856fd73d5ba7e93b5e0
parent9a9efd849d24ed8a51827385de6cb8ecae0cdfe7 (diff)
Try CR39 when CR34 says zero during memory detection on the CLE266.
-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 */
}
}