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
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()
375 edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE); in radeon_combios_check_hardcoded_edid()
379 raw = rdev->bios + edid_info; in radeon_combios_check_hardcoded_edid()
392 rdev->mode_info.bios_hardcoded_edid = edid; in radeon_combios_check_hardcoded_edid()
393 rdev->mode_info.bios_hardcoded_edid_size = size; in radeon_combios_check_hardcoded_edid()
403 if (rdev->mode_info.bios_hardcoded_edid) { in radeon_bios_get_hardcoded_edid()
404 edid = kmalloc(rdev->mode_info.bios_hardcoded_edid_size, GFP_KERNEL); in radeon_bios_get_hardcoded_edid()
407 (unsigned char *)rdev->mode_info.bios_hardcoded_edid, in radeon_bios_get_hardcoded_edid()
408 rdev->mode_info.bios_hardcoded_edid_size); in radeon_bios_get_hardcoded_edid()
463 if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
464 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
465 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
467 else if (rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
468 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
475 if (rdev->family == CHIP_R200 || in combios_setup_i2c_bus()
476 rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
477 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
480 } else if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
481 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
482 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
484 else if (rdev->family >= CHIP_RV350) { in combios_setup_i2c_bus()
554 switch (rdev->family) { in combios_setup_i2c_bus()
617 * reliably on some pre-r4xx hardware; not sure why. in combios_setup_i2c_bus()
633 i2c.hpd = RADEON_HPD_NONE; in combios_setup_i2c_bus()
645 struct drm_device *dev = rdev->ddev; in radeon_combios_get_i2c_info_from_table()
673 struct drm_device *dev = rdev->ddev; in radeon_combios_i2c_init()
689 rdev->i2c_bus[0] = radeon_i2c_create(dev, &i2c, "DVI_DDC"); in radeon_combios_i2c_init()
692 rdev->i2c_bus[1] = radeon_i2c_create(dev, &i2c, "VGA_DDC"); in radeon_combios_i2c_init()
699 rdev->i2c_bus[2] = radeon_i2c_create(dev, &i2c, "MM_I2C"); in radeon_combios_i2c_init()
701 if (rdev->family == CHIP_R300 || in radeon_combios_i2c_init()
702 rdev->family == CHIP_R350) { in radeon_combios_i2c_init()
704 } else if (rdev->family == CHIP_RS300 || in radeon_combios_i2c_init()
705 rdev->family == CHIP_RS400 || in radeon_combios_i2c_init()
706 rdev->family == CHIP_RS480) { in radeon_combios_i2c_init()
709 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
714 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "GPIOPAD_MASK"); in radeon_combios_i2c_init()
715 } else if ((rdev->family == CHIP_R200) || in radeon_combios_i2c_init()
716 (rdev->family >= CHIP_R300)) { in radeon_combios_i2c_init()
719 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
723 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
726 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "CRT2_DDC"); in radeon_combios_i2c_init()
732 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_clock_info()
734 struct radeon_pll *p1pll = &rdev->clock.p1pll; in radeon_combios_get_clock_info()
735 struct radeon_pll *p2pll = &rdev->clock.p2pll; in radeon_combios_get_clock_info()
736 struct radeon_pll *spll = &rdev->clock.spll; in radeon_combios_get_clock_info()
737 struct radeon_pll *mpll = &rdev->clock.mpll; in radeon_combios_get_clock_info()
746 p1pll->reference_freq = RBIOS16(pll_info + 0xe); in radeon_combios_get_clock_info()
747 p1pll->reference_div = RBIOS16(pll_info + 0x10); in radeon_combios_get_clock_info()
748 p1pll->pll_out_min = RBIOS32(pll_info + 0x12); in radeon_combios_get_clock_info()
749 p1pll->pll_out_max = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
750 p1pll->lcd_pll_out_min = p1pll->pll_out_min; in radeon_combios_get_clock_info()
751 p1pll->lcd_pll_out_max = p1pll->pll_out_max; in radeon_combios_get_clock_info()
754 p1pll->pll_in_min = RBIOS32(pll_info + 0x36); in radeon_combios_get_clock_info()
755 p1pll->pll_in_max = RBIOS32(pll_info + 0x3a); in radeon_combios_get_clock_info()
757 p1pll->pll_in_min = 40; in radeon_combios_get_clock_info()
758 p1pll->pll_in_max = 500; in radeon_combios_get_clock_info()
763 spll->reference_freq = RBIOS16(pll_info + 0x1a); in radeon_combios_get_clock_info()
764 spll->reference_div = RBIOS16(pll_info + 0x1c); in radeon_combios_get_clock_info()
765 spll->pll_out_min = RBIOS32(pll_info + 0x1e); in radeon_combios_get_clock_info()
766 spll->pll_out_max = RBIOS32(pll_info + 0x22); in radeon_combios_get_clock_info()
769 spll->pll_in_min = RBIOS32(pll_info + 0x48); in radeon_combios_get_clock_info()
770 spll->pll_in_max = RBIOS32(pll_info + 0x4c); in radeon_combios_get_clock_info()
773 spll->pll_in_min = 40; in radeon_combios_get_clock_info()
774 spll->pll_in_max = 500; in radeon_combios_get_clock_info()
778 mpll->reference_freq = RBIOS16(pll_info + 0x26); in radeon_combios_get_clock_info()
779 mpll->reference_div = RBIOS16(pll_info + 0x28); in radeon_combios_get_clock_info()
780 mpll->pll_out_min = RBIOS32(pll_info + 0x2a); in radeon_combios_get_clock_info()
781 mpll->pll_out_max = RBIOS32(pll_info + 0x2e); in radeon_combios_get_clock_info()
784 mpll->pll_in_min = RBIOS32(pll_info + 0x5a); in radeon_combios_get_clock_info()
785 mpll->pll_in_max = RBIOS32(pll_info + 0x5e); in radeon_combios_get_clock_info()
788 mpll->pll_in_min = 40; in radeon_combios_get_clock_info()
789 mpll->pll_in_max = 500; in radeon_combios_get_clock_info()
800 rdev->clock.default_sclk = sclk; in radeon_combios_get_clock_info()
801 rdev->clock.default_mclk = mclk; in radeon_combios_get_clock_info()
804 rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
806 rdev->clock.max_pixel_clock = 35000; /* might need something asic specific */ in radeon_combios_get_clock_info()
815 struct drm_device *dev = rdev->ddev; in radeon_combios_sideport_present()
819 if (rdev->family == CHIP_RS400) in radeon_combios_sideport_present()
855 p_dac->ps2_pdac_adj = default_primarydac_adj[rdev->family]; in radeon_legacy_get_primary_dac_info_from_table()
863 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_primary_dac_info()
864 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_primary_dac_info()
883 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
887 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
898 if (((rdev->pdev->device == 0x5159) && in radeon_combios_get_primary_dac_info()
899 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
900 (rdev->pdev->subsystem_device == 0x7c28)) || in radeon_combios_get_primary_dac_info()
902 ((rdev->pdev->device == 0x514D) && in radeon_combios_get_primary_dac_info()
903 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
904 (rdev->pdev->subsystem_device == 0x7149))) { in radeon_combios_get_primary_dac_info()
918 struct drm_device *dev = rdev->ddev; in radeon_combios_get_tv_info()
936 DRM_DEBUG_KMS("Default TV standard: PAL-M\n"); in radeon_combios_get_tv_info()
940 DRM_DEBUG_KMS("Default TV standard: PAL-60\n"); in radeon_combios_get_tv_info()
944 DRM_DEBUG_KMS("Default TV standard: NTSC-J\n"); in radeon_combios_get_tv_info()
948 DRM_DEBUG_KMS("Default TV standard: SCART-PAL\n"); in radeon_combios_get_tv_info()
1002 tv_dac->ps2_tvdac_adj = default_tvdac_adj[rdev->family]; in radeon_legacy_get_tv_dac_info_from_table()
1003 if ((rdev->flags & RADEON_IS_MOBILITY) && (rdev->family == CHIP_RV250)) in radeon_legacy_get_tv_dac_info_from_table()
1004 tv_dac->ps2_tvdac_adj = 0x00880000; in radeon_legacy_get_tv_dac_info_from_table()
1005 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1006 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1014 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_tv_dac_info()
1015 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_tv_dac_info()
1032 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1036 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1040 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1042 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1047 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1051 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1055 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1057 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1060 tv_dac->tv_std = radeon_combios_get_tv_info(rdev); in radeon_combios_get_tv_dac_info()
1071 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1073 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1074 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1076 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1081 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1083 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1084 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1086 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1090 DRM_INFO("No TV DAC info found in BIOS\n"); in radeon_combios_get_tv_dac_info()
1117 /* These should be fail-safe defaults, fingers crossed */ in radeon_legacy_get_lvds_info_from_regs()
1118 lvds->panel_pwr_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1119 lvds->panel_vcc_delay = 2000; in radeon_legacy_get_lvds_info_from_regs()
1121 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); in radeon_legacy_get_lvds_info_from_regs()
1122 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1123 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1126 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1130 lvds->native_mode.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1134 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1138 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1141 if ((lvds->native_mode.hdisplay < 640) || in radeon_legacy_get_lvds_info_from_regs()
1142 (lvds->native_mode.vdisplay < 480)) { in radeon_legacy_get_lvds_info_from_regs()
1143 lvds->native_mode.hdisplay = 640; in radeon_legacy_get_lvds_info_from_regs()
1144 lvds->native_mode.vdisplay = 480; in radeon_legacy_get_lvds_info_from_regs()
1150 lvds->use_bios_dividers = false; in radeon_legacy_get_lvds_info_from_regs()
1152 lvds->panel_ref_divider = in radeon_legacy_get_lvds_info_from_regs()
1154 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1155 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1157 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1158 (lvds->panel_fb_divider > 3)) in radeon_legacy_get_lvds_info_from_regs()
1159 lvds->use_bios_dividers = true; in radeon_legacy_get_lvds_info_from_regs()
1161 lvds->panel_vcc_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1164 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_legacy_get_lvds_info_from_regs()
1165 lvds->native_mode.vdisplay); in radeon_legacy_get_lvds_info_from_regs()
1173 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_lvds_info()
1174 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_lvds_info()
1195 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1196 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1198 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_combios_get_lvds_info()
1199 lvds->native_mode.vdisplay); in radeon_combios_get_lvds_info()
1201 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1202 lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000); in radeon_combios_get_lvds_info()
1204 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1205 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1206 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1208 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1209 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1210 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1211 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1212 (lvds->panel_fb_divider > 3)) in radeon_combios_get_lvds_info()
1213 lvds->use_bios_dividers = true; in radeon_combios_get_lvds_info()
1216 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1218 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_FORMAT; in radeon_combios_get_lvds_info()
1221 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_TYPE; in radeon_combios_get_lvds_info()
1225 lvds->lvds_gen_cntl |= RADEON_LVDS_NO_FM; in radeon_combios_get_lvds_info()
1228 lvds->lvds_gen_cntl |= RADEON_LVDS_2_GREY; in radeon_combios_get_lvds_info()
1231 lvds->lvds_gen_cntl |= RADEON_LVDS_4_GREY; in radeon_combios_get_lvds_info()
1238 lvds->lvds_gen_cntl |= RADEON_LVDS_FP_POL_LOW; in radeon_combios_get_lvds_info()
1241 lvds->lvds_gen_cntl |= RADEON_LVDS_LP_POL_LOW; in radeon_combios_get_lvds_info()
1244 lvds->lvds_gen_cntl |= RADEON_LVDS_DTM_POL_LOW; in radeon_combios_get_lvds_info()
1247 lvds->lvds_gen_cntl |= RADEON_LVDS_BL_CLK_SEL; in radeon_combios_get_lvds_info()
1249 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1256 if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) && in radeon_combios_get_lvds_info()
1257 (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) { in radeon_combios_get_lvds_info()
1258 u32 hss = (RBIOS16(tmp + 21) - RBIOS16(tmp + 19) - 1) * 8; in radeon_combios_get_lvds_info()
1260 if (hss > lvds->native_mode.hdisplay) in radeon_combios_get_lvds_info()
1261 hss = (10 - 1) * 8; in radeon_combios_get_lvds_info()
1263 lvds->native_mode.htotal = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1264 (RBIOS16(tmp + 17) - RBIOS16(tmp + 19)) * 8; in radeon_combios_get_lvds_info()
1265 lvds->native_mode.hsync_start = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1267 lvds->native_mode.hsync_end = lvds->native_mode.hsync_start + in radeon_combios_get_lvds_info()
1270 lvds->native_mode.vtotal = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1271 (RBIOS16(tmp + 24) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1272 lvds->native_mode.vsync_start = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1273 ((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1274 lvds->native_mode.vsync_end = lvds->native_mode.vsync_start + in radeon_combios_get_lvds_info()
1277 lvds->native_mode.clock = RBIOS16(tmp + 9) * 10; in radeon_combios_get_lvds_info()
1278 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1280 drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); in radeon_combios_get_lvds_info()
1285 DRM_INFO("No panel info found in BIOS\n"); in radeon_combios_get_lvds_info()
1290 encoder->native_mode = lvds->native_mode; in radeon_combios_get_lvds_info()
1318 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_table()
1319 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_table()
1323 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_table()
1324 default_tmds_pll[rdev->family][i].value; in radeon_legacy_get_tmds_info_from_table()
1325 tmds->tmds_pll[i].freq = default_tmds_pll[rdev->family][i].freq; in radeon_legacy_get_tmds_info_from_table()
1334 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_combios()
1335 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_combios()
1350 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1352 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1355 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1356 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1364 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1366 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1373 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1374 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1378 DRM_INFO("No TMDS info found in BIOS\n"); in radeon_legacy_get_tmds_info_from_combios()
1387 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_table()
1388 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_table()
1393 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_table()
1396 switch (rdev->mode_info.connector_table) { in radeon_legacy_get_ext_tmds_info_from_table()
1400 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_table()
1401 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_table()
1411 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_combios()
1412 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_combios()
1418 tmds->i2c_bus = NULL; in radeon_legacy_get_ext_tmds_info_from_combios()
1419 if (rdev->flags & RADEON_IS_IGP) { in radeon_legacy_get_ext_tmds_info_from_combios()
1421 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1422 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_combios()
1423 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1429 tmds->slave_addr = RBIOS8(offset + 4 + 2); in radeon_legacy_get_ext_tmds_info_from_combios()
1430 tmds->slave_addr >>= 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1440 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1444 if (!tmds->i2c_bus) { in radeon_legacy_get_ext_tmds_info_from_combios()
1445 DRM_INFO("No valid Ext TMDS info found in BIOS\n"); in radeon_legacy_get_ext_tmds_info_from_combios()
1454 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_table()
1456 struct radeon_hpd hpd; in radeon_get_legacy_connector_info_from_table() local
1458 rdev->mode_info.connector_table = radeon_connector_table; in radeon_get_legacy_connector_info_from_table()
1459 if (rdev->mode_info.connector_table == CT_NONE) { in radeon_get_legacy_connector_info_from_table()
1463 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; in radeon_get_legacy_connector_info_from_table()
1467 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1474 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1477 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1483 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1491 rdev->mode_info.connector_table = CT_IBOOK; in radeon_get_legacy_connector_info_from_table()
1494 rdev->mode_info.connector_table = CT_MAC_G4_SILVER; in radeon_get_legacy_connector_info_from_table()
1497 rdev->mode_info.connector_table = CT_EMAC; in radeon_get_legacy_connector_info_from_table()
1500 rdev->mode_info.connector_table = CT_MINI_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1503 rdev->mode_info.connector_table = CT_MINI_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1507 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT; in radeon_get_legacy_connector_info_from_table()
1508 } else if ((rdev->pdev->device == 0x4a48) && in radeon_get_legacy_connector_info_from_table()
1509 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1510 (rdev->pdev->subsystem_device == 0x4a48)) { in radeon_get_legacy_connector_info_from_table()
1512 rdev->mode_info.connector_table = CT_MAC_X800; in radeon_get_legacy_connector_info_from_table()
1515 (rdev->pdev->device == 0x4150) && in radeon_get_legacy_connector_info_from_table()
1516 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1517 (rdev->pdev->subsystem_device == 0x4150)) { in radeon_get_legacy_connector_info_from_table()
1519 rdev->mode_info.connector_table = CT_MAC_G5_9600; in radeon_get_legacy_connector_info_from_table()
1520 } else if ((rdev->pdev->device == 0x4c66) && in radeon_get_legacy_connector_info_from_table()
1521 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1522 (rdev->pdev->subsystem_device == 0x4c66)) { in radeon_get_legacy_connector_info_from_table()
1524 rdev->mode_info.connector_table = CT_SAM440EP; in radeon_get_legacy_connector_info_from_table()
1529 rdev->mode_info.connector_table = CT_RN50_POWER; in radeon_get_legacy_connector_info_from_table()
1532 rdev->mode_info.connector_table = CT_GENERIC; in radeon_get_legacy_connector_info_from_table()
1535 switch (rdev->mode_info.connector_table) { in radeon_get_legacy_connector_info_from_table()
1538 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1540 if (rdev->flags & RADEON_SINGLE_CRTC) { in radeon_get_legacy_connector_info_from_table()
1541 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1543 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1554 &hpd); in radeon_get_legacy_connector_info_from_table()
1555 } else if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_get_legacy_connector_info_from_table()
1558 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1569 &hpd); in radeon_get_legacy_connector_info_from_table()
1571 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1573 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1584 &hpd); in radeon_get_legacy_connector_info_from_table()
1586 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1588 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_table()
1605 &hpd); in radeon_get_legacy_connector_info_from_table()
1607 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1609 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1620 &hpd); in radeon_get_legacy_connector_info_from_table()
1623 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_table()
1624 /* TV - tv dac */ in radeon_get_legacy_connector_info_from_table()
1626 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1637 &hpd); in radeon_get_legacy_connector_info_from_table()
1642 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1645 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1654 &hpd); in radeon_get_legacy_connector_info_from_table()
1655 /* VGA - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1657 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1666 &hpd); in radeon_get_legacy_connector_info_from_table()
1667 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1669 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1679 &hpd); in radeon_get_legacy_connector_info_from_table()
1683 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1686 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1695 &hpd); in radeon_get_legacy_connector_info_from_table()
1696 /* DVI-I - primary dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1698 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1715 &hpd); in radeon_get_legacy_connector_info_from_table()
1716 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1718 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1728 &hpd); in radeon_get_legacy_connector_info_from_table()
1732 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1735 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1744 &hpd); in radeon_get_legacy_connector_info_from_table()
1745 /* DVI-I - primary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1747 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1763 &hpd); in radeon_get_legacy_connector_info_from_table()
1764 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1766 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1776 &hpd); in radeon_get_legacy_connector_info_from_table()
1780 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1783 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1792 &hpd); in radeon_get_legacy_connector_info_from_table()
1793 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1795 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1804 &hpd); in radeon_get_legacy_connector_info_from_table()
1805 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1807 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1817 &hpd); in radeon_get_legacy_connector_info_from_table()
1821 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1822 /* DVI-I - tv dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1824 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1841 &hpd); in radeon_get_legacy_connector_info_from_table()
1842 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1844 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1854 &hpd); in radeon_get_legacy_connector_info_from_table()
1858 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1859 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1861 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1877 &hpd); in radeon_get_legacy_connector_info_from_table()
1878 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1880 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1890 &hpd); in radeon_get_legacy_connector_info_from_table()
1894 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1895 /* DVI-D - int tmds */ in radeon_get_legacy_connector_info_from_table()
1897 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
1906 &hpd); in radeon_get_legacy_connector_info_from_table()
1907 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1909 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1918 &hpd); in radeon_get_legacy_connector_info_from_table()
1919 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1921 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1931 &hpd); in radeon_get_legacy_connector_info_from_table()
1935 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1936 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1938 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1947 &hpd); in radeon_get_legacy_connector_info_from_table()
1948 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1950 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1959 &hpd); in radeon_get_legacy_connector_info_from_table()
1960 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1962 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1972 &hpd); in radeon_get_legacy_connector_info_from_table()
1975 DRM_INFO("Connector Table: %d (rn50-power)\n", in radeon_get_legacy_connector_info_from_table()
1976 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1977 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1979 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1988 &hpd); in radeon_get_legacy_connector_info_from_table()
1990 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
1999 &hpd); in radeon_get_legacy_connector_info_from_table()
2003 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2004 /* DVI - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2006 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2022 &hpd); in radeon_get_legacy_connector_info_from_table()
2023 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2025 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2041 &hpd); in radeon_get_legacy_connector_info_from_table()
2045 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2046 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2048 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2064 &hpd); in radeon_get_legacy_connector_info_from_table()
2065 /* ADC - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2067 hpd.hpd = RADEON_HPD_2; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2083 &hpd); in radeon_get_legacy_connector_info_from_table()
2084 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2086 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2096 &hpd); in radeon_get_legacy_connector_info_from_table()
2100 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2103 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2112 &hpd); in radeon_get_legacy_connector_info_from_table()
2113 /* DVI-I - secondary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2115 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2131 &hpd); in radeon_get_legacy_connector_info_from_table()
2132 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2134 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2144 &hpd); in radeon_get_legacy_connector_info_from_table()
2145 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2147 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2157 &hpd); in radeon_get_legacy_connector_info_from_table()
2161 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2162 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2164 hpd.hpd = RADEON_HPD_1; /* ??? */ in radeon_get_legacy_connector_info_from_table()
2180 &hpd); in radeon_get_legacy_connector_info_from_table()
2181 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2183 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2192 &hpd); in radeon_get_legacy_connector_info_from_table()
2193 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2195 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_table()
2205 &hpd); in radeon_get_legacy_connector_info_from_table()
2209 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2223 struct radeon_hpd *hpd) in radeon_apply_legacy_quirks() argument
2225 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_quirks()
2228 one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ in radeon_apply_legacy_quirks()
2229 if (rdev->pdev->device == 0x515e && in radeon_apply_legacy_quirks()
2230 rdev->pdev->subsystem_vendor == 0x1014) { in radeon_apply_legacy_quirks()
2232 ddc_i2c->mask_clk_reg == RADEON_GPIO_CRT2_DDC) in radeon_apply_legacy_quirks()
2236 /* X300 card with extra non-existent DVI port */ in radeon_apply_legacy_quirks()
2237 if (rdev->pdev->device == 0x5B60 && in radeon_apply_legacy_quirks()
2238 rdev->pdev->subsystem_vendor == 0x17af && in radeon_apply_legacy_quirks()
2239 rdev->pdev->subsystem_device == 0x201e && bios_index == 2) { in radeon_apply_legacy_quirks()
2249 struct radeon_device *rdev = dev->dev_private; in radeon_apply_legacy_tv_quirks()
2251 /* Acer 5102 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2252 if (rdev->pdev->device == 0x5975 && in radeon_apply_legacy_tv_quirks()
2253 rdev->pdev->subsystem_vendor == 0x1025 && in radeon_apply_legacy_tv_quirks()
2254 rdev->pdev->subsystem_device == 0x009f) in radeon_apply_legacy_tv_quirks()
2257 /* HP dc5750 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2258 if (rdev->pdev->device == 0x5974 && in radeon_apply_legacy_tv_quirks()
2259 rdev->pdev->subsystem_vendor == 0x103c && in radeon_apply_legacy_tv_quirks()
2260 rdev->pdev->subsystem_device == 0x280a) in radeon_apply_legacy_tv_quirks()
2263 /* MSI S270 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2264 if (rdev->pdev->device == 0x5955 && in radeon_apply_legacy_tv_quirks()
2265 rdev->pdev->subsystem_vendor == 0x1462 && in radeon_apply_legacy_tv_quirks()
2266 rdev->pdev->subsystem_device == 0x0131) in radeon_apply_legacy_tv_quirks()
2274 struct radeon_device *rdev = dev->dev_private; in combios_check_dl_dvi()
2277 if (rdev->flags & RADEON_IS_IGP) { in combios_check_dl_dvi()
2309 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_bios()
2316 struct radeon_hpd hpd; in radeon_get_legacy_connector_info_from_bios() local
2341 hpd.hpd = RADEON_HPD_2; in radeon_get_legacy_connector_info_from_bios()
2343 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_bios()
2346 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2351 &ddc_i2c, &hpd)) in radeon_get_legacy_connector_info_from_bios()
2369 &hpd); in radeon_get_legacy_connector_info_from_bios()
2396 &hpd); in radeon_get_legacy_connector_info_from_bios()
2417 /* RV100 board with external TDMS bit mis-set. in radeon_get_legacy_connector_info_from_bios()
2420 if (rdev->pdev->device == 0x5159 && in radeon_get_legacy_connector_info_from_bios()
2421 rdev->pdev->subsystem_vendor == 0x1014 && in radeon_get_legacy_connector_info_from_bios()
2422 rdev->pdev->subsystem_device == 0x029A) { in radeon_get_legacy_connector_info_from_bios()
2451 &hpd); in radeon_get_legacy_connector_info_from_bios()
2470 &hpd); in radeon_get_legacy_connector_info_from_bios()
2486 &hpd); in radeon_get_legacy_connector_info_from_bios()
2513 hpd.hpd = RADEON_HPD_1; in radeon_get_legacy_connector_info_from_bios()
2521 &hpd); in radeon_get_legacy_connector_info_from_bios()
2533 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2540 &hpd); in radeon_get_legacy_connector_info_from_bios()
2542 DRM_DEBUG_KMS("No connector info found\n"); in radeon_get_legacy_connector_info_from_bios()
2548 if (rdev->flags & RADEON_IS_MOBILITY || rdev->flags & RADEON_IS_IGP) { in radeon_get_legacy_connector_info_from_bios()
2590 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2597 &hpd); in radeon_get_legacy_connector_info_from_bios()
2602 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_bios()
2608 hpd.hpd = RADEON_HPD_NONE; in radeon_get_legacy_connector_info_from_bios()
2621 &hpd); in radeon_get_legacy_connector_info_from_bios()
2640 struct drm_device *dev = rdev->ddev; in radeon_combios_get_power_modes()
2646 rdev->pm.default_power_state_index = -1; in radeon_combios_get_power_modes()
2649 rdev->pm.power_state = kcalloc(2, sizeof(struct radeon_power_state), in radeon_combios_get_power_modes()
2651 if (rdev->pm.power_state) { in radeon_combios_get_power_modes()
2653 rdev->pm.power_state[0].clock_info = in radeon_combios_get_power_modes()
2656 rdev->pm.power_state[1].clock_info = in radeon_combios_get_power_modes()
2659 if (!rdev->pm.power_state[0].clock_info || in radeon_combios_get_power_modes()
2660 !rdev->pm.power_state[1].clock_info) in radeon_combios_get_power_modes()
2701 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2702 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2707 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2711 /* boards with a thermal chip, but no overdrive table */ in radeon_combios_get_power_modes()
2714 if ((rdev->pdev->device == 0x4152) && in radeon_combios_get_power_modes()
2715 (rdev->pdev->subsystem_vendor == 0x1043) && in radeon_combios_get_power_modes()
2716 (rdev->pdev->subsystem_device == 0xc002)) { in radeon_combios_get_power_modes()
2718 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_combios_get_power_modes()
2719 if (rdev->pm.i2c_bus) { in radeon_combios_get_power_modes()
2724 i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info); in radeon_combios_get_power_modes()
2731 if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_combios_get_power_modes()
2736 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2737 rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2); in radeon_combios_get_power_modes()
2738 rdev->pm.power_state[state_index].clock_info[0].sclk = RBIOS32(offset + 0x5 + 0x6); in radeon_combios_get_power_modes()
2739 if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || in radeon_combios_get_power_modes()
2740 (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) in radeon_combios_get_power_modes()
2742 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2747 rdev->pm.power_state[state_index].misc = misc; in radeon_combios_get_power_modes()
2748 rdev->pm.power_state[state_index].misc2 = misc2; in radeon_combios_get_power_modes()
2750 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; in radeon_combios_get_power_modes()
2752 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2755 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2757 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = true; in radeon_combios_get_power_modes()
2759 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2762 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2767 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2770 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2772 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = false; in radeon_combios_get_power_modes()
2777 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 0; in radeon_combios_get_power_modes()
2780 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 33; in radeon_combios_get_power_modes()
2783 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 66; in radeon_combios_get_power_modes()
2786 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 99; in radeon_combios_get_power_modes()
2789 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 132; in radeon_combios_get_power_modes()
2793 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2795 rdev->pm.power_state[state_index].pcie_lanes = in radeon_combios_get_power_modes()
2797 rdev->pm.power_state[state_index].flags = RADEON_PM_STATE_SINGLE_DISPLAY_ONLY; in radeon_combios_get_power_modes()
2808 rdev->pm.power_state[state_index].type = in radeon_combios_get_power_modes()
2810 rdev->pm.power_state[state_index].num_clock_modes = 1; in radeon_combios_get_power_modes()
2811 rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; in radeon_combios_get_power_modes()
2812 rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; in radeon_combios_get_power_modes()
2813 …rdev->pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_in… in radeon_combios_get_power_modes()
2815 (rdev->pm.power_state[0].clock_info[0].voltage.type == VOLTAGE_GPIO)) in radeon_combios_get_power_modes()
2816 rdev->pm.power_state[state_index].clock_info[0].voltage = in radeon_combios_get_power_modes()
2817 rdev->pm.power_state[0].clock_info[0].voltage; in radeon_combios_get_power_modes()
2819 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2820 rdev->pm.power_state[state_index].pcie_lanes = 16; in radeon_combios_get_power_modes()
2821 rdev->pm.power_state[state_index].flags = 0; in radeon_combios_get_power_modes()
2822 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2823 rdev->pm.num_power_states = state_index + 1; in radeon_combios_get_power_modes()
2825 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2826 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2830 rdev->pm.default_power_state_index = state_index; in radeon_combios_get_power_modes()
2831 rdev->pm.num_power_states = 0; in radeon_combios_get_power_modes()
2833 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; in radeon_combios_get_power_modes()
2834 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2840 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_external_tmds_setup()
2845 switch (tmds->dvo_chip) { in radeon_external_tmds_setup()
2848 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2849 tmds->slave_addr, in radeon_external_tmds_setup()
2851 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2852 tmds->slave_addr, in radeon_external_tmds_setup()
2854 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2855 tmds->slave_addr, in radeon_external_tmds_setup()
2857 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2858 tmds->slave_addr, in radeon_external_tmds_setup()
2860 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_external_tmds_setup()
2861 tmds->slave_addr, in radeon_external_tmds_setup()
2865 /* sil 1178 - untested */ in radeon_external_tmds_setup()
2886 struct drm_device *dev = encoder->dev; in radeon_combios_external_tmds_setup()
2887 struct radeon_device *rdev = dev->dev_private; in radeon_combios_external_tmds_setup()
2893 struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; in radeon_combios_external_tmds_setup()
2898 if (rdev->flags & RADEON_IS_IGP) { in radeon_combios_external_tmds_setup()
2944 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
2952 blocks--; in radeon_combios_external_tmds_setup()
2999 radeon_i2c_put_byte(tmds->i2c_bus, in radeon_combios_external_tmds_setup()
3000 tmds->slave_addr, in radeon_combios_external_tmds_setup()
3017 struct radeon_device *rdev = dev->dev_private; in combios_parse_mmio_table()
3068 while (val--) { in combios_parse_mmio_table()
3077 while (val--) { in combios_parse_mmio_table()
3096 struct radeon_device *rdev = dev->dev_private; in combios_parse_pll_table()
3136 while (tmp--) { in combios_parse_pll_table()
3145 while (tmp--) { in combios_parse_pll_table()
3187 struct radeon_device *rdev = dev->dev_private; in combios_parse_ram_reset_table()
3205 while (tmp--) { in combios_parse_ram_reset_table()
3234 struct radeon_device *rdev = dev->dev_private; in combios_detect_ram()
3251 while (ram--) { in combios_detect_ram()
3265 struct radeon_device *rdev = dev->dev_private; in combios_write_ram_size()
3272 if (rdev->flags & RADEON_IS_IGP) in combios_write_ram_size()
3282 if ((rdev->family < CHIP_R200) && in combios_write_ram_size()
3292 rev = RBIOS8(offset - 1); in combios_write_ram_size()
3294 if ((rdev->family < CHIP_R200) in combios_write_ram_size()
3327 struct radeon_device *rdev = dev->dev_private; in radeon_combios_asic_init()
3331 if (rdev->bios == NULL) in radeon_combios_asic_init()
3349 if (!(rdev->flags & RADEON_IS_IGP)) { 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 == 0x308b) 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 == 0x30a4) in radeon_combios_asic_init()
3388 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3390 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3391 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3392 rdev->pdev->subsystem_device == 0x30ae) in radeon_combios_asic_init()
3396 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3398 if (rdev->family == CHIP_RS480 && in radeon_combios_asic_init()
3399 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3400 rdev->pdev->subsystem_device == 0x280a) in radeon_combios_asic_init()
3402 /* quirk for rs4xx Toshiba Sattellite L20-183 latop to make it resume in radeon_combios_asic_init()
3403 * - it hangs on resume inside the dynclk 1 table. in radeon_combios_asic_init()
3405 if (rdev->family == CHIP_RS400 && in radeon_combios_asic_init()
3406 rdev->pdev->subsystem_vendor == 0x1179 && in radeon_combios_asic_init()
3407 rdev->pdev->subsystem_device == 0xff31) in radeon_combios_asic_init()
3419 struct radeon_device *rdev = dev->dev_private; in radeon_combios_initialize_bios_scratch_regs()
3443 struct drm_device *dev = encoder->dev; in radeon_combios_output_lock()
3444 struct radeon_device *rdev = dev->dev_private; in radeon_combios_output_lock()
3462 struct drm_device *dev = connector->dev; in radeon_combios_connected_scratch_regs()
3463 struct radeon_device *rdev = dev->dev_private; in radeon_combios_connected_scratch_regs()
3470 if ((radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3471 (radeon_connector->devices & ATOM_DEVICE_TV1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3476 /*save->bios_4_scratch |= RADEON_TV1_ATTACHED_COMP; */ in radeon_combios_connected_scratch_regs()
3486 if ((radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3487 (radeon_connector->devices & ATOM_DEVICE_LCD1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3500 if ((radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3501 (radeon_connector->devices & ATOM_DEVICE_CRT1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3514 if ((radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3515 (radeon_connector->devices & ATOM_DEVICE_CRT2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3528 if ((radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) && in radeon_combios_connected_scratch_regs()
3529 (radeon_connector->devices & ATOM_DEVICE_DFP1_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3542 if ((radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) && in radeon_combios_connected_scratch_regs()
3543 (radeon_connector->devices & ATOM_DEVICE_DFP2_SUPPORT)) { in radeon_combios_connected_scratch_regs()
3563 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_crtc_scratch_regs()
3564 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_crtc_scratch_regs()
3568 if (radeon_encoder->devices & ATOM_DEVICE_TV1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3572 if (radeon_encoder->devices & ATOM_DEVICE_CRT1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3576 if (radeon_encoder->devices & ATOM_DEVICE_CRT2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3580 if (radeon_encoder->devices & ATOM_DEVICE_LCD1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3584 if (radeon_encoder->devices & ATOM_DEVICE_DFP1_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3588 if (radeon_encoder->devices & ATOM_DEVICE_DFP2_SUPPORT) { in radeon_combios_encoder_crtc_scratch_regs()
3598 struct drm_device *dev = encoder->dev; in radeon_combios_encoder_dpms_scratch_regs()
3599 struct radeon_device *rdev = dev->dev_private; in radeon_combios_encoder_dpms_scratch_regs()
3603 if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3609 if (radeon_encoder->devices & (ATOM_DEVICE_CRT_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3615 if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()
3621 if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { in radeon_combios_encoder_dpms_scratch_regs()