diff options
author | Hong Liu <hong.liu@intel.com> | 2008-02-04 17:14:23 +0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-05 11:06:33 -0800 |
commit | 4e5c7ad8bdee98bd23a7066f57d0942e64a415fd (patch) | |
tree | c2a37ff7b7c93e4c33021815d368a707de155faf | |
parent | ba619ef92b1b1303d8cf76ebd68dea978d17eb7a (diff) | |
download | xorg-driver-xf86-video-intel-4e5c7ad8bdee98bd23a7066f57d0942e64a415fd.tar.gz |
Bug 10773: fix i8xx pll p2 value in i830_crtc_clock_get()
Also fix debug dump, slightly modified to use macro instead.
-rw-r--r-- | src/i830_debug.c | 6 | ||||
-rw-r--r-- | src/i830_display.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/i830_debug.c b/src/i830_debug.c index 8f8ef9bb..5b70cd9c 100644 --- a/src/i830_debug.c +++ b/src/i830_debug.c @@ -191,7 +191,11 @@ DEBUGSTRING(i830_debug_dpll) mode = "LVDS"; p1 = ffs((val & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >> DPLL_FPA01_P1_POST_DIV_SHIFT); - p2 = 14; + if ((INREG(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP) + p2 = I8XX_P2_LVDS_SLOW; + else + p2 = I8XX_P2_LVDS_FAST; + } else { mode = "DAC/serial"; if (val & PLL_P1_DIVIDE_BY_TWO) { diff --git a/src/i830_display.c b/src/i830_display.c index f61d3c40..e8de1a4d 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1623,7 +1623,11 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc) if (is_lvds) { clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS) >> DPLL_FPA01_P1_POST_DIV_SHIFT); - clock.p2 = 14; + + if ((INREG(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP) + clock.p2 = I8XX_P2_LVDS_SLOW; + else + clock.p2 = I8XX_P2_LVDS_FAST; if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN) i8xx_clock(66000, &clock); /* XXX: might not be 66MHz */ |