aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-06-17 12:28:38 -0400
committerDave Airlie <airlied@redhat.com>2009-06-18 19:30:06 -0400
commit8b5c744485b75d940ccb1c83c9a358b20eb91346 (patch)
treeba72b962795e61805ae28928b4985932e00dbed3 /drivers/gpu
parent4e484e7dc5856ff5086b6329d82e36d4adaf1f02 (diff)
drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.
This makes the panel on my PowerBook light up. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 06e8038bc4ac..afc4db280b94 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -799,6 +799,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
799 struct radeon_encoder_lvds *lvds = NULL; 799 struct radeon_encoder_lvds *lvds = NULL;
800 uint32_t fp_vert_stretch, fp_horz_stretch; 800 uint32_t fp_vert_stretch, fp_horz_stretch;
801 uint32_t ppll_div_sel, ppll_val; 801 uint32_t ppll_div_sel, ppll_val;
802 uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL);
802 803
803 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); 804 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL);
804 805
@@ -808,6 +809,14 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
808 fp_vert_stretch = RREG32(RADEON_FP_VERT_STRETCH); 809 fp_vert_stretch = RREG32(RADEON_FP_VERT_STRETCH);
809 fp_horz_stretch = RREG32(RADEON_FP_HORZ_STRETCH); 810 fp_horz_stretch = RREG32(RADEON_FP_HORZ_STRETCH);
810 811
812 /* These should be fail-safe defaults, fingers crossed */
813 lvds->panel_pwr_delay = 200;
814 lvds->panel_vcc_delay = 2000;
815
816 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
817 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf;
818 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf;
819
811 if (fp_vert_stretch & RADEON_VERT_STRETCH_ENABLE) 820 if (fp_vert_stretch & RADEON_VERT_STRETCH_ENABLE)
812 lvds->native_mode.panel_yres = 821 lvds->native_mode.panel_yres =
813 ((fp_vert_stretch & RADEON_VERT_PANEL_SIZE) >> 822 ((fp_vert_stretch & RADEON_VERT_PANEL_SIZE) >>