diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-29 18:39:54 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-29 18:39:54 -0200 |
commit | 97eb5da1040ca7882e60b86ffaf25b6c021a3df5 (patch) | |
tree | d001fa682b6ffd277d61fd3686b40f5f49c6631a /src/smi_driver.c | |
parent | deb2f845dd370ba819d02cb21b8a481827497af6 (diff) |
Use util-macros XORG_CHANGELOG and XORG_CWARNFLAGS.
Also correct only compilation warning about possibly
uninitialized variable.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r-- | src/smi_driver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index 12b618f..28cecf3 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1247,10 +1247,8 @@ SMI_DetectMCLK(ScrnInfoPtr pScrn) if (IS_MSOC(pSmi)) { clock.value = READ_SCR(pSmi, CURRENT_CLOCK); if (xf86GetOptValFreq(pSmi->Options, OPTION_MXCLK, - OPTUNITS_MHZ, &real)) { + OPTUNITS_MHZ, &real)) pSmi->MXCLK = (int)(real * 1000.0); - mxclk = pSmi->MXCLK; - } } /* Already programmed MCLK */ @@ -1282,10 +1280,13 @@ SMI_DetectMCLK(ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MCLK = %1.3f\n", mclk / 1000.0); if (IS_MSOC(pSmi)) { - if (pSmi->MXCLK == 0) + if (pSmi->MXCLK == 0) { mxclk = ((clock.f.m1_select ? 336 : 288) / ((clock.f.m1_divider ? 3 : 1) << (unsigned)clock.f.m1_shift)) * 1000; + } + else + mxclk = pSmi->MXCLK; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MXCLK = %1.3f\n", mxclk / 1000.0); } } |