Lines Matching +full:no +full:- +full:hpd
3 * Copyright 2007-8 Advanced Micro Devices, Inc.
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
132 struct radeon_device *rdev = dev->dev_private; in combios_get_table_offset()
136 if (!rdev->bios) in combios_get_table_offset()
361 size = RBIOS8(rdev->bios_header_start + 0x6); in combios_get_table_offset()
364 offset = RBIOS16(rdev->bios_header_start + check_offset); in combios_get_table_offset()
374 edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE); in radeon_combios_check_hardcoded_edid()
378 raw = rdev->bios + edid_info; in radeon_combios_check_hardcoded_edid()
391 rdev->mode_info.bios_hardcoded_edid = edid; in radeon_combios_check_hardcoded_edid()
392 rdev->mode_info.bios_hardcoded_edid_size = size; in radeon_combios_check_hardcoded_edid()
402 if (rdev->mode_info.bios_hardcoded_edid) { in radeon_bios_get_hardcoded_edid()
403 edid = kmalloc(rdev->mode_info.bios_hardcoded_edid_size, GFP_KERNEL); in radeon_bios_get_hardcoded_edid()
406 (unsigned char *)rdev->mode_info.bios_hardcoded_edid, in radeon_bios_get_hardcoded_edid()
407 rdev->mode_info.bios_hardcoded_edid_size); in radeon_bios_get_hardcoded_edid()
462 if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
463 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
464 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
466 else if (rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
467 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
474 if (rdev->family == CHIP_R200 || in combios_setup_i2c_bus()
475 rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
476 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
479 } else if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
480 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
481 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
483 else if (rdev->family >= CHIP_RV350) { in combios_setup_i2c_bus()
553 switch (rdev->family) { in combios_setup_i2c_bus()
616 * reliably on some pre-r4xx hardware; not sure why. in combios_setup_i2c_bus()
632 i2c.hpd = RADEON_HPD_NONE; in combios_setup_i2c_bus()
644 struct drm_device *dev = rdev->ddev; in radeon_combios_get_i2c_info_from_table()
672 struct drm_device *dev = rdev->ddev; in radeon_combios_i2c_init()
688 rdev->i2c_bus[0] = radeon_i2c_create(dev, &i2c, "DVI_DDC"); in radeon_combios_i2c_init()
691 rdev->i2c_bus[1] = radeon_i2c_create(dev, &i2c, "VGA_DDC"); in radeon_combios_i2c_init()
698 rdev->i2c_bus[2] = radeon_i2c_create(dev, &i2c, "MM_I2C"); in radeon_combios_i2c_init()
700 if (rdev->family == CHIP_R300 || in radeon_combios_i2c_init()
701 rdev->family == CHIP_R350) { in radeon_combios_i2c_init()
703 } else if (rdev->family == CHIP_RS300 || in radeon_combios_i2c_init()
704 rdev->family == CHIP_RS400 || in radeon_combios_i2c_init()
705 rdev->family == CHIP_RS480) { in radeon_combios_i2c_init()
708 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
713 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "GPIOPAD_MASK"); in radeon_combios_i2c_init()
714 } else if ((rdev->family == CHIP_R200) || in radeon_combios_i2c_init()
715 (rdev->family >= CHIP_R300)) { in radeon_combios_i2c_init()
718 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
722 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
725 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "CRT2_DDC"); in radeon_combios_i2c_init()
731 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_clock_info()
733 struct radeon_pll *p1pll = &rdev->clock.p1pll; in radeon_combios_get_clock_info()
734 struct radeon_pll *p2pll = &rdev->clock.p2pll; in radeon_combios_get_clock_info()
735 struct radeon_pll *spll = &rdev->clock.spll; in radeon_combios_get_clock_info()
736 struct radeon_pll *mpll = &rdev->clock.mpll; in radeon_combios_get_clock_info()
745 p1pll->reference_freq = RBIOS16(pll_info + 0xe); in radeon_combios_get_clock_info()
746 p1pll->reference_div = RBIOS16(pll_info + 0x10); in radeon_combios_get_clock_info()
747 p1pll->pll_out_min = RBIOS32(pll_info + 0x12); in radeon_combios_get_clock_info()
748 p1pll->pll_out_max = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
749 p1pll->lcd_pll_out_min = p1pll->pll_out_min; in radeon_combios_get_clock_info()
750 p1pll->lcd_pll_out_max = p1pll->pll_out_max; in radeon_combios_get_clock_info()
753 p1pll->pll_in_min = RBIOS32(pll_info + 0x36); in radeon_combios_get_clock_info()
754 p1pll->pll_in_max = RBIOS32(pll_info + 0x3a); in radeon_combios_get_clock_info()
756 p1pll->pll_in_min = 40; in radeon_combios_get_clock_info()
757 p1pll->pll_in_max = 500; in radeon_combios_get_clock_info()
762 spll->reference_freq = RBIOS16(pll_info + 0x1a); in radeon_combios_get_clock_info()
763 spll->reference_div = RBIOS16(pll_info + 0x1c); in radeon_combios_get_clock_info()
764 spll->pll_out_min = RBIOS32(pll_info + 0x1e); in radeon_combios_get_clock_info()
765 spll->pll_out_max = RBIOS32(pll_info + 0x22); in radeon_combios_get_clock_info()
768 spll->pll_in_min = RBIOS32(pll_info + 0x48); in radeon_combios_get_clock_info()
769 spll->pll_in_max = RBIOS32(pll_info + 0x4c); in radeon_combios_get_clock_info()
772 spll->pll_in_min = 40; in radeon_combios_get_clock_info()
773 spll->pll_in_max = 500; in radeon_combios_get_clock_info()
777 mpll->reference_freq = RBIOS16(pll_info + 0x26); in radeon_combios_get_clock_info()
778 mpll->reference_div = RBIOS16(pll_info + 0x28); in radeon_combios_get_clock_info()
779 mpll->pll_out_min = RBIOS32(pll_info + 0x2a); in radeon_combios_get_clock_info()
780 mpll->pll_out_max = RBIOS32(pll_info + 0x2e); in radeon_combios_get_clock_info()
783 mpll->pll_in_min = RBIOS32(pll_info + 0x5a); in radeon_combios_get_clock_info()
784 mpll->pll_in_max = RBIOS32(pll_info + 0x5e); in radeon_combios_get_clock_info()
787 mpll->pll_in_min = 40; in radeon_combios_get_clock_info()
788 mpll->pll_in_max = 500; in radeon_combios_get_clock_info()
799 rdev->clock.default_sclk = sclk; in radeon_combios_get_clock_info()
800 rdev->clock.default_mclk = mclk; in radeon_combios_get_clock_info()
803 rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
805 rdev->clock.max_pixel_clock = 35000; /* might need something asic specific */ in radeon_combios_get_clock_info()
814 struct drm_device *dev = rdev->ddev; in radeon_combios_sideport_present()
818 if (rdev->family == CHIP_RS400) in radeon_combios_sideport_present()
854 p_dac->ps2_pdac_adj = default_primarydac_adj[rdev->family]; in radeon_legacy_get_primary_dac_info_from_table()
862 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_primary_dac_info()
863 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_primary_dac_info()
882 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
886 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
897 if (((rdev->pdev->device == 0x5159) && in radeon_combios_get_primary_dac_info()
898 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
899 (rdev->pdev->subsystem_device == 0x7c28)) || in radeon_combios_get_primary_dac_info()
901 ((rdev->pdev->device == 0x514D) && in radeon_combios_get_primary_dac_info()
902 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
903 (rdev->pdev->subsystem_device == 0x7149))) { in radeon_combios_get_primary_dac_info()
917 struct drm_device *dev = rdev->ddev; in radeon_combios_get_tv_info()
935 DRM_DEBUG_KMS("Default TV standard: PAL-M\n"); in radeon_combios_get_tv_info()
939 DRM_DEBUG_KMS("Default TV standard: PAL-60\n"); in radeon_combios_get_tv_info()
943 DRM_DEBUG_KMS("Default TV standard: NTSC-J\n"); in radeon_combios_get_tv_info()
947 DRM_DEBUG_KMS("Default TV standard: SCART-PAL\n"); in radeon_combios_get_tv_info()
1001 tv_dac->ps2_tvdac_adj = default_tvdac_adj[rdev->family]; in radeon_legacy_get_tv_dac_info_from_table()
1002 if ((rdev->flags & RADEON_IS_MOBILITY) && (rdev->family == CHIP_RV250)) in radeon_legacy_get_tv_dac_info_from_table()
1003 tv_dac->ps2_tvdac_adj = 0x00880000; in radeon_legacy_get_tv_dac_info_from_table()
1004 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1005 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1013 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_tv_dac_info()
1014 struct radeon_device *rdev = dev->dev_private; 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()
1046 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1050 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1054 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1056 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1059 tv_dac->tv_std = radeon_combios_get_tv_info(rdev); in radeon_combios_get_tv_dac_info()
1070 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1072 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1073 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1075 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1080 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1082 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1083 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1085 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1089 DRM_INFO("No TV DAC info found in BIOS\n"); in radeon_combios_get_tv_dac_info()
1116 /* These should be fail-safe defaults, fingers crossed */ in radeon_legacy_get_lvds_info_from_regs()
1117 lvds->panel_pwr_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1118 lvds->panel_vcc_delay = 2000; in radeon_legacy_get_lvds_info_from_regs()
1120 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); in radeon_legacy_get_lvds_info_from_regs()
1121 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1122 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1125 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1129 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1133 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1137 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1140 if ((lvds->native_mode.hdisplay < 640) || in radeon_legacy_get_lvds_info_from_regs()
1141 (lvds->native_mode.vdisplay < 480)) { in radeon_legacy_get_lvds_info_from_regs()
1142 lvds->native_mode.hdisplay = 640; in radeon_legacy_get_lvds_info_from_regs()
1143 lvds->native_mode.vdisplay = 480; in radeon_legacy_get_lvds_info_from_regs()
1149 lvds->use_bios_dividers = false; in radeon_legacy_get_lvds_info_from_regs()
1151 lvds->panel_ref_divider = in radeon_legacy_get_lvds_info_from_regs()
1153 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1154 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1156 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1157 (lvds->panel_fb_divider > 3)) in radeon_legacy_get_lvds_info_from_regs()
1158 lvds->use_bios_dividers = true; in radeon_legacy_get_lvds_info_from_regs()
1160 lvds->panel_vcc_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1163 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_legacy_get_lvds_info_from_regs()
1164 lvds->native_mode.vdisplay); in radeon_legacy_get_lvds_info_from_regs()
1172 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_lvds_info()
1173 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_lvds_info()
1194 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1195 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1197 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_combios_get_lvds_info()
1198 lvds->native_mode.vdisplay); in radeon_combios_get_lvds_info()
1200 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1201 lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000); in radeon_combios_get_lvds_info()
1203 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1204 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1205 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1207 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1208 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1209 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1210 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1211 (lvds->panel_fb_divider > 3)) in radeon_combios_get_lvds_info()
1212 lvds->use_bios_dividers = true; in radeon_combios_get_lvds_info()
1215 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1217 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_FORMAT; in radeon_combios_get_lvds_info()
1220 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_TYPE; in radeon_combios_get_lvds_info()
1224 lvds->lvds_gen_cntl |= RADEON_LVDS_NO_FM; in radeon_combios_get_lvds_info()
1227 lvds->lvds_gen_cntl |= RADEON_LVDS_2_GREY; in radeon_combios_get_lvds_info()
1230 lvds->lvds_gen_cntl |= RADEON_LVDS_4_GREY; in radeon_combios_get_lvds_info()
1237 lvds->lvds_gen_cntl |= RADEON_LVDS_FP_POL_LOW; in radeon_combios_get_lvds_info()
1240 lvds->lvds_gen_cntl |= RADEON_LVDS_LP_POL_LOW; in radeon_combios_get_lvds_info()
1243 lvds->lvds_gen_cntl |= RADEON_LVDS_DTM_POL_LOW; in radeon_combios_get_lvds_info()
1246 lvds->lvds_gen_cntl |= RADEON_LVDS_BL_CLK_SEL; in radeon_combios_get_lvds_info()
1248 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1255 if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) && in radeon_combios_get_lvds_info()
1256 (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) { in radeon_combios_get_lvds_info()
1257 u32 hss = (RBIOS16(tmp + 21) - RBIOS16(tmp + 19) - 1) * 8; in radeon_combios_get_lvds_info()
1259 if (hss > lvds->native_mode.hdisplay) in radeon_combios_get_lvds_info()
1260 hss = (10 - 1) * 8; in radeon_combios_get_lvds_info()
1262 lvds->native_mode.htotal = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1263 (RBIOS16(tmp + 17) - RBIOS16(tmp + 19)) * 8; in radeon_combios_get_lvds_info()
1264 lvds->native_mode.hsync_start = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1266 lvds->native_mode.hsync_end = lvds->native_mode.hsync_start + in radeon_combios_get_lvds_info()
1269 lvds->native_mode.vtotal = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1270 (RBIOS16(tmp + 24) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1271 lvds->native_mode.vsync_start = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1272 ((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1273 lvds->native_mode.vsync_end = lvds->native_mode.vsync_start + in radeon_combios_get_lvds_info()
1276 lvds->native_mode.clock = RBIOS16(tmp + 9) * 10; in radeon_combios_get_lvds_info()
1277 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1279 drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); in radeon_combios_get_lvds_info()
1284 DRM_INFO("No panel info found in BIOS\n"); in radeon_combios_get_lvds_info()
1289 encoder->native_mode = lvds->native_mode; in radeon_combios_get_lvds_info()
1317 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_table()
1318 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_table()
1322 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_table()
1323 default_tmds_pll[rdev->family][i].value; in radeon_legacy_get_tmds_info_from_table()
1324 tmds->tmds_pll[i].freq = default_tmds_pll[rdev->family][i].freq; in radeon_legacy_get_tmds_info_from_table()
1333 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_combios()
1334 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_combios()
1349 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1351 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1354 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1355 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1363 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1365 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1372 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1373 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1377 DRM_INFO("No TMDS info found in BIOS\n"); in radeon_legacy_get_tmds_info_from_combios()
1386 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_table()
1387 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_table()
1392 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_table()
1395 switch (rdev->mode_info.connector_table) { in radeon_legacy_get_ext_tmds_info_from_table()
1399 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_table()
1400 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_table()
1410 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_combios()
1411 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_combios()
1417 tmds->i2c_bus = NULL; in radeon_legacy_get_ext_tmds_info_from_combios()
1418 if (rdev->flags & RADEON_IS_IGP) { in radeon_legacy_get_ext_tmds_info_from_combios()
1420 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1421 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_combios()
1422 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1428 tmds->slave_addr = RBIOS8(offset + 4 + 2); in radeon_legacy_get_ext_tmds_info_from_combios()
1429 tmds->slave_addr >>= 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1439 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1443 if (!tmds->i2c_bus) { in radeon_legacy_get_ext_tmds_info_from_combios()
1444 DRM_INFO("No valid Ext TMDS info found in BIOS\n"); in radeon_legacy_get_ext_tmds_info_from_combios()
1453 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_table()
1455 struct radeon_hpd hpd; in radeon_get_legacy_connector_info_from_table() local
1457 rdev->mode_info.connector_table = radeon_connector_table; in radeon_get_legacy_connector_info_from_table()
1458 if (rdev->mode_info.connector_table == CT_NONE) { in radeon_get_legacy_connector_info_from_table()
1462 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; in radeon_get_legacy_connector_info_from_table()
1466 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1473 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1476 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1482 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1490 rdev->mode_info.connector_table = CT_IBOOK; in radeon_get_legacy_connector_info_from_table()
1493 rdev->mode_info.connector_table = CT_MAC_G4_SILVER; in radeon_get_legacy_connector_info_from_table()
1496 rdev->mode_info.connector_table = CT_EMAC; in radeon_get_legacy_connector_info_from_table()
1499 rdev->mode_info.connector_table = CT_MINI_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1502 rdev->mode_info.connector_table = CT_MINI_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1506 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT; in radeon_get_legacy_connector_info_from_table()
1507 } else if ((rdev->pdev->device == 0x4a48) && in radeon_get_legacy_connector_info_from_table()
1508 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1509 (rdev->pdev->subsystem_device == 0x4a48)) { in radeon_get_legacy_connector_info_from_table()
1511 rdev->mode_info.connector_table = CT_MAC_X800; in radeon_get_legacy_connector_info_from_table()
1514 (rdev->pdev->device == 0x4150) && in radeon_get_legacy_connector_info_from_table()
1515 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1516 (rdev->pdev->subsystem_device == 0x4150)) { in radeon_get_legacy_connector_info_from_table()
1518 rdev->mode_info.connector_table = CT_MAC_G5_9600; in radeon_get_legacy_connector_info_from_table()
1519 } else if ((rdev->pdev->device == 0x4c66) && in radeon_get_legacy_connector_info_from_table()
1520 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1521 (rdev->pdev->subsystem_device == 0x4c66)) { in radeon_get_legacy_connector_info_from_table()
1523 rdev->mode_info.connector_table = CT_SAM440EP; in radeon_get_legacy_connector_info_from_table()
1528 rdev->mode_info.connector_table = CT_RN50_POWER; in radeon_get_legacy_connector_info_from_table()
1531 rdev->mode_info.connector_table = CT_GENERIC; in radeon_get_legacy_connector_info_from_table()
1534 switch (rdev->mode_info.connector_table) { in radeon_get_legacy_connector_info_from_table()
1537 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1539 if (rdev->flags & RADEON_SINGLE_CRTC) { in radeon_get_legacy_connector_info_from_table()
1540 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1542 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1553 &hpd); in radeon_get_legacy_connector_info_from_table()
1554 } else if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_get_legacy_connector_info_from_table()
1557 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1568 &hpd); in radeon_get_legacy_connector_info_from_table()
1570 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1572 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1583 &hpd); in radeon_get_legacy_connector_info_from_table()
1585 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1587 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_table()
1604 &hpd); in radeon_get_legacy_connector_info_from_table()
1606 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1608 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1619 &hpd); in radeon_get_legacy_connector_info_from_table()
1622 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_table()
1623 /* TV - tv dac */ in radeon_get_legacy_connector_info_from_table()
1625 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1636 &hpd); in radeon_get_legacy_connector_info_from_table()
1641 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1644 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1653 &hpd); in radeon_get_legacy_connector_info_from_table()
1654 /* VGA - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1656 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1665 &hpd); in radeon_get_legacy_connector_info_from_table()
1666 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1668 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1678 &hpd); in radeon_get_legacy_connector_info_from_table()
1682 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1685 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1694 &hpd); in radeon_get_legacy_connector_info_from_table()
1695 /* DVI-I - primary dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1697 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1714 &hpd); in radeon_get_legacy_connector_info_from_table()
1715 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1717 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1727 &hpd); in radeon_get_legacy_connector_info_from_table()
1731 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1734 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1743 &hpd); in radeon_get_legacy_connector_info_from_table()
1744 /* DVI-I - primary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1746 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1762 &hpd); in radeon_get_legacy_connector_info_from_table()
1763 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1765 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1775 &hpd); in radeon_get_legacy_connector_info_from_table()
1779 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1782 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1791 &hpd); in radeon_get_legacy_connector_info_from_table()
1792 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1794 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1803 &hpd); in radeon_get_legacy_connector_info_from_table()
1804 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1806 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1816 &hpd); in radeon_get_legacy_connector_info_from_table()
1820 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1821 /* DVI-I - tv dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1823 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1840 &hpd); in radeon_get_legacy_connector_info_from_table()
1841 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1843 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1853 &hpd); in radeon_get_legacy_connector_info_from_table()
1857 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1858 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1860 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1876 &hpd); in radeon_get_legacy_connector_info_from_table()
1877 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1879 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1889 &hpd); in radeon_get_legacy_connector_info_from_table()
1893 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1894 /* DVI-D - int tmds */ in radeon_get_legacy_connector_info_from_table()
1896 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1905 &hpd); in radeon_get_legacy_connector_info_from_table()
1906 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1908 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1917 &hpd); in radeon_get_legacy_connector_info_from_table()
1918 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1920 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1930 &hpd); in radeon_get_legacy_connector_info_from_table()
1934 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1935 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1937 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1946 &hpd); in radeon_get_legacy_connector_info_from_table()
1947 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1949 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1958 &hpd); in radeon_get_legacy_connector_info_from_table()
1959 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1961 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1971 &hpd); in radeon_get_legacy_connector_info_from_table()
1974 DRM_INFO("Connector Table: %d (rn50-power)\n", in radeon_get_legacy_connector_info_from_table()
1975 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1976 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1978 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1987 &hpd); in radeon_get_legacy_connector_info_from_table()
1989 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1998 &hpd); in radeon_get_legacy_connector_info_from_table()
2002 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2003 /* DVI - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2005 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2021 &hpd); in radeon_get_legacy_connector_info_from_table()
2022 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2024 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2040 &hpd); in radeon_get_legacy_connector_info_from_table()
2044 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2045 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2047 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2063 &hpd); in radeon_get_legacy_connector_info_from_table()
2064 /* ADC - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2066 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2082 &hpd); in radeon_get_legacy_connector_info_from_table()
2083 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2085 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2095 &hpd); in radeon_get_legacy_connector_info_from_table()
2099 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2102 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2111 &hpd); in radeon_get_legacy_connector_info_from_table()
2112 /* DVI-I - secondary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2114 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2130 &hpd); in radeon_get_legacy_connector_info_from_table()
2131 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2133 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2143 &hpd); in radeon_get_legacy_connector_info_from_table()
2144 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2146 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2156 &hpd); in radeon_get_legacy_connector_info_from_table()
2160 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2161 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2163 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2179 &hpd); in radeon_get_legacy_connector_info_from_table()
2180 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2182 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2191 &hpd); in radeon_get_legacy_connector_info_from_table()
2192 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2194 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2204 &hpd); in radeon_get_legacy_connector_info_from_table()
2208 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2222 struct radeon_hpd *hpd) in radeon_apply_legacy_quirks() argument
2224 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_quirks()
2227 one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ in radeon_apply_legacy_quirks()
2228 if (rdev->pdev->device == 0x515e && in radeon_apply_legacy_quirks()
2229 rdev->pdev->subsystem_vendor == 0x1014) { in radeon_apply_legacy_quirks()
2231 ddc_i2c->mask_clk_reg == RADEON_GPIO_CRT2_DDC) in radeon_apply_legacy_quirks()
2235 /* X300 card with extra non-existent DVI port */ in radeon_apply_legacy_quirks()
2236 if (rdev->pdev->device == 0x5B60 && in radeon_apply_legacy_quirks()
2237 rdev->pdev->subsystem_vendor == 0x17af && in radeon_apply_legacy_quirks()
2238 rdev->pdev->subsystem_device == 0x201e && bios_index == 2) { in radeon_apply_legacy_quirks()
2248 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_tv_quirks()
2250 /* Acer 5102 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2251 if (rdev->pdev->device == 0x5975 && in radeon_apply_legacy_tv_quirks()
2252 rdev->pdev->subsystem_vendor == 0x1025 && in radeon_apply_legacy_tv_quirks()
2253 rdev->pdev->subsystem_device == 0x009f) in radeon_apply_legacy_tv_quirks()
2256 /* HP dc5750 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2257 if (rdev->pdev->device == 0x5974 && in radeon_apply_legacy_tv_quirks()
2258 rdev->pdev->subsystem_vendor == 0x103c && in radeon_apply_legacy_tv_quirks()
2259 rdev->pdev->subsystem_device == 0x280a) in radeon_apply_legacy_tv_quirks()
2262 /* MSI S270 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2263 if (rdev->pdev->device == 0x5955 && in radeon_apply_legacy_tv_quirks()
2264 rdev->pdev->subsystem_vendor == 0x1462 && in radeon_apply_legacy_tv_quirks()
2265 rdev->pdev->subsystem_device == 0x0131) in radeon_apply_legacy_tv_quirks()
2273 struct radeon_device *rdev = dev->dev_private; in combios_check_dl_dvi()
2276 if (rdev->flags & RADEON_IS_IGP) { in combios_check_dl_dvi()
2308 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_bios()
2315 struct radeon_hpd hpd; in radeon_get_legacy_connector_info_from_bios() local
2340 hpd.hpd = RADEON_HPD_2; in radeon_get_legacy_connector_info_from_bios()
2342 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_bios()
2345 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2350 &ddc_i2c, &hpd)) in radeon_get_legacy_connector_info_from_bios()
2368 &hpd); in radeon_get_legacy_connector_info_from_bios()
2395 &hpd); in radeon_get_legacy_connector_info_from_bios()
2416 /* RV100 board with external TDMS bit mis-set. in radeon_get_legacy_connector_info_from_bios()
2419 if (rdev->pdev->device == 0x5159 && in radeon_get_legacy_connector_info_from_bios()
2420 rdev->pdev->subsystem_vendor == 0x1014 && in radeon_get_legacy_connector_info_from_bios()
2421 rdev->pdev->subsystem_device == 0x029A) { in radeon_get_legacy_connector_info_from_bios()
2450 &hpd); in radeon_get_legacy_connector_info_from_bios()
2469 &hpd); in radeon_get_legacy_connector_info_from_bios()
2485 &hpd); in radeon_get_legacy_connector_info_from_bios()
2512 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_bios()
2520 &hpd); in radeon_get_legacy_connector_info_from_bios()
2532 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2539 &hpd); in radeon_get_legacy_connector_info_from_bios()
2541 DRM_DEBUG_KMS("No connector info found\n"); in radeon_get_legacy_connector_info_from_bios()
2547 if (rdev->flags & RADEON_IS_MOBILITY || rdev->flags & RADEON_IS_IGP) { in radeon_get_legacy_connector_info_from_bios()
2589 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2596 &hpd); in radeon_get_legacy_connector_info_from_bios()
2601 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_bios()
2607 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2620 &hpd); in radeon_get_legacy_connector_info_from_bios()
2639 struct drm_device *dev = rdev->ddev; in radeon_combios_get_power_modes()
2645 rdev->pm.default_power_state_index = -1; in radeon_combios_get_power_modes()
2648 rdev->pm.power_state = kcalloc(2, sizeof(struct radeon_power_state), in radeon_combios_get_power_modes()
2650 if (rdev->pm.power_state) { in radeon_combios_get_power_modes()
2652 rdev->pm.power_state[0].clock_info = in radeon_combios_get_power_modes()
2655 rdev->pm.power_state[1].clock_info = in radeon_combios_get_power_modes()
2658 if (!rdev->pm.power_state[0].clock_info || in radeon_combios_get_power_modes()
2659 !rdev->pm.power_state[1].clock_info) in radeon_combios_get_power_modes()
2700 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2701 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2706 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2710 /* boards with a thermal chip, but no overdrive table */ in radeon_combios_get_power_modes()
2713 if ((rdev->pdev->device == 0x4152) && in radeon_combios_get_power_modes()
2714 (rdev->pdev->subsystem_vendor == 0x1043) && in radeon_combios_get_power_modes()
2715 (rdev->pdev->subsystem_device == 0xc002)) { in radeon_combios_get_power_modes()
2717 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2718 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2723 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2730 if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_combios_get_power_modes()
2735 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2736 rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2); in radeon_combios_get_power_modes()
2737 rdev->pm.power_state[state_index].clock_info[0].sclk = RBIOS32(offset + 0x5 + 0x6); in radeon_combios_get_power_modes()
2738 if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || in radeon_combios_get_power_modes()
2739 (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) in radeon_combios_get_power_modes()
2741 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2746 rdev->pm.power_state[state_index].misc = misc; in radeon_combios_get_power_modes()
2747 rdev->pm.power_state[state_index].misc2 = misc2; in radeon_combios_get_power_modes()
2749 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; in radeon_combios_get_power_modes()
2751 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2754 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2756 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = true; in radeon_combios_get_power_modes()
2758 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2761 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2766 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2769 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2771 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = false; in radeon_combios_get_power_modes()
2776 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 0; in radeon_combios_get_power_modes()
2779 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 33; in radeon_combios_get_power_modes()
2782 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 66; in radeon_combios_get_power_modes()
2785 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 99; in radeon_combios_get_power_modes()
2788 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 132; in radeon_combios_get_power_modes()
2792 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2794 rdev->pm.power_state[state_index].pcie_lanes = in radeon_combios_get_power_modes()
2796 rdev->pm.power_state[state_index].flags = RADEON_PM_STATE_SINGLE_DISPLAY_ONLY; in radeon_combios_get_power_modes()
2807 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2809 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2810 rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; in radeon_combios_get_power_modes()
2811 rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; in radeon_combios_get_power_modes()
2812 …rdev->pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_in… in radeon_combios_get_power_modes()
2814 (rdev->pm.power_state[0].clock_info[0].voltage.type == VOLTAGE_GPIO)) in radeon_combios_get_power_modes()
2815 rdev->pm.power_state[state_index].clock_info[0].voltage = in radeon_combios_get_power_modes()
2816 rdev->pm.power_state[0].clock_info[0].voltage; in radeon_combios_get_power_modes()
2818 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2819 rdev->pm.power_state[state_index].pcie_lanes = 16; in radeon_combios_get_power_modes()
2820 rdev->pm.power_state[state_index].flags = 0; in radeon_combios_get_power_modes()
2821 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2822 rdev->pm.num_power_states = state_index + 1; in radeon_combios_get_power_modes()
2824 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2825 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2829 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2830 rdev->pm.num_power_states = 0; in radeon_combios_get_power_modes()
2832 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2833 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2839 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_external_tmds_setup()
2844 switch (tmds->dvo_chip) { in radeon_external_tmds_setup()
2847 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2848 tmds->slave_addr, in radeon_external_tmds_setup()
2850 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2851 tmds->slave_addr, in radeon_external_tmds_setup()
2853 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2854 tmds->slave_addr, in radeon_external_tmds_setup()
2856 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2857 tmds->slave_addr, in radeon_external_tmds_setup()
2859 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2860 tmds->slave_addr, in radeon_external_tmds_setup()
2864 /* sil 1178 - untested */ in radeon_external_tmds_setup()
2885 struct drm_device *dev = encoder->dev; in radeon_combios_external_tmds_setup()
2886 struct radeon_device *rdev = dev->dev_private; in radeon_combios_external_tmds_setup()
2892 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_combios_external_tmds_setup()
2897 if (rdev->flags & RADEON_IS_IGP) { in radeon_combios_external_tmds_setup()
2943 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
2951 blocks--; in radeon_combios_external_tmds_setup()
2998 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
2999 tmds->slave_addr, in radeon_combios_external_tmds_setup()
3016 struct radeon_device *rdev = dev->dev_private; in combios_parse_mmio_table()
3067 while (val--) { in combios_parse_mmio_table()
3076 while (val--) { in combios_parse_mmio_table()
3095 struct radeon_device *rdev = dev->dev_private; in combios_parse_pll_table()
3135 while (tmp--) { in combios_parse_pll_table()
3144 while (tmp--) { in combios_parse_pll_table()
3186 struct radeon_device *rdev = dev->dev_private; in combios_parse_ram_reset_table()
3204 while (tmp--) { in combios_parse_ram_reset_table()
3233 struct radeon_device *rdev = dev->dev_private; in combios_detect_ram()
3250 while (ram--) { in combios_detect_ram()
3264 struct radeon_device *rdev = dev->dev_private; in combios_write_ram_size()
3271 if (rdev->flags & RADEON_IS_IGP) in combios_write_ram_size()
3281 if ((rdev->family < CHIP_R200) && in combios_write_ram_size()
3291 rev = RBIOS8(offset - 1); in combios_write_ram_size()
3293 if ((rdev->family < CHIP_R200) in combios_write_ram_size()
3326 struct radeon_device *rdev = dev->dev_private; in radeon_combios_asic_init()
3330 if (rdev->bios == NULL) in radeon_combios_asic_init()
3348 if (!(rdev->flags & RADEON_IS_IGP)) { in radeon_combios_asic_init()
3371 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3373 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3374 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3375 rdev->pdev->subsystem_device == 0x308b) in radeon_combios_asic_init()
3379 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3381 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3382 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3383 rdev->pdev->subsystem_device == 0x30a4) 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_RS480 && in radeon_combios_asic_init()
3390 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3391 rdev->pdev->subsystem_device == 0x30ae) in radeon_combios_asic_init()
3395 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3397 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3398 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3399 rdev->pdev->subsystem_device == 0x280a) in radeon_combios_asic_init()
3401 /* quirk for rs4xx Toshiba Sattellite L20-183 latop to make it resume in radeon_combios_asic_init()
3402 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3404 if (rdev->family == CHIP_RS400 && in radeon_combios_asic_init()
3405 rdev->pdev->subsystem_vendor == 0x1179 && in radeon_combios_asic_init()
3406 rdev->pdev->subsystem_device == 0xff31) in radeon_combios_asic_init()
3418 struct radeon_device *rdev = dev->dev_private; in radeon_combios_initialize_bios_scratch_regs()
3442 struct drm_device *dev = encoder->dev; in radeon_combios_output_lock()
3443 struct radeon_device *rdev = dev->dev_private; in radeon_combios_output_lock()
3461 struct drm_device *dev = connector->dev; in radeon_combios_connected_scratch_regs()
3462 struct radeon_device *rdev = dev->dev_private; in radeon_combios_connected_scratch_regs()
3469 if ((radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3470 (radeon_connector->devices & ATOM_DEVICE_TV1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3475 /*save->bios_4_scratch |= RADEON_TV1_ATTACHED_COMP; */ in radeon_combios_connected_scratch_regs()
3485 if ((radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3486 (radeon_connector->devices & ATOM_DEVICE_LCD1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3499 if ((radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3500 (radeon_connector->devices & ATOM_DEVICE_CRT1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3513 if ((radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3514 (radeon_connector->devices & ATOM_DEVICE_CRT2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3527 if ((radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3528 (radeon_connector->devices & ATOM_DEVICE_DFP1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3541 if ((radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3542 (radeon_connector->devices & ATOM_DEVICE_DFP2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3562 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_crtc_scratch_regs()
3563 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_crtc_scratch_regs()
3567 if (radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3571 if (radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3575 if (radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3579 if (radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3583 if (radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3587 if (radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3597 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_dpms_scratch_regs()
3598 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_dpms_scratch_regs()
3602 if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3608 if (radeon_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3614 if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3620 if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()