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

3  * Copyright 2007-8 Advanced Micro Devices, Inc.
136 struct radeon_device *rdev = dev->dev_private; in combios_get_table_offset()
140 if (!rdev->bios) in combios_get_table_offset()
365 size = RBIOS8(rdev->bios_header_start + 0x6); in combios_get_table_offset()
368 offset = RBIOS16(rdev->bios_header_start + check_offset); in combios_get_table_offset()
378 edid_info = combios_get_table_offset(rdev->ddev, COMBIOS_HARDCODED_EDID_TABLE); in radeon_combios_check_hardcoded_edid()
382 raw = rdev->bios + edid_info; in radeon_combios_check_hardcoded_edid()
395 rdev->mode_info.bios_hardcoded_edid = edid; in radeon_combios_check_hardcoded_edid()
396 rdev->mode_info.bios_hardcoded_edid_size = size; in radeon_combios_check_hardcoded_edid()
406 if (rdev->mode_info.bios_hardcoded_edid) { in radeon_bios_get_hardcoded_edid()
407 edid = kmalloc(rdev->mode_info.bios_hardcoded_edid_size, GFP_KERNEL); in radeon_bios_get_hardcoded_edid()
410 (unsigned char *)rdev->mode_info.bios_hardcoded_edid, in radeon_bios_get_hardcoded_edid()
411 rdev->mode_info.bios_hardcoded_edid_size); in radeon_bios_get_hardcoded_edid()
466 if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
467 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
468 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
470 else if (rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
471 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
478 if (rdev->family == CHIP_R200 || in combios_setup_i2c_bus()
479 rdev->family == CHIP_R300 || in combios_setup_i2c_bus()
480 rdev->family == CHIP_R350) { in combios_setup_i2c_bus()
483 } else if (rdev->family == CHIP_RS300 || in combios_setup_i2c_bus()
484 rdev->family == CHIP_RS400 || in combios_setup_i2c_bus()
485 rdev->family == CHIP_RS480) in combios_setup_i2c_bus()
487 else if (rdev->family >= CHIP_RV350) { in combios_setup_i2c_bus()
557 switch (rdev->family) { in combios_setup_i2c_bus()
620 * reliably on some pre-r4xx hardware; not sure why. in combios_setup_i2c_bus()
648 struct drm_device *dev = rdev->ddev; in radeon_combios_get_i2c_info_from_table()
676 struct drm_device *dev = rdev->ddev; in radeon_combios_i2c_init()
692 rdev->i2c_bus[0] = radeon_i2c_create(dev, &i2c, "DVI_DDC"); in radeon_combios_i2c_init()
695 rdev->i2c_bus[1] = radeon_i2c_create(dev, &i2c, "VGA_DDC"); in radeon_combios_i2c_init()
702 rdev->i2c_bus[2] = radeon_i2c_create(dev, &i2c, "MM_I2C"); in radeon_combios_i2c_init()
704 if (rdev->family == CHIP_R300 || in radeon_combios_i2c_init()
705 rdev->family == CHIP_R350) { in radeon_combios_i2c_init()
707 } else if (rdev->family == CHIP_RS300 || in radeon_combios_i2c_init()
708 rdev->family == CHIP_RS400 || in radeon_combios_i2c_init()
709 rdev->family == CHIP_RS480) { in radeon_combios_i2c_init()
712 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
717 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "GPIOPAD_MASK"); in radeon_combios_i2c_init()
718 } else if ((rdev->family == CHIP_R200) || in radeon_combios_i2c_init()
719 (rdev->family >= CHIP_R300)) { in radeon_combios_i2c_init()
722 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
726 rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID"); in radeon_combios_i2c_init()
729 rdev->i2c_bus[4] = radeon_i2c_create(dev, &i2c, "CRT2_DDC"); in radeon_combios_i2c_init()
735 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_clock_info()
737 struct radeon_pll *p1pll = &rdev->clock.p1pll; in radeon_combios_get_clock_info()
738 struct radeon_pll *p2pll = &rdev->clock.p2pll; in radeon_combios_get_clock_info()
739 struct radeon_pll *spll = &rdev->clock.spll; in radeon_combios_get_clock_info()
740 struct radeon_pll *mpll = &rdev->clock.mpll; in radeon_combios_get_clock_info()
749 p1pll->reference_freq = RBIOS16(pll_info + 0xe); in radeon_combios_get_clock_info()
750 p1pll->reference_div = RBIOS16(pll_info + 0x10); in radeon_combios_get_clock_info()
751 p1pll->pll_out_min = RBIOS32(pll_info + 0x12); in radeon_combios_get_clock_info()
752 p1pll->pll_out_max = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
753 p1pll->lcd_pll_out_min = p1pll->pll_out_min; in radeon_combios_get_clock_info()
754 p1pll->lcd_pll_out_max = p1pll->pll_out_max; in radeon_combios_get_clock_info()
757 p1pll->pll_in_min = RBIOS32(pll_info + 0x36); in radeon_combios_get_clock_info()
758 p1pll->pll_in_max = RBIOS32(pll_info + 0x3a); in radeon_combios_get_clock_info()
760 p1pll->pll_in_min = 40; in radeon_combios_get_clock_info()
761 p1pll->pll_in_max = 500; in radeon_combios_get_clock_info()
766 spll->reference_freq = RBIOS16(pll_info + 0x1a); in radeon_combios_get_clock_info()
767 spll->reference_div = RBIOS16(pll_info + 0x1c); in radeon_combios_get_clock_info()
768 spll->pll_out_min = RBIOS32(pll_info + 0x1e); in radeon_combios_get_clock_info()
769 spll->pll_out_max = RBIOS32(pll_info + 0x22); in radeon_combios_get_clock_info()
772 spll->pll_in_min = RBIOS32(pll_info + 0x48); in radeon_combios_get_clock_info()
773 spll->pll_in_max = RBIOS32(pll_info + 0x4c); in radeon_combios_get_clock_info()
776 spll->pll_in_min = 40; in radeon_combios_get_clock_info()
777 spll->pll_in_max = 500; in radeon_combios_get_clock_info()
781 mpll->reference_freq = RBIOS16(pll_info + 0x26); in radeon_combios_get_clock_info()
782 mpll->reference_div = RBIOS16(pll_info + 0x28); in radeon_combios_get_clock_info()
783 mpll->pll_out_min = RBIOS32(pll_info + 0x2a); in radeon_combios_get_clock_info()
784 mpll->pll_out_max = RBIOS32(pll_info + 0x2e); in radeon_combios_get_clock_info()
787 mpll->pll_in_min = RBIOS32(pll_info + 0x5a); in radeon_combios_get_clock_info()
788 mpll->pll_in_max = RBIOS32(pll_info + 0x5e); in radeon_combios_get_clock_info()
791 mpll->pll_in_min = 40; in radeon_combios_get_clock_info()
792 mpll->pll_in_max = 500; in radeon_combios_get_clock_info()
803 rdev->clock.default_sclk = sclk; in radeon_combios_get_clock_info()
804 rdev->clock.default_mclk = mclk; in radeon_combios_get_clock_info()
807 rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
809 rdev->clock.max_pixel_clock = 35000; /* might need something asic specific */ in radeon_combios_get_clock_info()
818 struct drm_device *dev = rdev->ddev; in radeon_combios_sideport_present()
822 if (rdev->family == CHIP_RS400) in radeon_combios_sideport_present()
858 p_dac->ps2_pdac_adj = default_primarydac_adj[rdev->family]; in radeon_legacy_get_primary_dac_info_from_table()
864 *encoder) in radeon_combios_get_primary_dac_info()
866 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_primary_dac_info()
867 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_primary_dac_info()
886 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
890 p_dac->ps2_pdac_adj = (bg << 8) | (dac); in radeon_combios_get_primary_dac_info()
901 if (((dev->pdev->device == 0x5159) && in radeon_combios_get_primary_dac_info()
902 (dev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
903 (dev->pdev->subsystem_device == 0x7c28)) || in radeon_combios_get_primary_dac_info()
905 ((dev->pdev->device == 0x514D) && in radeon_combios_get_primary_dac_info()
906 (dev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
907 (dev->pdev->subsystem_device == 0x7149))) { in radeon_combios_get_primary_dac_info()
921 struct drm_device *dev = rdev->ddev; in radeon_combios_get_tv_info()
939 DRM_DEBUG_KMS("Default TV standard: PAL-M\n"); in radeon_combios_get_tv_info()
943 DRM_DEBUG_KMS("Default TV standard: PAL-60\n"); in radeon_combios_get_tv_info()
947 DRM_DEBUG_KMS("Default TV standard: NTSC-J\n"); in radeon_combios_get_tv_info()
951 DRM_DEBUG_KMS("Default TV standard: SCART-PAL\n"); in radeon_combios_get_tv_info()
1005 tv_dac->ps2_tvdac_adj = default_tvdac_adj[rdev->family]; in radeon_legacy_get_tv_dac_info_from_table()
1006 if ((rdev->flags & RADEON_IS_MOBILITY) && (rdev->family == CHIP_RV250)) in radeon_legacy_get_tv_dac_info_from_table()
1007 tv_dac->ps2_tvdac_adj = 0x00880000; in radeon_legacy_get_tv_dac_info_from_table()
1008 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1009 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_legacy_get_tv_dac_info_from_table()
1015 *encoder) in radeon_combios_get_tv_dac_info()
1017 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_tv_dac_info()
1018 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_tv_dac_info()
1035 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1039 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1043 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1045 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1050 tv_dac->ps2_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1054 tv_dac->pal_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1058 tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); in radeon_combios_get_tv_dac_info()
1060 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1063 tv_dac->tv_std = radeon_combios_get_tv_info(rdev); in radeon_combios_get_tv_dac_info()
1074 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1076 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1077 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1079 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1084 tv_dac->ps2_tvdac_adj = in radeon_combios_get_tv_dac_info()
1086 tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1087 tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; in radeon_combios_get_tv_dac_info()
1089 if (tv_dac->ps2_tvdac_adj) in radeon_combios_get_tv_dac_info()
1107 struct radeon_encoder_lvds *lvds = NULL; in radeon_legacy_get_lvds_info_from_regs() local
1112 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_legacy_get_lvds_info_from_regs()
1114 if (!lvds) in radeon_legacy_get_lvds_info_from_regs()
1120 /* These should be fail-safe defaults, fingers crossed */ in radeon_legacy_get_lvds_info_from_regs()
1121 lvds->panel_pwr_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1122 lvds->panel_vcc_delay = 2000; in radeon_legacy_get_lvds_info_from_regs()
1124 lvds->lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL); in radeon_legacy_get_lvds_info_from_regs()
1125 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1126 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; 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.vdisplay = in radeon_legacy_get_lvds_info_from_regs()
1137 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1141 lvds->native_mode.hdisplay = in radeon_legacy_get_lvds_info_from_regs()
1144 if ((lvds->native_mode.hdisplay < 640) || in radeon_legacy_get_lvds_info_from_regs()
1145 (lvds->native_mode.vdisplay < 480)) { in radeon_legacy_get_lvds_info_from_regs()
1146 lvds->native_mode.hdisplay = 640; in radeon_legacy_get_lvds_info_from_regs()
1147 lvds->native_mode.vdisplay = 480; in radeon_legacy_get_lvds_info_from_regs()
1153 lvds->use_bios_dividers = false; in radeon_legacy_get_lvds_info_from_regs()
1155 lvds->panel_ref_divider = in radeon_legacy_get_lvds_info_from_regs()
1157 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1158 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1160 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1161 (lvds->panel_fb_divider > 3)) in radeon_legacy_get_lvds_info_from_regs()
1162 lvds->use_bios_dividers = true; in radeon_legacy_get_lvds_info_from_regs()
1164 lvds->panel_vcc_delay = 200; in radeon_legacy_get_lvds_info_from_regs()
1167 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_legacy_get_lvds_info_from_regs()
1168 lvds->native_mode.vdisplay); in radeon_legacy_get_lvds_info_from_regs()
1170 return lvds; in radeon_legacy_get_lvds_info_from_regs()
1174 *encoder) in radeon_combios_get_lvds_info()
1176 struct drm_device *dev = encoder->base.dev; in radeon_combios_get_lvds_info()
1177 struct radeon_device *rdev = dev->dev_private; in radeon_combios_get_lvds_info()
1182 struct radeon_encoder_lvds *lvds = NULL; in radeon_combios_get_lvds_info() local
1187 lvds = kzalloc(sizeof(struct radeon_encoder_lvds), GFP_KERNEL); in radeon_combios_get_lvds_info()
1189 if (!lvds) in radeon_combios_get_lvds_info()
1198 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1199 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1201 DRM_INFO("Panel Size %dx%d\n", lvds->native_mode.hdisplay, in radeon_combios_get_lvds_info()
1202 lvds->native_mode.vdisplay); in radeon_combios_get_lvds_info()
1204 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1205 lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000); in radeon_combios_get_lvds_info()
1207 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1208 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1209 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1211 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1212 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1213 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1214 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1215 (lvds->panel_fb_divider > 3)) in radeon_combios_get_lvds_info()
1216 lvds->use_bios_dividers = true; in radeon_combios_get_lvds_info()
1219 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1221 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_FORMAT; in radeon_combios_get_lvds_info()
1224 lvds->lvds_gen_cntl |= RADEON_LVDS_PANEL_TYPE; in radeon_combios_get_lvds_info()
1228 lvds->lvds_gen_cntl |= RADEON_LVDS_NO_FM; in radeon_combios_get_lvds_info()
1231 lvds->lvds_gen_cntl |= RADEON_LVDS_2_GREY; in radeon_combios_get_lvds_info()
1234 lvds->lvds_gen_cntl |= RADEON_LVDS_4_GREY; in radeon_combios_get_lvds_info()
1241 lvds->lvds_gen_cntl |= RADEON_LVDS_FP_POL_LOW; in radeon_combios_get_lvds_info()
1244 lvds->lvds_gen_cntl |= RADEON_LVDS_LP_POL_LOW; in radeon_combios_get_lvds_info()
1247 lvds->lvds_gen_cntl |= RADEON_LVDS_DTM_POL_LOW; in radeon_combios_get_lvds_info()
1250 lvds->lvds_gen_cntl |= RADEON_LVDS_BL_CLK_SEL; in radeon_combios_get_lvds_info()
1252 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1259 if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) && in radeon_combios_get_lvds_info()
1260 (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) { in radeon_combios_get_lvds_info()
1261 u32 hss = (RBIOS16(tmp + 21) - RBIOS16(tmp + 19) - 1) * 8; in radeon_combios_get_lvds_info()
1263 if (hss > lvds->native_mode.hdisplay) in radeon_combios_get_lvds_info()
1264 hss = (10 - 1) * 8; in radeon_combios_get_lvds_info()
1266 lvds->native_mode.htotal = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1267 (RBIOS16(tmp + 17) - RBIOS16(tmp + 19)) * 8; in radeon_combios_get_lvds_info()
1268 lvds->native_mode.hsync_start = lvds->native_mode.hdisplay + in radeon_combios_get_lvds_info()
1270 lvds->native_mode.hsync_end = lvds->native_mode.hsync_start + in radeon_combios_get_lvds_info()
1273 lvds->native_mode.vtotal = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1274 (RBIOS16(tmp + 24) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1275 lvds->native_mode.vsync_start = lvds->native_mode.vdisplay + in radeon_combios_get_lvds_info()
1276 ((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1277 lvds->native_mode.vsync_end = lvds->native_mode.vsync_start + in radeon_combios_get_lvds_info()
1280 lvds->native_mode.clock = RBIOS16(tmp + 9) * 10; in radeon_combios_get_lvds_info()
1281 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1283 drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); in radeon_combios_get_lvds_info()
1289 lvds = radeon_legacy_get_lvds_info_from_regs(rdev); in radeon_combios_get_lvds_info()
1292 if (lvds) in radeon_combios_get_lvds_info()
1293 encoder->native_mode = lvds->native_mode; in radeon_combios_get_lvds_info()
1294 return lvds; in radeon_combios_get_lvds_info()
1318 bool radeon_legacy_get_tmds_info_from_table(struct radeon_encoder *encoder, in radeon_legacy_get_tmds_info_from_table() argument
1321 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_table()
1322 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_table()
1326 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_table()
1327 default_tmds_pll[rdev->family][i].value; in radeon_legacy_get_tmds_info_from_table()
1328 tmds->tmds_pll[i].freq = default_tmds_pll[rdev->family][i].freq; in radeon_legacy_get_tmds_info_from_table()
1334 bool radeon_legacy_get_tmds_info_from_combios(struct radeon_encoder *encoder, in radeon_legacy_get_tmds_info_from_combios() argument
1337 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_tmds_info_from_combios()
1338 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_tmds_info_from_combios()
1353 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1355 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1358 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1359 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1367 tmds->tmds_pll[i].value = in radeon_legacy_get_tmds_info_from_combios()
1369 tmds->tmds_pll[i].freq = in radeon_legacy_get_tmds_info_from_combios()
1376 tmds->tmds_pll[i].freq, in radeon_legacy_get_tmds_info_from_combios()
1377 tmds->tmds_pll[i].value); in radeon_legacy_get_tmds_info_from_combios()
1387 bool radeon_legacy_get_ext_tmds_info_from_table(struct radeon_encoder *encoder, in radeon_legacy_get_ext_tmds_info_from_table() argument
1390 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_table()
1391 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_table()
1396 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_table()
1399 switch (rdev->mode_info.connector_table) { in radeon_legacy_get_ext_tmds_info_from_table()
1403 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_table()
1404 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_table()
1411 bool radeon_legacy_get_ext_tmds_info_from_combios(struct radeon_encoder *encoder, in radeon_legacy_get_ext_tmds_info_from_combios() argument
1414 struct drm_device *dev = encoder->base.dev; in radeon_legacy_get_ext_tmds_info_from_combios()
1415 struct radeon_device *rdev = dev->dev_private; in radeon_legacy_get_ext_tmds_info_from_combios()
1421 tmds->i2c_bus = NULL; in radeon_legacy_get_ext_tmds_info_from_combios()
1422 if (rdev->flags & RADEON_IS_IGP) { in radeon_legacy_get_ext_tmds_info_from_combios()
1424 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1425 tmds->dvo_chip = DVO_SIL164; in radeon_legacy_get_ext_tmds_info_from_combios()
1426 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1432 tmds->slave_addr = RBIOS8(offset + 4 + 2); in radeon_legacy_get_ext_tmds_info_from_combios()
1433 tmds->slave_addr >>= 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1443 tmds->i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); in radeon_legacy_get_ext_tmds_info_from_combios()
1447 if (!tmds->i2c_bus) { in radeon_legacy_get_ext_tmds_info_from_combios()
1457 struct radeon_device *rdev = dev->dev_private; in radeon_get_legacy_connector_info_from_table()
1461 rdev->mode_info.connector_table = radeon_connector_table; in radeon_get_legacy_connector_info_from_table()
1462 if (rdev->mode_info.connector_table == CT_NONE) { in radeon_get_legacy_connector_info_from_table()
1466 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; in radeon_get_legacy_connector_info_from_table()
1470 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; 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()
1480 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1486 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1494 rdev->mode_info.connector_table = CT_IBOOK; in radeon_get_legacy_connector_info_from_table()
1497 rdev->mode_info.connector_table = CT_MAC_G4_SILVER; in radeon_get_legacy_connector_info_from_table()
1500 rdev->mode_info.connector_table = CT_EMAC; in radeon_get_legacy_connector_info_from_table()
1503 rdev->mode_info.connector_table = CT_MINI_INTERNAL; in radeon_get_legacy_connector_info_from_table()
1506 rdev->mode_info.connector_table = CT_MINI_EXTERNAL; in radeon_get_legacy_connector_info_from_table()
1510 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT; in radeon_get_legacy_connector_info_from_table()
1511 } else if ((rdev->pdev->device == 0x4a48) && in radeon_get_legacy_connector_info_from_table()
1512 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1513 (rdev->pdev->subsystem_device == 0x4a48)) { in radeon_get_legacy_connector_info_from_table()
1515 rdev->mode_info.connector_table = CT_MAC_X800; in radeon_get_legacy_connector_info_from_table()
1518 (rdev->pdev->device == 0x4150) && in radeon_get_legacy_connector_info_from_table()
1519 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1520 (rdev->pdev->subsystem_device == 0x4150)) { in radeon_get_legacy_connector_info_from_table()
1522 rdev->mode_info.connector_table = CT_MAC_G5_9600; in radeon_get_legacy_connector_info_from_table()
1523 } else if ((rdev->pdev->device == 0x4c66) && in radeon_get_legacy_connector_info_from_table()
1524 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1525 (rdev->pdev->subsystem_device == 0x4c66)) { in radeon_get_legacy_connector_info_from_table()
1527 rdev->mode_info.connector_table = CT_SAM440EP; in radeon_get_legacy_connector_info_from_table()
1532 rdev->mode_info.connector_table = CT_RN50_POWER; in radeon_get_legacy_connector_info_from_table()
1535 rdev->mode_info.connector_table = CT_GENERIC; in radeon_get_legacy_connector_info_from_table()
1538 switch (rdev->mode_info.connector_table) { in radeon_get_legacy_connector_info_from_table()
1541 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1543 if (rdev->flags & RADEON_SINGLE_CRTC) { in radeon_get_legacy_connector_info_from_table()
1544 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1558 } else if (rdev->flags & RADEON_IS_MOBILITY) { in radeon_get_legacy_connector_info_from_table()
1559 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1574 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1589 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1610 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1626 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { in radeon_get_legacy_connector_info_from_table()
1627 /* TV - tv dac */ in radeon_get_legacy_connector_info_from_table()
1645 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1646 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1658 /* VGA - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1670 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1686 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1687 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1699 /* DVI-I - primary dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1719 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1735 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1736 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1748 /* DVI-I - primary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1767 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1783 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1784 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
1796 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1808 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1824 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1825 /* DVI-I - tv dac, ext tmds */ in radeon_get_legacy_connector_info_from_table()
1845 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1861 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1862 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
1881 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1897 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1898 /* DVI-D - int tmds */ in radeon_get_legacy_connector_info_from_table()
1910 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1922 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1938 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1939 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
1951 /* VGA - tv dac */ in radeon_get_legacy_connector_info_from_table()
1963 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
1978 DRM_INFO("Connector Table: %d (rn50-power)\n", in radeon_get_legacy_connector_info_from_table()
1979 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
1980 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2006 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2007 /* DVI - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2026 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2048 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2049 /* DVI - tv dac, dvo */ in radeon_get_legacy_connector_info_from_table()
2068 /* ADC - primary dac, internal tmds */ in radeon_get_legacy_connector_info_from_table()
2087 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2103 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2104 /* LVDS */ in radeon_get_legacy_connector_info_from_table()
2116 /* DVI-I - secondary dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2135 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2148 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2164 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2165 /* DVI-I - tv dac, int tmds */ in radeon_get_legacy_connector_info_from_table()
2184 /* VGA - primary dac */ in radeon_get_legacy_connector_info_from_table()
2196 /* TV - TV DAC */ in radeon_get_legacy_connector_info_from_table()
2212 rdev->mode_info.connector_table); in radeon_get_legacy_connector_info_from_table()
2230 one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ in radeon_apply_legacy_quirks()
2231 if (dev->pdev->device == 0x515e && in radeon_apply_legacy_quirks()
2232 dev->pdev->subsystem_vendor == 0x1014) { in radeon_apply_legacy_quirks()
2234 ddc_i2c->mask_clk_reg == RADEON_GPIO_CRT2_DDC) in radeon_apply_legacy_quirks()
2238 /* X300 card with extra non-existent DVI port */ in radeon_apply_legacy_quirks()
2239 if (dev->pdev->device == 0x5B60 && in radeon_apply_legacy_quirks()
2240 dev->pdev->subsystem_vendor == 0x17af && in radeon_apply_legacy_quirks()
2241 dev->pdev->subsystem_device == 0x201e && bios_index == 2) { in radeon_apply_legacy_quirks()
2251 /* Acer 5102 has non-existent TV port */ in radeon_apply_legacy_tv_quirks()
2252 if (dev->pdev->device == 0x5975 && in radeon_apply_legacy_tv_quirks()
2253 dev->pdev->subsystem_vendor == 0x1025 && in radeon_apply_legacy_tv_quirks()
2254 dev->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 (dev->pdev->device == 0x5974 && in radeon_apply_legacy_tv_quirks()
2259 dev->pdev->subsystem_vendor == 0x103c && in radeon_apply_legacy_tv_quirks()
2260 dev->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 (dev->pdev->device == 0x5955 && in radeon_apply_legacy_tv_quirks()
2265 dev->pdev->subsystem_vendor == 0x1462 && in radeon_apply_legacy_tv_quirks()
2266 dev->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()
2417 /* RV100 board with external TDMS bit mis-set. in radeon_get_legacy_connector_info_from_bios()
2420 if (dev->pdev->device == 0x5159 && in radeon_get_legacy_connector_info_from_bios()
2421 dev->pdev->subsystem_vendor == 0x1014 && in radeon_get_legacy_connector_info_from_bios()
2422 dev->pdev->subsystem_device == 0x029A) { 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()
2602 if (rdev->family != CHIP_R100 && rdev->family != CHIP_R200) { 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()
2714 if ((dev->pdev->device == 0x4152) && in radeon_combios_get_power_modes()
2715 (dev->pdev->subsystem_vendor == 0x1043) && in radeon_combios_get_power_modes()
2716 (dev->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()
2837 void radeon_external_tmds_setup(struct drm_encoder *encoder) in radeon_external_tmds_setup() argument
2839 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); in radeon_external_tmds_setup()
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()
2884 bool radeon_combios_external_tmds_setup(struct drm_encoder *encoder) in radeon_combios_external_tmds_setup() argument
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()
2888 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 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()
3441 void radeon_combios_output_lock(struct drm_encoder *encoder, bool lock) in radeon_combios_output_lock() argument
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()
3459 struct drm_encoder *encoder, in radeon_combios_connected_scratch_regs() argument
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()
3466 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 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()
3561 radeon_combios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc) in radeon_combios_encoder_crtc_scratch_regs() argument
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()
3565 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 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()
3596 radeon_combios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on) in radeon_combios_encoder_dpms_scratch_regs() argument
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()
3600 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 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()