summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-30 19:05:40 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-30 19:05:40 -0200
commite5cd9e4640555b9a3d4fab205e4b77faaca89d89 (patch)
tree501ec0b779ad74d4a6bd37b75fa4aef5856202f9
parent5acf7e22c256637ba7139733cdba1c59557dd7ff (diff)
Update memory detection for MSOC.
Use "local memory" field of mmio 0x010 and not "system memory", as it uses system memory values whenever there is a choice (just sets bits to zero).
-rw-r--r--src/smi_501.h2
-rw-r--r--src/smi_driver.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/smi_501.h b/src/smi_501.h
index ca49813..ddee5c5 100644
--- a/src/smi_501.h
+++ b/src/smi_501.h
@@ -41,7 +41,7 @@ authorization from the XFree86 Project and Silicon Motion.
#define bits(lo, hi) hi + 1 - lo
-#define DRAM_CONTROL 0x000010
+#define DRAM_CTL 0x000010
#define CMD_STATUS 0x000024
/* contents of either power0_clock or power1_clock */
diff --git a/src/smi_driver.c b/src/smi_driver.c
index b3dff95..299772a 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1408,11 +1408,11 @@ SMI_DetectMem(ScrnInfoPtr pScrn)
unsigned char config;
static int lynx3d_table[4] = { 0, 2, 4, 6 };
static int lynx3dm_table[4] = { 16, 2, 4, 8 };
- static int msoc_table[8] = { 2, 4, 0, 0, 64, 32, 16, 8 };
+ static int msoc_table[8] = { 4, 8, 16, 32, 64, 2, 0, 0 };
static int default_table[4] = { 1, 2, 4, 0 };
if (IS_MSOC(pSmi)) {
- config = (READ_SCR(pSmi, DRAM_CONTROL) >> 24) & 7;
+ config = (READ_SCR(pSmi, DRAM_CTL) >> 13) & 7;
pSmi->videoRAMKBytes = msoc_table[config] * 1024 - FB_RESERVE4USB;
}
else {