• Home
  • Raw
  • Download

Lines Matching refs:lvds

1104 	struct radeon_encoder_lvds *lvds = NULL;  in radeon_legacy_get_lvds_info_from_regs()  local
1109 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_legacy_get_lvds_info_from_regs()
1111 if (!lvds) in radeon_legacy_get_lvds_info_from_regs()
1118 lvds->panel_pwr_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1119 lvds->panel_vcc_delay = 2000; in radeon_legacy_get_lvds_info_from_regs()
1121 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); in radeon_legacy_get_lvds_info_from_regs()
1122 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1123 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1126 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1130 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1134 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1138 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1141 if ((lvds->native_mode.hdisplay < 640) || in radeon_legacy_get_lvds_info_from_regs()
1142 (lvds->native_mode.vdisplay < 480)) { in radeon_legacy_get_lvds_info_from_regs()
1143 lvds->native_mode.hdisplay = 640; in radeon_legacy_get_lvds_info_from_regs()
1144 lvds->native_mode.vdisplay = 480; in radeon_legacy_get_lvds_info_from_regs()
1150 lvds->use_bios_dividers = false; in radeon_legacy_get_lvds_info_from_regs()
1152 lvds->panel_ref_divider = in radeon_legacy_get_lvds_info_from_regs()
1154 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1155 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1157 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1158 (lvds->panel_fb_divider > 3)) in radeon_legacy_get_lvds_info_from_regs()
1159 lvds->use_bios_dividers = true; in radeon_legacy_get_lvds_info_from_regs()
1161 lvds->panel_vcc_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1164 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_legacy_get_lvds_info_from_regs()
1165 lvds->native_mode.vdisplay); in radeon_legacy_get_lvds_info_from_regs()
1167 return lvds; in radeon_legacy_get_lvds_info_from_regs()
1179 struct radeon_encoder_lvds *lvds = NULL; in radeon_combios_get_lvds_info() local
1184 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_combios_get_lvds_info()
1186 if (!lvds) in radeon_combios_get_lvds_info()
1195 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1196 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1198 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_combios_get_lvds_info()
1199 lvds->native_mode.vdisplay); in radeon_combios_get_lvds_info()
1201 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1202 lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000); in radeon_combios_get_lvds_info()
1204 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1205 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1206 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1208 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1209 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1210 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1211 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1212 (lvds->panel_fb_divider > 3)) in radeon_combios_get_lvds_info()
1213 lvds->use_bios_dividers = true; in radeon_combios_get_lvds_info()
1216 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1218 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_FORMAT; in radeon_combios_get_lvds_info()
1221 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_TYPE; in radeon_combios_get_lvds_info()
1225 lvds->lvds_gen_cntl |= RADEON_LVDS_NO_FM; in radeon_combios_get_lvds_info()
1228 lvds->lvds_gen_cntl |= RADEON_LVDS_2_GREY; in radeon_combios_get_lvds_info()
1231 lvds->lvds_gen_cntl |= RADEON_LVDS_4_GREY; in radeon_combios_get_lvds_info()
1238 lvds->lvds_gen_cntl |= RADEON_LVDS_FP_POL_LOW; in radeon_combios_get_lvds_info()
1241 lvds->lvds_gen_cntl |= RADEON_LVDS_LP_POL_LOW; in radeon_combios_get_lvds_info()
1244 lvds->lvds_gen_cntl |= RADEON_LVDS_DTM_POL_LOW; in radeon_combios_get_lvds_info()
1247 lvds->lvds_gen_cntl |= RADEON_LVDS_BL_CLK_SEL; in radeon_combios_get_lvds_info()
1249 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1256 if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) && in radeon_combios_get_lvds_info()
1257 (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) { in radeon_combios_get_lvds_info()
1260 if (hss > lvds->native_mode.hdisplay) in radeon_combios_get_lvds_info()
1263 lvds->native_mode.htotal = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1265 lvds->native_mode.hsync_start = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1267 lvds->native_mode.hsync_end = lvds->native_mode.hsync_start + in radeon_combios_get_lvds_info()
1270 lvds->native_mode.vtotal = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1272 lvds->native_mode.vsync_start = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1274 lvds->native_mode.vsync_end = lvds->native_mode.vsync_start + in radeon_combios_get_lvds_info()
1277 lvds->native_mode.clock = RBIOS16(tmp + 9) * 10; in radeon_combios_get_lvds_info()
1278 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1280 drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); in radeon_combios_get_lvds_info()
1286 lvds = radeon_legacy_get_lvds_info_from_regs(rdev); in radeon_combios_get_lvds_info()
1289 if (lvds) in radeon_combios_get_lvds_info()
1290 encoder->native_mode = lvds->native_mode; in radeon_combios_get_lvds_info()
1291 return lvds; in radeon_combios_get_lvds_info()