diff options
author | Francisco Jerez <currojerez@riseup.net> | 2009-05-27 01:23:36 +0200 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2009-05-27 01:23:36 +0200 |
commit | 536e5df957698251206326edc5a13e833f7c72b1 (patch) | |
tree | e7382a1ff5914b19f5e91e3473b72b9d4e935430 /src | |
parent | 6a370fa2b6b8fcbd556dd6f9bf92872e9bea23e8 (diff) |
Program MCLK/MXCLK on startup for a secondary SM502.
This should allow using a SM502 as secondary display
device (bug 21810).
Diffstat (limited to 'src')
-rw-r--r-- | src/smi_driver.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index b788ed6..985563b 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1250,10 +1250,21 @@ SMI_DetectMCLK(ScrnInfoPtr pScrn) /* The SM712 can be safely clocked up to 157MHz, according to Silicon Motion engineers. */ pSmi->MCLK = 157000; - }else - pSmi->MCLK = 0; - pSmi->MXCLK = 0; + } else if (IS_MSOC(pSmi)) { + /* Set some sane defaults for the clock settings if we are on a + SM502 and it's likely to be uninitialized. */ + + if (!xf86IsPrimaryPci(pSmi->PciInfo) && + (READ_SCR(pSmi, DEVICE_ID) & 0xFF) >= 0xC0) { + pSmi->MCLK = 112000; + pSmi->MXCLK = 144000; + } + + } else { + pSmi->MCLK = 0; + pSmi->MXCLK = 0; + } /* MCLK from user settings */ if (xf86GetOptValFreq(pSmi->Options, OPTION_MCLK, OPTUNITS_MHZ, &real)) { |