xf86-video-ati: Branch 'master'
Alex Deucher
agd5f at kemper.freedesktop.org
Mon Jan 4 10:18:39 PST 2010
src/legacy_output.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
New commits:
commit 48aa5064aff4b9adf768e480df2312d4375e9c40
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Mon Jan 4 11:05:44 2010 -0500
radeon: fix LVDS power sequence on Mac cards
Noticed by John R. Dunning. Fix taken from radeonfb.
I'm not sure if this sequence would be useful on any PC
laptops or not so make it mac specific for now.
diff --git a/src/legacy_output.c b/src/legacy_output.c
index 186cd25..fe0fbe3 100644
--- a/src/legacy_output.c
+++ b/src/legacy_output.c
@@ -912,6 +912,11 @@ legacy_output_dpms(xf86OutputPtr output, int mode)
ErrorF("enable LVDS\n");
tmp = INREG(RADEON_LVDS_GEN_CNTL);
tmp |= (RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
+#if defined(__powerpc__)
+ /* not sure if this is needed on non-Macs */
+ if (info->MacModel)
+ tmp |= RADEON_LVDS_BL_MOD_EN;
+#endif
tmp &= ~(RADEON_LVDS_DISPLAY_DIS);
usleep (lvds->PanelPwrDly * 1000);
OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
@@ -1001,10 +1006,24 @@ legacy_output_dpms(xf86OutputPtr output, int mode)
*/
OUTPLLP(pScrn, RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
}
- tmp = INREG(RADEON_LVDS_GEN_CNTL);
- tmp |= RADEON_LVDS_DISPLAY_DIS;
- tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
- OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
+#if defined(__powerpc__)
+ /* not sure if this is needed on non-Macs */
+ if (info->MacModel) {
+ tmp = INREG(RADEON_LVDS_GEN_CNTL);
+ tmp |= RADEON_LVDS_DISPLAY_DIS;
+ tmp &= ~RADEON_LVDS_BL_MOD_EN;
+ OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
+ usleep(100);
+ tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN);
+ OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
+ } else
+#endif
+ {
+ tmp = INREG(RADEON_LVDS_GEN_CNTL);
+ tmp |= RADEON_LVDS_DISPLAY_DIS;
+ tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
+ OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
+ }
save->lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
save->lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
if (info->IsMobility || info->IsIGP) {
More information about the xorg-commit
mailing list