Lines Matching +full:0 +full:x00880000
135 uint16_t offset = 0, check_offset; in combios_get_table_offset()
138 return 0; in combios_get_table_offset()
143 check_offset = 0xc; in combios_get_table_offset()
146 check_offset = 0x14; in combios_get_table_offset()
149 check_offset = 0x2a; in combios_get_table_offset()
152 check_offset = 0x2c; in combios_get_table_offset()
155 check_offset = 0x2e; in combios_get_table_offset()
158 check_offset = 0x30; in combios_get_table_offset()
161 check_offset = 0x32; in combios_get_table_offset()
164 check_offset = 0x34; in combios_get_table_offset()
167 check_offset = 0x36; in combios_get_table_offset()
170 check_offset = 0x38; in combios_get_table_offset()
173 check_offset = 0x3e; in combios_get_table_offset()
176 check_offset = 0x40; in combios_get_table_offset()
179 check_offset = 0x42; in combios_get_table_offset()
182 check_offset = 0x46; in combios_get_table_offset()
185 check_offset = 0x48; in combios_get_table_offset()
188 check_offset = 0x4a; in combios_get_table_offset()
191 check_offset = 0x4c; in combios_get_table_offset()
194 check_offset = 0x4e; in combios_get_table_offset()
197 check_offset = 0x50; in combios_get_table_offset()
200 check_offset = 0x52; in combios_get_table_offset()
203 check_offset = 0x54; in combios_get_table_offset()
206 check_offset = 0x58; in combios_get_table_offset()
209 check_offset = 0x5a; in combios_get_table_offset()
212 check_offset = 0x5c; in combios_get_table_offset()
215 check_offset = 0x5e; in combios_get_table_offset()
218 check_offset = 0x60; in combios_get_table_offset()
221 check_offset = 0x62; in combios_get_table_offset()
224 check_offset = 0x64; in combios_get_table_offset()
227 check_offset = 0x66; in combios_get_table_offset()
230 check_offset = 0x68; in combios_get_table_offset()
233 check_offset = 0x6a; in combios_get_table_offset()
236 check_offset = 0x6c; in combios_get_table_offset()
239 check_offset = 0x6e; in combios_get_table_offset()
242 check_offset = 0x70; in combios_get_table_offset()
250 if (rev > 0) { in combios_get_table_offset()
251 check_offset = RBIOS16(check_offset + 0x3); in combios_get_table_offset()
262 if (rev > 0) { in combios_get_table_offset()
263 check_offset = RBIOS16(check_offset + 0x5); in combios_get_table_offset()
274 if (rev > 0) { in combios_get_table_offset()
275 check_offset = RBIOS16(check_offset + 0x7); in combios_get_table_offset()
287 check_offset = RBIOS16(check_offset + 0x9); in combios_get_table_offset()
307 check_offset = RBIOS16(check_offset + 0x11); in combios_get_table_offset()
316 check_offset = RBIOS16(check_offset + 0x13); in combios_get_table_offset()
325 check_offset = RBIOS16(check_offset + 0x15); in combios_get_table_offset()
334 check_offset = RBIOS16(check_offset + 0x17); in combios_get_table_offset()
343 check_offset = RBIOS16(check_offset + 0x2); in combios_get_table_offset()
352 check_offset = RBIOS16(check_offset + 0x4); in combios_get_table_offset()
358 check_offset = 0; in combios_get_table_offset()
362 size = RBIOS8(rdev->bios_header_start + 0x6); in combios_get_table_offset()
380 size = EDID_LENGTH * (raw[0x7e] + 1); in radeon_combios_check_hardcoded_edid()
405 int ddc_line = 0; in combios_setup_i2c_bus()
432 ddc_line = 0; in combios_setup_i2c_bus()
518 i2c.mask_clk_mask = (0x20 << 8); in combios_setup_i2c_bus()
519 i2c.mask_data_mask = 0x80; in combios_setup_i2c_bus()
520 i2c.a_clk_mask = (0x20 << 8); in combios_setup_i2c_bus()
521 i2c.a_data_mask = 0x80; in combios_setup_i2c_bus()
522 i2c.en_clk_mask = (0x20 << 8); in combios_setup_i2c_bus()
523 i2c.en_data_mask = 0x80; in combios_setup_i2c_bus()
524 i2c.y_clk_mask = (0x20 << 8); in combios_setup_i2c_bus()
525 i2c.y_data_mask = 0x80; in combios_setup_i2c_bus()
640 for (i = 0; i < blocks; i++) { in radeon_combios_get_i2c_info_from_table()
641 id = RBIOS8(offset + 3 + (i * 5) + 0); in radeon_combios_get_i2c_info_from_table()
662 * 0x60, 0x64, 0x68, 0x6c, gpiopads, mm in radeon_combios_i2c_init()
664 * 0x60, 0x64, 0x68, mm in radeon_combios_i2c_init()
666 * 0x60, 0x64, mm in radeon_combios_i2c_init()
668 * 0x60, 0x64, 0x68, gpiopads, mm in radeon_combios_i2c_init()
671 /* 0x60 */ in radeon_combios_i2c_init()
672 i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_combios_i2c_init()
673 rdev->i2c_bus[0] = radeon_i2c_create(dev, &i2c, "DVI_DDC"); in radeon_combios_i2c_init()
674 /* 0x64 */ in radeon_combios_i2c_init()
675 i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_combios_i2c_init()
682 i2c.i2c_id = 0xa0; in radeon_combios_i2c_init()
691 /* 0x68 */ in radeon_combios_i2c_init()
692 i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_combios_i2c_init()
701 /* 0x68 */ in radeon_combios_i2c_init()
702 i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_combios_i2c_init()
705 /* 0x68 */ in radeon_combios_i2c_init()
706 i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_combios_i2c_init()
708 /* 0x6c */ in radeon_combios_i2c_init()
709 i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_combios_i2c_init()
730 p1pll->reference_freq = RBIOS16(pll_info + 0xe); in radeon_combios_get_clock_info()
731 p1pll->reference_div = RBIOS16(pll_info + 0x10); in radeon_combios_get_clock_info()
732 p1pll->pll_out_min = RBIOS32(pll_info + 0x12); in radeon_combios_get_clock_info()
733 p1pll->pll_out_max = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
738 p1pll->pll_in_min = RBIOS32(pll_info + 0x36); in radeon_combios_get_clock_info()
739 p1pll->pll_in_max = RBIOS32(pll_info + 0x3a); in radeon_combios_get_clock_info()
747 spll->reference_freq = RBIOS16(pll_info + 0x1a); in radeon_combios_get_clock_info()
748 spll->reference_div = RBIOS16(pll_info + 0x1c); in radeon_combios_get_clock_info()
749 spll->pll_out_min = RBIOS32(pll_info + 0x1e); in radeon_combios_get_clock_info()
750 spll->pll_out_max = RBIOS32(pll_info + 0x22); in radeon_combios_get_clock_info()
753 spll->pll_in_min = RBIOS32(pll_info + 0x48); in radeon_combios_get_clock_info()
754 spll->pll_in_max = RBIOS32(pll_info + 0x4c); in radeon_combios_get_clock_info()
762 mpll->reference_freq = RBIOS16(pll_info + 0x26); in radeon_combios_get_clock_info()
763 mpll->reference_div = RBIOS16(pll_info + 0x28); in radeon_combios_get_clock_info()
764 mpll->pll_out_min = RBIOS32(pll_info + 0x2a); in radeon_combios_get_clock_info()
765 mpll->pll_out_max = RBIOS32(pll_info + 0x2e); in radeon_combios_get_clock_info()
768 mpll->pll_in_min = RBIOS32(pll_info + 0x5a); in radeon_combios_get_clock_info()
769 mpll->pll_in_max = RBIOS32(pll_info + 0x5e); in radeon_combios_get_clock_info()
777 sclk = RBIOS16(pll_info + 0xa); in radeon_combios_get_clock_info()
778 mclk = RBIOS16(pll_info + 0x8); in radeon_combios_get_clock_info()
779 if (sclk == 0) in radeon_combios_get_clock_info()
781 if (mclk == 0) in radeon_combios_get_clock_info()
787 if (RBIOS32(pll_info + 0x16)) in radeon_combios_get_clock_info()
788 rdev->clock.max_pixel_clock = RBIOS32(pll_info + 0x16); in radeon_combios_get_clock_info()
809 if (RBIOS16(igp_info + 0x4)) in radeon_combios_sideport_present()
816 0x00000808, /* r100 */
817 0x00000808, /* rv100 */
818 0x00000808, /* rs100 */
819 0x00000808, /* rv200 */
820 0x00000808, /* rs200 */
821 0x00000808, /* r200 */
822 0x00000808, /* rv250 */
823 0x00000000, /* rs300 */
824 0x00000808, /* rv280 */
825 0x00000808, /* r300 */
826 0x00000808, /* r350 */
827 0x00000808, /* rv350 */
828 0x00000808, /* rv380 */
829 0x00000808, /* r420 */
830 0x00000808, /* r423 */
831 0x00000808, /* rv410 */
832 0x00000000, /* rs400 */
833 0x00000000, /* rs480 */
852 int found = 0; in radeon_combios_get_primary_dac_info()
863 rev = RBIOS8(dac_info) & 0x3; in radeon_combios_get_primary_dac_info()
865 bg = RBIOS8(dac_info + 0x2) & 0xf; in radeon_combios_get_primary_dac_info()
866 dac = (RBIOS8(dac_info + 0x2) >> 4) & 0xf; in radeon_combios_get_primary_dac_info()
869 bg = RBIOS8(dac_info + 0x2) & 0xf; in radeon_combios_get_primary_dac_info()
870 dac = RBIOS8(dac_info + 0x3) & 0xf; in radeon_combios_get_primary_dac_info()
874 if ((dac == 0) || (bg == 0)) in radeon_combios_get_primary_dac_info()
875 found = 0; in radeon_combios_get_primary_dac_info()
882 if (((rdev->pdev->device == 0x5159) && in radeon_combios_get_primary_dac_info()
883 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
884 (rdev->pdev->subsystem_device == 0x7c28)) || in radeon_combios_get_primary_dac_info()
886 ((rdev->pdev->device == 0x514D) && in radeon_combios_get_primary_dac_info()
887 (rdev->pdev->subsystem_vendor == 0x174B) && in radeon_combios_get_primary_dac_info()
888 (rdev->pdev->subsystem_device == 0x7149))) { in radeon_combios_get_primary_dac_info()
890 found = 0; in radeon_combios_get_primary_dac_info()
909 switch (RBIOS8(tv_info + 7) & 0xf) { in radeon_combios_get_tv_info()
941 switch ((RBIOS8(tv_info + 9) >> 2) & 0x3) { in radeon_combios_get_tv_info()
942 case 0: in radeon_combios_get_tv_info()
963 0x00000000, /* r100 */
964 0x00280000, /* rv100 */
965 0x00000000, /* rs100 */
966 0x00880000, /* rv200 */
967 0x00000000, /* rs200 */
968 0x00000000, /* r200 */
969 0x00770000, /* rv250 */
970 0x00290000, /* rs300 */
971 0x00560000, /* rv280 */
972 0x00780000, /* r300 */
973 0x00770000, /* r350 */
974 0x00780000, /* rv350 */
975 0x00780000, /* rv380 */
976 0x01080000, /* r420 */
977 0x01080000, /* r423 */
978 0x01080000, /* rv410 */
979 0x00780000, /* rs400 */
980 0x00780000, /* rs480 */
988 tv_dac->ps2_tvdac_adj = 0x00880000; in radeon_legacy_get_tv_dac_info_from_table()
1003 int found = 0; in radeon_combios_get_tv_dac_info()
1012 rev = RBIOS8(dac_info + 0x3); in radeon_combios_get_tv_dac_info()
1014 bg = RBIOS8(dac_info + 0xc) & 0xf; in radeon_combios_get_tv_dac_info()
1015 dac = RBIOS8(dac_info + 0xd) & 0xf; in radeon_combios_get_tv_dac_info()
1018 bg = RBIOS8(dac_info + 0xe) & 0xf; in radeon_combios_get_tv_dac_info()
1019 dac = RBIOS8(dac_info + 0xf) & 0xf; in radeon_combios_get_tv_dac_info()
1022 bg = RBIOS8(dac_info + 0x10) & 0xf; in radeon_combios_get_tv_dac_info()
1023 dac = RBIOS8(dac_info + 0x11) & 0xf; in radeon_combios_get_tv_dac_info()
1029 bg = RBIOS8(dac_info + 0xc) & 0xf; in radeon_combios_get_tv_dac_info()
1030 dac = (RBIOS8(dac_info + 0xc) >> 4) & 0xf; in radeon_combios_get_tv_dac_info()
1033 bg = RBIOS8(dac_info + 0xd) & 0xf; in radeon_combios_get_tv_dac_info()
1034 dac = (RBIOS8(dac_info + 0xd) >> 4) & 0xf; in radeon_combios_get_tv_dac_info()
1037 bg = RBIOS8(dac_info + 0xe) & 0xf; in radeon_combios_get_tv_dac_info()
1038 dac = (RBIOS8(dac_info + 0xe) >> 4) & 0xf; in radeon_combios_get_tv_dac_info()
1051 rev = RBIOS8(dac_info) & 0x3; in radeon_combios_get_tv_dac_info()
1053 bg = RBIOS8(dac_info + 0x3) & 0xf; in radeon_combios_get_tv_dac_info()
1054 dac = (RBIOS8(dac_info + 0x3) >> 4) & 0xf; in radeon_combios_get_tv_dac_info()
1063 bg = RBIOS8(dac_info + 0x4) & 0xf; in radeon_combios_get_tv_dac_info()
1064 dac = RBIOS8(dac_info + 0x5) & 0xf; in radeon_combios_get_tv_dac_info()
1106 lvds->panel_digon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY1_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1107 lvds->panel_blon_delay = (lvds_ss_gen_cntl >> RADEON_LVDS_PWRSEQ_DELAY2_SHIFT) & 0xf; in radeon_legacy_get_lvds_info_from_regs()
1131 ppll_div_sel = RREG8(RADEON_CLOCK_CNTL_INDEX + 1) & 0x3; in radeon_legacy_get_lvds_info_from_regs()
1133 if ((ppll_val & 0x000707ff) == 0x1bb) in radeon_legacy_get_lvds_info_from_regs()
1137 RREG32_PLL(RADEON_PPLL_REF_DIV) & 0x3ff; in radeon_legacy_get_lvds_info_from_regs()
1138 lvds->panel_post_divider = (ppll_val >> 16) & 0x7; in radeon_legacy_get_lvds_info_from_regs()
1139 lvds->panel_fb_divider = ppll_val & 0x7ff; in radeon_legacy_get_lvds_info_from_regs()
1141 if ((lvds->panel_ref_divider != 0) && in radeon_legacy_get_lvds_info_from_regs()
1173 for (i = 0; i < 24; i++) in radeon_combios_get_lvds_info()
1175 stmp[24] = 0; in radeon_combios_get_lvds_info()
1179 lvds->native_mode.hdisplay = RBIOS16(lcd_info + 0x19); in radeon_combios_get_lvds_info()
1180 lvds->native_mode.vdisplay = RBIOS16(lcd_info + 0x1b); in radeon_combios_get_lvds_info()
1185 lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c); in radeon_combios_get_lvds_info()
1188 lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24); in radeon_combios_get_lvds_info()
1189 lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf; in radeon_combios_get_lvds_info()
1190 lvds->panel_blon_delay = (RBIOS16(lcd_info + 0x38) >> 4) & 0xf; in radeon_combios_get_lvds_info()
1192 lvds->panel_ref_divider = RBIOS16(lcd_info + 0x2e); in radeon_combios_get_lvds_info()
1193 lvds->panel_post_divider = RBIOS8(lcd_info + 0x30); in radeon_combios_get_lvds_info()
1194 lvds->panel_fb_divider = RBIOS16(lcd_info + 0x31); in radeon_combios_get_lvds_info()
1195 if ((lvds->panel_ref_divider != 0) && in radeon_combios_get_lvds_info()
1199 panel_setup = RBIOS32(lcd_info + 0x39); in radeon_combios_get_lvds_info()
1200 lvds->lvds_gen_cntl = 0xff00; in radeon_combios_get_lvds_info()
1201 if (panel_setup & 0x1) in radeon_combios_get_lvds_info()
1204 if ((panel_setup >> 4) & 0x1) in radeon_combios_get_lvds_info()
1207 switch ((panel_setup >> 8) & 0x7) { in radeon_combios_get_lvds_info()
1208 case 0: in radeon_combios_get_lvds_info()
1221 if ((panel_setup >> 16) & 0x1) in radeon_combios_get_lvds_info()
1224 if ((panel_setup >> 17) & 0x1) in radeon_combios_get_lvds_info()
1227 if ((panel_setup >> 18) & 0x1) in radeon_combios_get_lvds_info()
1230 if ((panel_setup >> 23) & 0x1) in radeon_combios_get_lvds_info()
1233 lvds->lvds_gen_cntl |= (panel_setup & 0xf0000000); in radeon_combios_get_lvds_info()
1235 for (i = 0; i < 32; i++) { in radeon_combios_get_lvds_info()
1237 if (tmp == 0) in radeon_combios_get_lvds_info()
1257 ((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26)); in radeon_combios_get_lvds_info()
1259 ((RBIOS16(tmp + 28) & 0xf800) >> 11); in radeon_combios_get_lvds_info()
1262 lvds->native_mode.flags = 0; in radeon_combios_get_lvds_info()
1279 {{12000, 0xa1b}, {0xffffffff, 0xa3f}, {0, 0}, {0, 0}}, /* CHIP_R100 */
1280 {{12000, 0xa1b}, {0xffffffff, 0xa3f}, {0, 0}, {0, 0}}, /* CHIP_RV100 */
1281 {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_RS100 */
1282 {{15000, 0xa1b}, {0xffffffff, 0xa3f}, {0, 0}, {0, 0}}, /* CHIP_RV200 */
1283 {{12000, 0xa1b}, {0xffffffff, 0xa3f}, {0, 0}, {0, 0}}, /* CHIP_RS200 */
1284 {{15000, 0xa1b}, {0xffffffff, 0xa3f}, {0, 0}, {0, 0}}, /* CHIP_R200 */
1285 {{15500, 0x81b}, {0xffffffff, 0x83f}, {0, 0}, {0, 0}}, /* CHIP_RV250 */
1286 {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_RS300 */
1287 {{13000, 0x400f4}, {15000, 0x400f7}, {0xffffffff, 0x40111}, {0, 0}}, /* CHIP_RV280 */
1288 {{0xffffffff, 0xb01cb}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_R300 */
1289 {{0xffffffff, 0xb01cb}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_R350 */
1290 {{15000, 0xb0155}, {0xffffffff, 0xb01cb}, {0, 0}, {0, 0}}, /* CHIP_RV350 */
1291 {{15000, 0xb0155}, {0xffffffff, 0xb01cb}, {0, 0}, {0, 0}}, /* CHIP_RV380 */
1292 {{0xffffffff, 0xb01cb}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_R420 */
1293 {{0xffffffff, 0xb01cb}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_R423 */
1294 {{0xffffffff, 0xb01cb}, {0, 0}, {0, 0}, {0, 0}}, /* CHIP_RV410 */
1295 { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, /* CHIP_RS400 */
1296 { {0, 0}, {0, 0}, {0, 0}, {0, 0} }, /* CHIP_RS480 */
1306 for (i = 0; i < 4; i++) { in radeon_legacy_get_tmds_info_from_table()
1333 for (i = 0; i < n; i++) { in radeon_legacy_get_tmds_info_from_combios()
1335 RBIOS32(tmds_info + i * 10 + 0x08); in radeon_legacy_get_tmds_info_from_combios()
1337 RBIOS16(tmds_info + i * 10 + 0x10); in radeon_legacy_get_tmds_info_from_combios()
1343 int stride = 0; in radeon_legacy_get_tmds_info_from_combios()
1347 for (i = 0; i < n; i++) { in radeon_legacy_get_tmds_info_from_combios()
1349 RBIOS32(tmds_info + stride + 0x08); in radeon_legacy_get_tmds_info_from_combios()
1351 RBIOS16(tmds_info + stride + 0x10); in radeon_legacy_get_tmds_info_from_combios()
1352 if (i == 0) in radeon_legacy_get_tmds_info_from_combios()
1376 i2c_bus = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_legacy_get_ext_tmds_info_from_table()
1385 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_table()
1404 i2c_bus = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_legacy_get_ext_tmds_info_from_combios()
1407 tmds->slave_addr = 0x70 >> 1; /* 7 bit addressing */ in radeon_legacy_get_ext_tmds_info_from_combios()
1421 i2c_bus.i2c_id = 0xa0; in radeon_legacy_get_ext_tmds_info_from_combios()
1423 i2c_bus = combios_setup_i2c_bus(rdev, gpio, 0, 0); in radeon_legacy_get_ext_tmds_info_from_combios()
1492 } else if ((rdev->pdev->device == 0x4a48) && in radeon_get_legacy_connector_info_from_table()
1493 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1494 (rdev->pdev->subsystem_device == 0x4a48)) { in radeon_get_legacy_connector_info_from_table()
1499 (rdev->pdev->device == 0x4150) && in radeon_get_legacy_connector_info_from_table()
1500 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1501 (rdev->pdev->subsystem_device == 0x4150)) { in radeon_get_legacy_connector_info_from_table()
1504 } else if ((rdev->pdev->device == 0x4c66) && in radeon_get_legacy_connector_info_from_table()
1505 (rdev->pdev->subsystem_vendor == 0x1002) && in radeon_get_legacy_connector_info_from_table()
1506 (rdev->pdev->subsystem_device == 0x4c66)) { in radeon_get_legacy_connector_info_from_table()
1526 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1533 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
1541 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_NONE_DETECTED, 0, 0); in radeon_get_legacy_connector_info_from_table()
1546 0), in radeon_get_legacy_connector_info_from_table()
1548 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
1556 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1571 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1576 0), in radeon_get_legacy_connector_info_from_table()
1583 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
1592 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1628 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1633 0), in radeon_get_legacy_connector_info_from_table()
1635 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1640 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1669 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1674 0), in radeon_get_legacy_connector_info_from_table()
1676 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1681 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1686 0), in radeon_get_legacy_connector_info_from_table()
1718 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1723 0), in radeon_get_legacy_connector_info_from_table()
1725 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1730 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1735 0), in radeon_get_legacy_connector_info_from_table()
1766 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1771 0), in radeon_get_legacy_connector_info_from_table()
1773 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1778 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1807 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_get_legacy_connector_info_from_table()
1812 0), in radeon_get_legacy_connector_info_from_table()
1820 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
1844 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_get_legacy_connector_info_from_table()
1849 0), in radeon_get_legacy_connector_info_from_table()
1856 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
1880 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_get_legacy_connector_info_from_table()
1885 0), in radeon_get_legacy_connector_info_from_table()
1887 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_DFP1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1892 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1921 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1928 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_CRT1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1933 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_get_legacy_connector_info_from_table()
1962 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
1969 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_CRT1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
1973 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_CRT2, 0, 0); in radeon_get_legacy_connector_info_from_table()
1989 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
1994 0), in radeon_get_legacy_connector_info_from_table()
2001 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
2008 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_get_legacy_connector_info_from_table()
2013 0), in radeon_get_legacy_connector_info_from_table()
2031 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
2036 0), in radeon_get_legacy_connector_info_from_table()
2043 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
2050 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
2055 0), in radeon_get_legacy_connector_info_from_table()
2086 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_NONE_DETECTED, 0, 0); in radeon_get_legacy_connector_info_from_table()
2091 0), in radeon_get_legacy_connector_info_from_table()
2093 radeon_add_legacy_connector(dev, 0, ATOM_DEVICE_LCD1_SUPPORT, in radeon_get_legacy_connector_info_from_table()
2098 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
2103 0), in radeon_get_legacy_connector_info_from_table()
2117 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
2147 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_table()
2152 0), in radeon_get_legacy_connector_info_from_table()
2159 radeon_add_legacy_connector(dev, 0, in radeon_get_legacy_connector_info_from_table()
2166 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_table()
2213 if (rdev->pdev->device == 0x515e && in radeon_apply_legacy_quirks()
2214 rdev->pdev->subsystem_vendor == 0x1014) { in radeon_apply_legacy_quirks()
2221 if (rdev->pdev->device == 0x5B60 && in radeon_apply_legacy_quirks()
2222 rdev->pdev->subsystem_vendor == 0x17af && in radeon_apply_legacy_quirks()
2223 rdev->pdev->subsystem_device == 0x201e && bios_index == 2) { in radeon_apply_legacy_quirks()
2236 if (rdev->pdev->device == 0x5975 && in radeon_apply_legacy_tv_quirks()
2237 rdev->pdev->subsystem_vendor == 0x1025 && in radeon_apply_legacy_tv_quirks()
2238 rdev->pdev->subsystem_device == 0x009f) in radeon_apply_legacy_tv_quirks()
2242 if (rdev->pdev->device == 0x5974 && in radeon_apply_legacy_tv_quirks()
2243 rdev->pdev->subsystem_vendor == 0x103c && in radeon_apply_legacy_tv_quirks()
2244 rdev->pdev->subsystem_device == 0x280a) in radeon_apply_legacy_tv_quirks()
2248 if (rdev->pdev->device == 0x5955 && in radeon_apply_legacy_tv_quirks()
2249 rdev->pdev->subsystem_vendor == 0x1462 && in radeon_apply_legacy_tv_quirks()
2250 rdev->pdev->subsystem_device == 0x0131) in radeon_apply_legacy_tv_quirks()
2298 int i = 0; in radeon_get_legacy_connector_info_from_bios()
2304 for (i = 0; i < 4; i++) { in radeon_get_legacy_connector_info_from_bios()
2312 connector = (tmp >> 12) & 0xf; in radeon_get_legacy_connector_info_from_bios()
2314 ddc_type = (tmp >> 8) & 0xf; in radeon_get_legacy_connector_info_from_bios()
2318 ddc_i2c = combios_setup_i2c_bus(rdev, ddc_type, 0, 0); in radeon_get_legacy_connector_info_from_bios()
2324 if ((tmp >> 4) & 0x1) in radeon_get_legacy_connector_info_from_bios()
2340 if ((tmp >> 4) & 0x1) in radeon_get_legacy_connector_info_from_bios()
2346 (dev, devices, 0), in radeon_get_legacy_connector_info_from_bios()
2356 if (tmp & 0x1) { in radeon_get_legacy_connector_info_from_bios()
2383 devices = 0; in radeon_get_legacy_connector_info_from_bios()
2384 if (tmp & 0x1) { in radeon_get_legacy_connector_info_from_bios()
2404 if (rdev->pdev->device == 0x5159 && in radeon_get_legacy_connector_info_from_bios()
2405 rdev->pdev->subsystem_vendor == 0x1014 && in radeon_get_legacy_connector_info_from_bios()
2406 rdev->pdev->subsystem_device == 0x029A) { in radeon_get_legacy_connector_info_from_bios()
2409 if ((tmp >> 4) & 0x1) { in radeon_get_legacy_connector_info_from_bios()
2415 0), in radeon_get_legacy_connector_info_from_bios()
2417 connector_object_id = combios_check_dl_dvi(dev, 0); in radeon_get_legacy_connector_info_from_bios()
2424 0), in radeon_get_legacy_connector_info_from_bios()
2438 if ((tmp >> 4) & 0x1) { in radeon_get_legacy_connector_info_from_bios()
2447 (dev, devices, 0), in radeon_get_legacy_connector_info_from_bios()
2493 0), in radeon_get_legacy_connector_info_from_bios()
2496 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); in radeon_get_legacy_connector_info_from_bios()
2499 0, in radeon_get_legacy_connector_info_from_bios()
2516 ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); in radeon_get_legacy_connector_info_from_bios()
2519 0, in radeon_get_legacy_connector_info_from_bios()
2543 0), in radeon_get_legacy_connector_info_from_bios()
2567 combios_setup_i2c_bus(rdev, ddc_type, 0, 0); in radeon_get_legacy_connector_info_from_bios()
2625 u16 offset, misc, misc2 = 0; in radeon_combios_get_power_modes()
2627 int state_index = 0; in radeon_combios_get_power_modes()
2637 rdev->pm.power_state[0].clock_info = in radeon_combios_get_power_modes()
2643 if (!rdev->pm.power_state[0].clock_info || in radeon_combios_get_power_modes()
2652 u8 thermal_controller = 0, gpio = 0, i2c_addr = 0, clk_bit = 0, data_bit = 0; in radeon_combios_get_power_modes()
2656 if (rev == 0) { in radeon_combios_get_power_modes()
2658 gpio = RBIOS8(offset + 4) & 0x3f; in radeon_combios_get_power_modes()
2662 gpio = RBIOS8(offset + 5) & 0x3f; in radeon_combios_get_power_modes()
2666 gpio = RBIOS8(offset + 5) & 0x3f; in radeon_combios_get_power_modes()
2668 clk_bit = RBIOS8(offset + 0xa); in radeon_combios_get_power_modes()
2669 data_bit = RBIOS8(offset + 0xb); in radeon_combios_get_power_modes()
2671 if ((thermal_controller > 0) && (thermal_controller < 3)) { in radeon_combios_get_power_modes()
2672 DRM_INFO("Possible %s thermal controller at 0x%02x\n", in radeon_combios_get_power_modes()
2680 i2c_bus.i2c_id = 0xa0; in radeon_combios_get_power_modes()
2684 i2c_bus = combios_setup_i2c_bus(rdev, gpio, 0, 0); in radeon_combios_get_power_modes()
2698 if ((rdev->pdev->device == 0x4152) && in radeon_combios_get_power_modes()
2699 (rdev->pdev->subsystem_vendor == 0x1043) && in radeon_combios_get_power_modes()
2700 (rdev->pdev->subsystem_device == 0xc002)) { in radeon_combios_get_power_modes()
2701 i2c_bus = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0); in radeon_combios_get_power_modes()
2706 info.addr = 0x28; in radeon_combios_get_power_modes()
2709 DRM_INFO("Possible %s thermal controller at 0x%02x\n", in radeon_combios_get_power_modes()
2719 /* power mode 0 tends to be the only valid one */ in radeon_combios_get_power_modes()
2721 rdev->pm.power_state[state_index].clock_info[0].mclk = RBIOS32(offset + 0x5 + 0x2); in radeon_combios_get_power_modes()
2722 rdev->pm.power_state[state_index].clock_info[0].sclk = RBIOS32(offset + 0x5 + 0x6); in radeon_combios_get_power_modes()
2723 if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || in radeon_combios_get_power_modes()
2724 (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) in radeon_combios_get_power_modes()
2728 misc = RBIOS16(offset + 0x5 + 0x0); in radeon_combios_get_power_modes()
2730 misc2 = RBIOS16(offset + 0x5 + 0xe); in radeon_combios_get_power_modes()
2733 if (misc & 0x4) { in radeon_combios_get_power_modes()
2734 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; in radeon_combios_get_power_modes()
2735 if (misc & 0x8) in radeon_combios_get_power_modes()
2736 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2739 rdev->pm.power_state[state_index].clock_info[0].voltage.active_high = in radeon_combios_get_power_modes()
2741 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = true; in radeon_combios_get_power_modes()
2743 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2744 RBIOS16(offset + 0x5 + 0xb) * 4; in radeon_combios_get_power_modes()
2745 tmp = RBIOS8(offset + 0x5 + 0xd); in radeon_combios_get_power_modes()
2746 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2748 u8 entries = RBIOS8(offset + 0x5 + 0xb); in radeon_combios_get_power_modes()
2749 u16 voltage_table_offset = RBIOS16(offset + 0x5 + 0xc); in radeon_combios_get_power_modes()
2751 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.reg = in radeon_combios_get_power_modes()
2753 tmp = RBIOS8(voltage_table_offset + 0x2); in radeon_combios_get_power_modes()
2754 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.mask = (1 << tmp); in radeon_combios_get_power_modes()
2756 rdev->pm.power_state[state_index].clock_info[0].voltage.gpio.valid = false; in radeon_combios_get_power_modes()
2758 switch ((misc2 & 0x700) >> 8) { in radeon_combios_get_power_modes()
2759 case 0: in radeon_combios_get_power_modes()
2761 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 0; in radeon_combios_get_power_modes()
2764 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 33; in radeon_combios_get_power_modes()
2767 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 66; in radeon_combios_get_power_modes()
2770 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 99; in radeon_combios_get_power_modes()
2773 rdev->pm.power_state[state_index].clock_info[0].voltage.delay = 132; in radeon_combios_get_power_modes()
2777 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2780 RBIOS8(offset + 0x5 + 0x10); in radeon_combios_get_power_modes()
2795 rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; in radeon_combios_get_power_modes()
2796 rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; in radeon_combios_get_power_modes()
2797 …>pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_info[0]; in radeon_combios_get_power_modes()
2798 if ((state_index > 0) && in radeon_combios_get_power_modes()
2799 (rdev->pm.power_state[0].clock_info[0].voltage.type == VOLTAGE_GPIO)) in radeon_combios_get_power_modes()
2800 rdev->pm.power_state[state_index].clock_info[0].voltage = in radeon_combios_get_power_modes()
2801 rdev->pm.power_state[0].clock_info[0].voltage; in radeon_combios_get_power_modes()
2803 rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; in radeon_combios_get_power_modes()
2805 rdev->pm.power_state[state_index].flags = 0; in radeon_combios_get_power_modes()
2810 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2815 rdev->pm.num_power_states = 0; in radeon_combios_get_power_modes()
2818 rdev->pm.current_clock_mode_index = 0; in radeon_combios_get_power_modes()
2834 0x08, 0x30); in radeon_external_tmds_setup()
2837 0x09, 0x00); in radeon_external_tmds_setup()
2840 0x0a, 0x90); in radeon_external_tmds_setup()
2843 0x0c, 0x89); in radeon_external_tmds_setup()
2846 0x08, 0x3b); in radeon_external_tmds_setup()
2851 * 0x0f, 0x44 in radeon_external_tmds_setup()
2852 * 0x0f, 0x4c in radeon_external_tmds_setup()
2853 * 0x0e, 0x01 in radeon_external_tmds_setup()
2854 * 0x0a, 0x80 in radeon_external_tmds_setup()
2855 * 0x09, 0x30 in radeon_external_tmds_setup()
2856 * 0x0c, 0xc9 in radeon_external_tmds_setup()
2857 * 0x0d, 0x70 in radeon_external_tmds_setup()
2858 * 0x08, 0x32 in radeon_external_tmds_setup()
2859 * 0x08, 0x33 in radeon_external_tmds_setup()
2890 while (blocks > 0) { in radeon_combios_external_tmds_setup()
2894 case 0: in radeon_combios_external_tmds_setup()
2895 reg = (id & 0x1fff) * 4; in radeon_combios_external_tmds_setup()
2901 reg = (id & 0x1fff) * 4; in radeon_combios_external_tmds_setup()
2921 slave_addr = id & 0xff; in radeon_combios_external_tmds_setup()
2946 while (id != 0xffff) { in radeon_combios_external_tmds_setup()
2949 case 0: in radeon_combios_external_tmds_setup()
2950 reg = (id & 0x1fff) * 4; in radeon_combios_external_tmds_setup()
2955 reg = (id & 0x1fff) * 4; in radeon_combios_external_tmds_setup()
2970 reg = id & 0x1fff; in radeon_combios_external_tmds_setup()
2980 reg = id & 0x1fff; in radeon_combios_external_tmds_setup()
3005 uint16_t cmd = ((RBIOS16(offset) & 0xe000) >> 13); in combios_parse_mmio_table()
3006 uint32_t addr = (RBIOS16(offset) & 0x1fff); in combios_parse_mmio_table()
3012 case 0: in combios_parse_mmio_table()
3084 uint8_t cmd = ((RBIOS8(offset) & 0xc0) >> 6); in combios_parse_pll_table()
3085 uint8_t addr = (RBIOS8(offset) & 0x3f); in combios_parse_pll_table()
3091 case 0: in combios_parse_pll_table()
3100 and_mask |= ~(0xff << shift); in combios_parse_pll_table()
3140 #if 0 in combios_parse_pll_table()
3144 mclk_cntl &= 0xffff0000; in combios_parse_pll_table()
3145 /*mclk_cntl |= 0x00001111;*//* ??? */ in combios_parse_pll_table()
3176 while (val != 0xff) { in combios_parse_ram_reset_table()
3179 if (val == 0x0f) { in combios_parse_ram_reset_table()
3221 uint32_t addr = 0; in combios_detect_ram()
3227 mem_cntl &= ~(0xff << 8); in combios_detect_ram()
3228 mem_cntl |= (mem_addr_mapping & 0xff) << 8; in combios_detect_ram()
3238 WREG32_IDX((addr) | RADEON_MM_APER, 0xdeadbeef); in combios_detect_ram()
3240 if (RREG32_IDX((addr) | RADEON_MM_APER) != 0xdeadbeef) in combios_detect_ram()
3241 return 0; in combios_detect_ram()
3252 uint32_t mem_size = 0; in combios_write_ram_size()
3253 uint32_t mem_cntl = 0; in combios_write_ram_size()
3280 int ram = 0; in combios_write_ram_size()
3281 int mem_addr_mapping = 0; in combios_write_ram_size()
3287 if (mem_addr_mapping != 0x25) in combios_write_ram_size()
3359 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3360 rdev->pdev->subsystem_device == 0x308b) in radeon_combios_asic_init()
3367 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3368 rdev->pdev->subsystem_device == 0x30a4) in radeon_combios_asic_init()
3375 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3376 rdev->pdev->subsystem_device == 0x30ae) in radeon_combios_asic_init()
3383 rdev->pdev->subsystem_vendor == 0x103c && in radeon_combios_asic_init()
3384 rdev->pdev->subsystem_device == 0x280a) in radeon_combios_asic_init()
3390 rdev->pdev->subsystem_vendor == 0x1179 && in radeon_combios_asic_init()
3391 rdev->pdev->subsystem_device == 0xff31) in radeon_combios_asic_init()