Lines Matching +full:lvds +full:- +full:encoder

3  * Copyright 2007-8 Advanced Micro Devices, Inc.
133 struct radeon_device *rdev = dev->dev_private; in combios_get_table_offset()
137 if (!rdev->bios) in combios_get_table_offset()
362 size = RBIOS8(rdev->bios_header_start + 0x6); in combios_get_table_offset()
365 offset = RBIOS16(rdev->bios_header_start + check_offset); in combios_get_table_offset()
379 raw = rdev->bios + edid_info; in radeon_combios_check_hardcoded_edid()
388 rdev->mode_info.bios_hardcoded_edid = edid; in radeon_combios_check_hardcoded_edid()
396 return drm_edid_duplicate(drm_edid_raw(rdev->mode_info.bios_hardcoded_edid)); in radeon_bios_get_hardcoded_edid()
447 if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
448 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
449 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
451 else if (rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
452 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
459 if (rdev->family == CHIP_R200 || in combios_setup_i2c_bus()
460 rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
461 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
464 } else if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
465 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
466 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
468 else if (rdev->family >= CHIP_RV350) { in combios_setup_i2c_bus()
538 switch (rdev->family) { in combios_setup_i2c_bus()
601 * reliably on some pre-r4xx hardware; not sure why. in combios_setup_i2c_bus()
673 rdev->i2c_bus[0] = radeon_i2c_create(dev, &i2c, "DVI_DDC"); in radeon_combios_i2c_init()
676 rdev->i2c_bus[1] = radeon_i2c_create(dev, &i2c, "VGA_DDC"); in radeon_combios_i2c_init()
683 rdev->i2c_bus[2] = radeon_i2c_create(dev, &i2c, "MM_I2C"); in radeon_combios_i2c_init()
685 if (rdev->family == CHIP_R300 || in radeon_combios_i2c_init()
686 rdev->family == CHIP_R350) { in radeon_combios_i2c_init()
688 } else if (rdev->family == CHIP_RS300 || in radeon_combios_i2c_init()
689 rdev->family == CHIP_RS400 || in radeon_combios_i2c_init()
690 rdev->family == CHIP_RS480) { in radeon_combios_i2c_init()
693 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
698 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "GPIOPAD_MASK"); in radeon_combios_i2c_init()
699 } else if ((rdev->family == CHIP_R200) || in radeon_combios_i2c_init()
700 (rdev->family >= CHIP_R300)) { in radeon_combios_i2c_init()
703 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
707 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
710 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "CRT2_DDC"); in radeon_combios_i2c_init()
716 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_clock_info()
718 struct radeon_pll *p1pll = &rdev->clock.p1pll; in radeon_combios_get_clock_info()
719 struct radeon_pll *p2pll = &rdev->clock.p2pll; in radeon_combios_get_clock_info()
720 struct radeon_pll *spll = &rdev->clock.spll; in radeon_combios_get_clock_info()
721 struct radeon_pll *mpll = &rdev->clock.mpll; in radeon_combios_get_clock_info()
730 p1pll->reference_freq = RBIOS16(pll_info + 0xe); in radeon_combios_get_clock_info()
731 p1pll->reference_div = RBIOS16(pll_info + 0x10); in radeon_combios_get_clock_info()
732 p1pll->pll_out_min = RBIOS32(pll_info + 0x12); in radeon_combios_get_clock_info()
733 p1pll->pll_out_max = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
734 p1pll->lcd_pll_out_min = p1pll->pll_out_min; in radeon_combios_get_clock_info()
735 p1pll->lcd_pll_out_max = p1pll->pll_out_max; in radeon_combios_get_clock_info()
738 p1pll->pll_in_min = RBIOS32(pll_info + 0x36); in radeon_combios_get_clock_info()
739 p1pll->pll_in_max = RBIOS32(pll_info + 0x3a); in radeon_combios_get_clock_info()
741 p1pll->pll_in_min = 40; in radeon_combios_get_clock_info()
742 p1pll->pll_in_max = 500; in radeon_combios_get_clock_info()
747 spll->reference_freq = RBIOS16(pll_info + 0x1a); in radeon_combios_get_clock_info()
748 spll->reference_div = RBIOS16(pll_info + 0x1c); in radeon_combios_get_clock_info()
749 spll->pll_out_min = RBIOS32(pll_info + 0x1e); in radeon_combios_get_clock_info()
750 spll->pll_out_max = RBIOS32(pll_info + 0x22); in radeon_combios_get_clock_info()
753 spll->pll_in_min = RBIOS32(pll_info + 0x48); in radeon_combios_get_clock_info()
754 spll->pll_in_max = RBIOS32(pll_info + 0x4c); in radeon_combios_get_clock_info()
757 spll->pll_in_min = 40; in radeon_combios_get_clock_info()
758 spll->pll_in_max = 500; in radeon_combios_get_clock_info()
762 mpll->reference_freq = RBIOS16(pll_info + 0x26); in radeon_combios_get_clock_info()
763 mpll->reference_div = RBIOS16(pll_info + 0x28); in radeon_combios_get_clock_info()
764 mpll->pll_out_min = RBIOS32(pll_info + 0x2a); in radeon_combios_get_clock_info()
765 mpll->pll_out_max = RBIOS32(pll_info + 0x2e); in radeon_combios_get_clock_info()
768 mpll->pll_in_min = RBIOS32(pll_info + 0x5a); in radeon_combios_get_clock_info()
769 mpll->pll_in_max = RBIOS32(pll_info + 0x5e); in radeon_combios_get_clock_info()
772 mpll->pll_in_min = 40; in radeon_combios_get_clock_info()
773 mpll->pll_in_max = 500; in radeon_combios_get_clock_info()
784 rdev->clock.default_sclk = sclk; in radeon_combios_get_clock_info()
785 rdev->clock.default_mclk = mclk; in radeon_combios_get_clock_info()
788 rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
790 rdev->clock.max_pixel_clock = 35000; /* might need something asic specific */ in radeon_combios_get_clock_info()
803 if (rdev->family == CHIP_RS400) in radeon_combios_sideport_present()
839 p_dac->ps2_pdac_adj = default_primarydac_adj[rdev->family]; in radeon_legacy_get_primary_dac_info_from_table()
845 *encoder) in radeon_combios_get_primary_dac_info()
847 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_primary_dac_info()
848 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_primary_dac_info()
867 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
871 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
882 if (((rdev->pdev->device == 0x5159) && in radeon_combios_get_primary_dac_info()
883 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
884 (rdev->pdev->subsystem_device == 0x7c28)) || in radeon_combios_get_primary_dac_info()
886 ((rdev->pdev->device == 0x514D) && in radeon_combios_get_primary_dac_info()
887 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
888 (rdev->pdev->subsystem_device == 0x7149))) { in radeon_combios_get_primary_dac_info()
920 DRM_DEBUG_KMS("Default TV standard: PAL-M\n"); in radeon_combios_get_tv_info()
924 DRM_DEBUG_KMS("Default TV standard: PAL-60\n"); in radeon_combios_get_tv_info()
928 DRM_DEBUG_KMS("Default TV standard: NTSC-J\n"); in radeon_combios_get_tv_info()
932 DRM_DEBUG_KMS("Default TV standard: SCART-PAL\n"); in radeon_combios_get_tv_info()
986 tv_dac->ps2_tvdac_adj = default_tvdac_adj[rdev->family]; in radeon_legacy_get_tv_dac_info_from_table()
987 if ((rdev->flags & RADEON_IS_MOBILITY) && (rdev->family == CHIP_RV250)) in radeon_legacy_get_tv_dac_info_from_table()
988 tv_dac->ps2_tvdac_adj = 0x00880000; in radeon_legacy_get_tv_dac_info_from_table()
989 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
990 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
996 *encoder) in radeon_combios_get_tv_dac_info()
998 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_tv_dac_info()
999 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_tv_dac_info()
1016 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1020 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1024 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1026 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1031 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1035 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1039 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1041 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1044 tv_dac->tv_std = radeon_combios_get_tv_info(rdev); in radeon_combios_get_tv_dac_info()
1055 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1057 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1058 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1060 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1065 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1067 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1068 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1070 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1088 struct radeon_encoder_lvds *lvds; in radeon_legacy_get_lvds_info_from_regs() local
1093 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_legacy_get_lvds_info_from_regs()
1095 if (!lvds) in radeon_legacy_get_lvds_info_from_regs()
1101 /* These should be fail-safe defaults, fingers crossed */ in radeon_legacy_get_lvds_info_from_regs()
1102 lvds->panel_pwr_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1103 lvds->panel_vcc_delay = 2000; in radeon_legacy_get_lvds_info_from_regs()
1105 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); in radeon_legacy_get_lvds_info_from_regs()
1106 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1107 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1110 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1114 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1118 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1122 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1125 if ((lvds->native_mode.hdisplay < 640) || in radeon_legacy_get_lvds_info_from_regs()
1126 (lvds->native_mode.vdisplay < 480)) { in radeon_legacy_get_lvds_info_from_regs()
1127 lvds->native_mode.hdisplay = 640; in radeon_legacy_get_lvds_info_from_regs()
1128 lvds->native_mode.vdisplay = 480; in radeon_legacy_get_lvds_info_from_regs()
1134 lvds->use_bios_dividers = false; in radeon_legacy_get_lvds_info_from_regs()
1136 lvds->panel_ref_divider = in radeon_legacy_get_lvds_info_from_regs()
1138 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1139 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1141 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1142 (lvds->panel_fb_divider > 3)) in radeon_legacy_get_lvds_info_from_regs()
1143 lvds->use_bios_dividers = true; in radeon_legacy_get_lvds_info_from_regs()
1145 lvds->panel_vcc_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1148 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_legacy_get_lvds_info_from_regs()
1149 lvds->native_mode.vdisplay); in radeon_legacy_get_lvds_info_from_regs()
1151 return lvds; in radeon_legacy_get_lvds_info_from_regs()
1155 *encoder) in radeon_combios_get_lvds_info()
1157 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_lvds_info()
1158 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_lvds_info()
1163 struct radeon_encoder_lvds *lvds = NULL; in radeon_combios_get_lvds_info() local
1168 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_combios_get_lvds_info()
1170 if (!lvds) in radeon_combios_get_lvds_info()
1179 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1180 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1182 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_combios_get_lvds_info()
1183 lvds->native_mode.vdisplay); in radeon_combios_get_lvds_info()
1185 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1186 lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000); in radeon_combios_get_lvds_info()
1188 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1189 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1190 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1192 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1193 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1194 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1195 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1196 (lvds->panel_fb_divider > 3)) in radeon_combios_get_lvds_info()
1197 lvds->use_bios_dividers = true; in radeon_combios_get_lvds_info()
1200 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1202 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_FORMAT; in radeon_combios_get_lvds_info()
1205 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_TYPE; in radeon_combios_get_lvds_info()
1209 lvds->lvds_gen_cntl |= RADEON_LVDS_NO_FM; in radeon_combios_get_lvds_info()
1212 lvds->lvds_gen_cntl |= RADEON_LVDS_2_GREY; in radeon_combios_get_lvds_info()
1215 lvds->lvds_gen_cntl |= RADEON_LVDS_4_GREY; in radeon_combios_get_lvds_info()
1222 lvds->lvds_gen_cntl |= RADEON_LVDS_FP_POL_LOW; in radeon_combios_get_lvds_info()
1225 lvds->lvds_gen_cntl |= RADEON_LVDS_LP_POL_LOW; in radeon_combios_get_lvds_info()
1228 lvds->lvds_gen_cntl |= RADEON_LVDS_DTM_POL_LOW; in radeon_combios_get_lvds_info()
1231 lvds->lvds_gen_cntl |= RADEON_LVDS_BL_CLK_SEL; in radeon_combios_get_lvds_info()
1233 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1240 if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) && in radeon_combios_get_lvds_info()
1241 (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) { in radeon_combios_get_lvds_info()
1242 u32 hss = (RBIOS16(tmp + 21) - RBIOS16(tmp + 19) - 1) * 8; in radeon_combios_get_lvds_info()
1244 if (hss > lvds->native_mode.hdisplay) in radeon_combios_get_lvds_info()
1245 hss = (10 - 1) * 8; in radeon_combios_get_lvds_info()
1247 lvds->native_mode.htotal = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1248 (RBIOS16(tmp + 17) - RBIOS16(tmp + 19)) * 8; in radeon_combios_get_lvds_info()
1249 lvds->native_mode.hsync_start = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1251 lvds->native_mode.hsync_end = lvds->native_mode.hsync_start + in radeon_combios_get_lvds_info()
1254 lvds->native_mode.vtotal = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1255 (RBIOS16(tmp + 24) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1256 lvds->native_mode.vsync_start = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1257 ((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1258 lvds->native_mode.vsync_end = lvds->native_mode.vsync_start + in radeon_combios_get_lvds_info()
1261 lvds->native_mode.clock = RBIOS16(tmp + 9) * 10; in radeon_combios_get_lvds_info()
1262 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1264 drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); in radeon_combios_get_lvds_info()
1270 lvds = radeon_legacy_get_lvds_info_from_regs(rdev); in radeon_combios_get_lvds_info()
1273 if (lvds) in radeon_combios_get_lvds_info()
1274 encoder->native_mode = lvds->native_mode; in radeon_combios_get_lvds_info()
1275 return lvds; in radeon_combios_get_lvds_info()
1299 bool radeon_legacy_get_tmds_info_from_table(struct radeon_encoder *encoder, in radeon_legacy_get_tmds_info_from_table() argument
1302 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_table()
1303 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_table()
1307 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_table()
1308 default_tmds_pll[rdev->family][i].value; in radeon_legacy_get_tmds_info_from_table()
1309 tmds->tmds_pll[i].freq = default_tmds_pll[rdev->family][i].freq; in radeon_legacy_get_tmds_info_from_table()
1315 bool radeon_legacy_get_tmds_info_from_combios(struct radeon_encoder *encoder, in radeon_legacy_get_tmds_info_from_combios() argument
1318 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_combios()
1319 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_combios()
1334 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1336 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1339 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1340 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1348 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1350 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1357 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1358 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1368 bool radeon_legacy_get_ext_tmds_info_from_table(struct radeon_encoder *encoder, in radeon_legacy_get_ext_tmds_info_from_table() argument
1371 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_table()
1372 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_table()
1377 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_table()
1380 switch (rdev->mode_info.connector_table) { in radeon_legacy_get_ext_tmds_info_from_table()
1384 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_table()
1385 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_table()
1392 bool radeon_legacy_get_ext_tmds_info_from_combios(struct radeon_encoder *encoder, in radeon_legacy_get_ext_tmds_info_from_combios() argument
1395 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_combios()
1396 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_combios()
1402 tmds->i2c_bus = NULL; in radeon_legacy_get_ext_tmds_info_from_combios()
1403 if (rdev->flags & RADEON_IS_IGP) { in radeon_legacy_get_ext_tmds_info_from_combios()
1405 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1406 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_combios()
1407 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1413 tmds->slave_addr = RBIOS8(offset + 4 + 2); in radeon_legacy_get_ext_tmds_info_from_combios()
1414 tmds->slave_addr >>= 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1424 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1428 if (!tmds->i2c_bus) { in radeon_legacy_get_ext_tmds_info_from_combios()
1438 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_table()
1442 rdev->mode_info.connector_table = radeon_connector_table; in radeon_get_legacy_connector_info_from_table()
1443 if (rdev->mode_info.connector_table == CT_NONE) { in radeon_get_legacy_connector_info_from_table()
1447 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; in radeon_get_legacy_connector_info_from_table()
1451 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1458 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1461 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1467 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1475 rdev->mode_info.connector_table = CT_IBOOK; in radeon_get_legacy_connector_info_from_table()
1478 rdev->mode_info.connector_table = CT_MAC_G4_SILVER; in radeon_get_legacy_connector_info_from_table()
1481 rdev->mode_info.connector_table = CT_EMAC; in radeon_get_legacy_connector_info_from_table()
1484 rdev->mode_info.connector_table = CT_MINI_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1487 rdev->mode_info.connector_table = CT_MINI_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1491 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT; in radeon_get_legacy_connector_info_from_table()
1492 } else if ((rdev->pdev->device == 0x4a48) && in radeon_get_legacy_connector_info_from_table()
1493 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1494 (rdev->pdev->subsystem_device == 0x4a48)) { in radeon_get_legacy_connector_info_from_table()
1496 rdev->mode_info.connector_table = CT_MAC_X800; in radeon_get_legacy_connector_info_from_table()
1499 (rdev->pdev->device == 0x4150) && in radeon_get_legacy_connector_info_from_table()
1500 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1501 (rdev->pdev->subsystem_device == 0x4150)) { in radeon_get_legacy_connector_info_from_table()
1503 rdev->mode_info.connector_table = CT_MAC_G5_9600; in radeon_get_legacy_connector_info_from_table()
1504 } else if ((rdev->pdev->device == 0x4c66) && in radeon_get_legacy_connector_info_from_table()
1505 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1506 (rdev->pdev->subsystem_device == 0x4c66)) { in radeon_get_legacy_connector_info_from_table()
1508 rdev->mode_info.connector_table = CT_SAM440EP; in radeon_get_legacy_connector_info_from_table()
1513 rdev->mode_info.connector_table = CT_RN50_POWER; in radeon_get_legacy_connector_info_from_table()
1516 rdev->mode_info.connector_table = CT_GENERIC; in radeon_get_legacy_connector_info_from_table()
1519 switch (rdev->mode_info.connector_table) { in radeon_get_legacy_connector_info_from_table()
1522 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1524 if (rdev->flags & RADEON_SINGLE_CRTC) { in radeon_get_legacy_connector_info_from_table()
1525 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1539 } else if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_get_legacy_connector_info_from_table()
1540 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1555 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1570 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1591 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1607 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_table()
1608 /* TV - tv dac */ in radeon_get_legacy_connector_info_from_table()
1626 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1627 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1639 /* VGA - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1651 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1667 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1668 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1680 /* DVI-I - primary dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1700 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1716 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1717 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1729 /* DVI-I - primary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1748 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1764 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1765 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1777 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1789 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1805 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1806 /* DVI-I - tv dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1826 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1842 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1843 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1862 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1878 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1879 /* DVI-D - int tmds */ in radeon_get_legacy_connector_info_from_table()
1891 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1903 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1919 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1920 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1932 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1944 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1959 DRM_INFO("Connector Table: %d (rn50-power)\n", in radeon_get_legacy_connector_info_from_table()
1960 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1961 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1987 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1988 /* DVI - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2007 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2029 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2030 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2049 /* ADC - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2068 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2084 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2085 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
2097 /* DVI-I - secondary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2116 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2129 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2145 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2146 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2165 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2177 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2193 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2209 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_quirks()
2212 one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ in radeon_apply_legacy_quirks()
2213 if (rdev->pdev->device == 0x515e && in radeon_apply_legacy_quirks()
2214 rdev->pdev->subsystem_vendor == 0x1014) { in radeon_apply_legacy_quirks()
2216 ddc_i2c->mask_clk_reg == RADEON_GPIO_CRT2_DDC) in radeon_apply_legacy_quirks()
2220 /* X300 card with extra non-existent DVI port */ in radeon_apply_legacy_quirks()
2221 if (rdev->pdev->device == 0x5B60 && in radeon_apply_legacy_quirks()
2222 rdev->pdev->subsystem_vendor == 0x17af && in radeon_apply_legacy_quirks()
2223 rdev->pdev->subsystem_device == 0x201e && bios_index == 2) { in radeon_apply_legacy_quirks()
2233 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_tv_quirks()
2235 /* Acer 5102 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2236 if (rdev->pdev->device == 0x5975 && in radeon_apply_legacy_tv_quirks()
2237 rdev->pdev->subsystem_vendor == 0x1025 && in radeon_apply_legacy_tv_quirks()
2238 rdev->pdev->subsystem_device == 0x009f) in radeon_apply_legacy_tv_quirks()
2241 /* HP dc5750 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2242 if (rdev->pdev->device == 0x5974 && in radeon_apply_legacy_tv_quirks()
2243 rdev->pdev->subsystem_vendor == 0x103c && in radeon_apply_legacy_tv_quirks()
2244 rdev->pdev->subsystem_device == 0x280a) in radeon_apply_legacy_tv_quirks()
2247 /* MSI S270 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2248 if (rdev->pdev->device == 0x5955 && in radeon_apply_legacy_tv_quirks()
2249 rdev->pdev->subsystem_vendor == 0x1462 && in radeon_apply_legacy_tv_quirks()
2250 rdev->pdev->subsystem_device == 0x0131) in radeon_apply_legacy_tv_quirks()
2258 struct radeon_device *rdev = dev->dev_private; in combios_check_dl_dvi()
2261 if (rdev->flags & RADEON_IS_IGP) { in combios_check_dl_dvi()
2293 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_bios()
2401 /* RV100 board with external TDMS bit mis-set. in radeon_get_legacy_connector_info_from_bios()
2404 if (rdev->pdev->device == 0x5159 && in radeon_get_legacy_connector_info_from_bios()
2405 rdev->pdev->subsystem_vendor == 0x1014 && in radeon_get_legacy_connector_info_from_bios()
2406 rdev->pdev->subsystem_device == 0x029A) { in radeon_get_legacy_connector_info_from_bios()
2532 if (rdev->flags & RADEON_IS_MOBILITY || rdev->flags & RADEON_IS_IGP) { in radeon_get_legacy_connector_info_from_bios()
2586 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_bios()
2630 rdev->pm.default_power_state_index = -1; in radeon_combios_get_power_modes()
2633 rdev->pm.power_state = kcalloc(2, sizeof(struct radeon_power_state), in radeon_combios_get_power_modes()
2635 if (rdev->pm.power_state) { in radeon_combios_get_power_modes()
2637 rdev->pm.power_state[0].clock_info = in radeon_combios_get_power_modes()
2640 rdev->pm.power_state[1].clock_info = in radeon_combios_get_power_modes()
2643 if (!rdev->pm.power_state[0].clock_info || in radeon_combios_get_power_modes()
2644 !rdev->pm.power_state[1].clock_info) in radeon_combios_get_power_modes()
2685 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2686 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2691 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2698 if ((rdev->pdev->device == 0x4152) && in radeon_combios_get_power_modes()
2699 (rdev->pdev->subsystem_vendor == 0x1043) && in radeon_combios_get_power_modes()
2700 (rdev->pdev->subsystem_device == 0xc002)) { in radeon_combios_get_power_modes()
2702 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2703 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2708 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2715 if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_combios_get_power_modes()
2720 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2721 rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2); in radeon_combios_get_power_modes()
2722 rdev->pm.power_state[state_index].clock_info[0].sclk = RBIOS32(offset + 0x5 + 0x6); in radeon_combios_get_power_modes()
2723 if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || in radeon_combios_get_power_modes()
2724 (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) in radeon_combios_get_power_modes()
2726 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2731 rdev->pm.power_state[state_index].misc = misc; in radeon_combios_get_power_modes()
2732 rdev->pm.power_state[state_index].misc2 = misc2; in radeon_combios_get_power_modes()
2734 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; in radeon_combios_get_power_modes()
2736 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2739 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2741 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = true; in radeon_combios_get_power_modes()
2743 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2746 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2751 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2754 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2756 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = false; in radeon_combios_get_power_modes()
2761 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 0; in radeon_combios_get_power_modes()
2764 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 33; in radeon_combios_get_power_modes()
2767 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 66; in radeon_combios_get_power_modes()
2770 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 99; in radeon_combios_get_power_modes()
2773 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 132; in radeon_combios_get_power_modes()
2777 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2779 rdev->pm.power_state[state_index].pcie_lanes = in radeon_combios_get_power_modes()
2781 rdev->pm.power_state[state_index].flags = RADEON_PM_STATE_SINGLE_DISPLAY_ONLY; in radeon_combios_get_power_modes()
2792 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2794 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2795 rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; in radeon_combios_get_power_modes()
2796 rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; in radeon_combios_get_power_modes()
2797 …rdev->pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_in… in radeon_combios_get_power_modes()
2799 (rdev->pm.power_state[0].clock_info[0].voltage.type == VOLTAGE_GPIO)) in radeon_combios_get_power_modes()
2800 rdev->pm.power_state[state_index].clock_info[0].voltage = in radeon_combios_get_power_modes()
2801 rdev->pm.power_state[0].clock_info[0].voltage; in radeon_combios_get_power_modes()
2803 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2804 rdev->pm.power_state[state_index].pcie_lanes = 16; in radeon_combios_get_power_modes()
2805 rdev->pm.power_state[state_index].flags = 0; in radeon_combios_get_power_modes()
2806 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2807 rdev->pm.num_power_states = state_index + 1; in radeon_combios_get_power_modes()
2809 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2810 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2814 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2815 rdev->pm.num_power_states = 0; in radeon_combios_get_power_modes()
2817 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2818 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2821 void radeon_external_tmds_setup(struct drm_encoder *encoder) in radeon_external_tmds_setup() argument
2823 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_external_tmds_setup()
2824 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_external_tmds_setup()
2829 switch (tmds->dvo_chip) { in radeon_external_tmds_setup()
2832 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2833 tmds->slave_addr, in radeon_external_tmds_setup()
2835 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2836 tmds->slave_addr, in radeon_external_tmds_setup()
2838 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2839 tmds->slave_addr, in radeon_external_tmds_setup()
2841 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2842 tmds->slave_addr, in radeon_external_tmds_setup()
2844 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2845 tmds->slave_addr, in radeon_external_tmds_setup()
2849 /* sil 1178 - untested */ in radeon_external_tmds_setup()
2868 bool radeon_combios_external_tmds_setup(struct drm_encoder *encoder) in radeon_combios_external_tmds_setup() argument
2870 struct drm_device *dev = encoder->dev; in radeon_combios_external_tmds_setup()
2871 struct radeon_device *rdev = dev->dev_private; in radeon_combios_external_tmds_setup()
2872 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_combios_external_tmds_setup()
2877 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_combios_external_tmds_setup()
2882 if (rdev->flags & RADEON_IS_IGP) { in radeon_combios_external_tmds_setup()
2928 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
2936 blocks--; in radeon_combios_external_tmds_setup()
2983 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
2984 tmds->slave_addr, in radeon_combios_external_tmds_setup()
3001 struct radeon_device *rdev = dev->dev_private; in combios_parse_mmio_table()
3052 while (val--) { in combios_parse_mmio_table()
3061 while (val--) { in combios_parse_mmio_table()
3080 struct radeon_device *rdev = dev->dev_private; in combios_parse_pll_table()
3120 while (tmp--) { in combios_parse_pll_table()
3129 while (tmp--) { in combios_parse_pll_table()
3171 struct radeon_device *rdev = dev->dev_private; in combios_parse_ram_reset_table()
3189 while (tmp--) { in combios_parse_ram_reset_table()
3218 struct radeon_device *rdev = dev->dev_private; in combios_detect_ram()
3235 while (ram--) { in combios_detect_ram()
3249 struct radeon_device *rdev = dev->dev_private; in combios_write_ram_size()
3256 if (rdev->flags & RADEON_IS_IGP) in combios_write_ram_size()
3266 if ((rdev->family < CHIP_R200) && in combios_write_ram_size()
3276 rev = RBIOS8(offset - 1); in combios_write_ram_size()
3278 if ((rdev->family < CHIP_R200) in combios_write_ram_size()
3311 struct radeon_device *rdev = dev->dev_private; in radeon_combios_asic_init()
3315 if (rdev->bios == NULL) in radeon_combios_asic_init()
3333 if (!(rdev->flags & RADEON_IS_IGP)) { in radeon_combios_asic_init()
3356 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3358 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3359 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3360 rdev->pdev->subsystem_device == 0x308b) in radeon_combios_asic_init()
3364 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3366 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3367 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3368 rdev->pdev->subsystem_device == 0x30a4) in radeon_combios_asic_init()
3372 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3374 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3375 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3376 rdev->pdev->subsystem_device == 0x30ae) in radeon_combios_asic_init()
3380 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3382 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3383 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3384 rdev->pdev->subsystem_device == 0x280a) in radeon_combios_asic_init()
3386 /* quirk for rs4xx Toshiba Sattellite L20-183 latop to make it resume in radeon_combios_asic_init()
3387 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3389 if (rdev->family == CHIP_RS400 && in radeon_combios_asic_init()
3390 rdev->pdev->subsystem_vendor == 0x1179 && in radeon_combios_asic_init()
3391 rdev->pdev->subsystem_device == 0xff31) in radeon_combios_asic_init()
3403 struct radeon_device *rdev = dev->dev_private; in radeon_combios_initialize_bios_scratch_regs()
3425 void radeon_combios_output_lock(struct drm_encoder *encoder, bool lock) in radeon_combios_output_lock() argument
3427 struct drm_device *dev = encoder->dev; in radeon_combios_output_lock()
3428 struct radeon_device *rdev = dev->dev_private; in radeon_combios_output_lock()
3443 struct drm_encoder *encoder, in radeon_combios_connected_scratch_regs() argument
3446 struct drm_device *dev = connector->dev; in radeon_combios_connected_scratch_regs()
3447 struct radeon_device *rdev = dev->dev_private; in radeon_combios_connected_scratch_regs()
3450 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_combios_connected_scratch_regs()
3454 if ((radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3455 (radeon_connector->devices & ATOM_DEVICE_TV1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3460 /*save->bios_4_scratch |= RADEON_TV1_ATTACHED_COMP; */ in radeon_combios_connected_scratch_regs()
3470 if ((radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3471 (radeon_connector->devices & ATOM_DEVICE_LCD1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3484 if ((radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3485 (radeon_connector->devices & ATOM_DEVICE_CRT1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3498 if ((radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3499 (radeon_connector->devices & ATOM_DEVICE_CRT2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3512 if ((radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3513 (radeon_connector->devices & ATOM_DEVICE_DFP1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3526 if ((radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3527 (radeon_connector->devices & ATOM_DEVICE_DFP2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3545 radeon_combios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc) in radeon_combios_encoder_crtc_scratch_regs() argument
3547 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_crtc_scratch_regs()
3548 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_crtc_scratch_regs()
3549 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_combios_encoder_crtc_scratch_regs()
3552 if (radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3556 if (radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3560 if (radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3564 if (radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3568 if (radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3572 if (radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3580 radeon_combios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on) in radeon_combios_encoder_dpms_scratch_regs() argument
3582 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_dpms_scratch_regs()
3583 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_dpms_scratch_regs()
3584 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_combios_encoder_dpms_scratch_regs()
3587 if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3593 if (radeon_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3599 if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3605 if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()