Lines Matching full:bios

51 	 * There's a few checksums in the BIOS, so here's a generic checking  in nv_cksum()
66 static uint16_t clkcmptable(struct nvbios *bios, uint16_t clktable, int pxclk) in clkcmptable() argument
71 if (bios->major_version < 5) /* pre BIT */ in clkcmptable()
77 compareclk = ROM16(bios->data[clktable + compare_record_len * i]); in clkcmptable()
79 if (bios->major_version < 5) { in clkcmptable()
80 uint8_t tmdssub = bios->data[clktable + 2 + compare_record_len * i]; in clkcmptable()
81 scriptptr = ROM16(bios->data[bios->init_script_tbls_ptr + tmdssub * 2]); in clkcmptable()
83 scriptptr = ROM16(bios->data[clktable + 2 + compare_record_len * i]); in clkcmptable()
110 struct nvbios *bios = &drm->vbios; in call_lvds_manufacturer_script() local
111 …uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->o… in call_lvds_manufacturer_script()
112 uint16_t scriptofs = ROM16(bios->data[bios->init_script_tbls_ptr + sub * 2]); in call_lvds_manufacturer_script()
114 if (!bios->fp.xlated_entry || !sub || !scriptofs) in call_lvds_manufacturer_script()
117 run_digital_op_script(dev, scriptofs, dcbent, head, bios->fp.dual_link); in call_lvds_manufacturer_script()
121 mdelay(ROM16(bios->data[bios->fp.xlated_entry + 7])); in call_lvds_manufacturer_script()
147 struct nvbios *bios = &drm->vbios; in run_lvds_table() local
161 scriptptr = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 7 + outputset * 2]); in run_lvds_table()
165 scriptptr = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 11 + outputset * 2]); in run_lvds_table()
168 clktable = bios->fp.lvdsmanufacturerpointer + 15; in run_lvds_table()
173 if (bios->fp.dual_link) in run_lvds_table()
175 if (bios->fp.if_is_24bit) in run_lvds_table()
181 if (bios->fp.dual_link) { in run_lvds_table()
186 if (bios->fp.strapless_is_24bit & cmpval_24bit) in run_lvds_table()
190 clktable = ROM16(bios->data[clktable]); in run_lvds_table()
195 scriptptr = clkcmptable(bios, clktable, pxclk); in run_lvds_table()
202 run_digital_op_script(dev, scriptptr, dcbent, head, bios->fp.dual_link); in run_lvds_table()
217 struct nvbios *bios = &drm->vbios; in call_lvds_script() local
218 uint8_t lvds_ver = bios->data[bios->fp.lvdsmanufacturerpointer]; in call_lvds_script()
222 if (bios->fp.last_script_invoc == (script << 1 | head) || !lvds_ver || in call_lvds_script()
226 if (!bios->fp.lvds_init_run) { in call_lvds_script()
227 bios->fp.lvds_init_run = true; in call_lvds_script()
231 if (script == LVDS_PANEL_ON && bios->fp.reset_after_pclk_change) in call_lvds_script()
233 if (script == LVDS_RESET && bios->fp.power_off_for_reset) in call_lvds_script()
246 bios->fp.last_script_invoc = (script << 1 | head); in call_lvds_script()
260 static int parse_lvds_manufacturer_table_header(struct drm_device *dev, struct nvbios *bios, struct… in parse_lvds_manufacturer_table_header() argument
274 if (bios->fp.lvdsmanufacturerpointer == 0x0) { in parse_lvds_manufacturer_table_header()
279 lvds_ver = bios->data[bios->fp.lvdsmanufacturerpointer]; in parse_lvds_manufacturer_table_header()
284 recordlen = bios->data[bios->fp.lvdsmanufacturerpointer + 1]; in parse_lvds_manufacturer_table_header()
287 headerlen = bios->data[bios->fp.lvdsmanufacturerpointer + 1]; in parse_lvds_manufacturer_table_header()
292 recordlen = bios->data[bios->fp.lvdsmanufacturerpointer + 2]; in parse_lvds_manufacturer_table_header()
295 headerlen = bios->data[bios->fp.lvdsmanufacturerpointer + 1]; in parse_lvds_manufacturer_table_header()
300 recordlen = bios->data[bios->fp.lvdsmanufacturerpointer + 2]; in parse_lvds_manufacturer_table_header()
317 get_fp_strap(struct drm_device *dev, struct nvbios *bios) in get_fp_strap() argument
331 if (bios->major_version < 5 && bios->data[0x48] & 0x4) in get_fp_strap()
343 static int parse_fp_mode_table(struct drm_device *dev, struct nvbios *bios) in parse_fp_mode_table() argument
351 if (bios->fp.fptablepointer == 0x0) { in parse_fp_mode_table()
354 bios->digital_min_front_porch = 0x4b; in parse_fp_mode_table()
358 fptable = &bios->data[bios->fp.fptablepointer]; in parse_fp_mode_table()
387 bios->digital_min_front_porch = fptable[4]; in parse_fp_mode_table()
397 if (!bios->is_mobile) /* !mobile only needs digital_min_front_porch */ in parse_fp_mode_table()
400 ret = parse_lvds_manufacturer_table_header(dev, bios, &lth); in parse_fp_mode_table()
405 bios->fp.fpxlatetableptr = bios->fp.lvdsmanufacturerpointer + in parse_fp_mode_table()
407 bios->fp.xlatwidth = lth.recordlen; in parse_fp_mode_table()
409 if (bios->fp.fpxlatetableptr == 0x0) { in parse_fp_mode_table()
414 fpstrapping = get_fp_strap(dev, bios); in parse_fp_mode_table()
416 fpindex = bios->data[bios->fp.fpxlatetableptr + in parse_fp_mode_table()
417 fpstrapping * bios->fp.xlatwidth]; in parse_fp_mode_table()
426 bios->fp_no_ddc = fpstrapping != 0xf || fpindex != 0xf; in parse_fp_mode_table()
430 * panel using a strap-derived bios mode present. this condition in parse_fp_mode_table()
436 bios->fp.mode_ptr = bios->fp.fptablepointer + headerlen + in parse_fp_mode_table()
439 NV_INFO(drm, "BIOS FP mode: %dx%d (%dkHz pixel clock)\n", in parse_fp_mode_table()
440 ROM16(bios->data[bios->fp.mode_ptr + 11]) + 1, in parse_fp_mode_table()
441 ROM16(bios->data[bios->fp.mode_ptr + 25]) + 1, in parse_fp_mode_table()
442 ROM16(bios->data[bios->fp.mode_ptr + 7]) * 10); in parse_fp_mode_table()
450 struct nvbios *bios = &drm->vbios; in nouveau_bios_fp_mode() local
451 uint8_t *mode_entry = &bios->data[bios->fp.mode_ptr]; in nouveau_bios_fp_mode()
454 return bios->fp.mode_ptr; in nouveau_bios_fp_mode()
490 return bios->fp.mode_ptr; in nouveau_bios_fp_mode()
521 struct nvbios *bios = &drm->vbios; in nouveau_bios_parse_lvds_table() local
522 int fpstrapping = get_fp_strap(dev, bios), lvdsmanufacturerindex = 0; in nouveau_bios_parse_lvds_table()
525 int ret, chip_version = bios->chip_version; in nouveau_bios_parse_lvds_table()
527 ret = parse_lvds_manufacturer_table_header(dev, bios, &lth); in nouveau_bios_parse_lvds_table()
533 lvdsmanufacturerindex = bios->data[ in nouveau_bios_parse_lvds_table()
534 bios->fp.fpxlatemanufacturertableptr + in nouveau_bios_parse_lvds_table()
548 (bios->legacy.lvds_single_a_script_ptr & 1) ? in nouveau_bios_parse_lvds_table()
550 if (pxclk >= bios->fp.duallink_transition_clk) in nouveau_bios_parse_lvds_table()
566 if (pxclk >= bios->fp.duallink_transition_clk) in nouveau_bios_parse_lvds_table()
586 …lvdsofs = bios->fp.xlated_entry = bios->fp.lvdsmanufacturerpointer + lth.headerlen + lth.recordlen… in nouveau_bios_parse_lvds_table()
589 bios->fp.power_off_for_reset = bios->data[lvdsofs] & 1; in nouveau_bios_parse_lvds_table()
590 bios->fp.reset_after_pclk_change = bios->data[lvdsofs] & 2; in nouveau_bios_parse_lvds_table()
591 bios->fp.dual_link = bios->data[lvdsofs] & 4; in nouveau_bios_parse_lvds_table()
592 bios->fp.link_c_increment = bios->data[lvdsofs] & 8; in nouveau_bios_parse_lvds_table()
593 *if_is_24bit = bios->data[lvdsofs] & 16; in nouveau_bios_parse_lvds_table()
601 bios->fp.power_off_for_reset = true; in nouveau_bios_parse_lvds_table()
602 bios->fp.reset_after_pclk_change = true; in nouveau_bios_parse_lvds_table()
608 bios->fp.dual_link = bios->data[lvdsofs] & 1; in nouveau_bios_parse_lvds_table()
609 bios->fp.if_is_24bit = bios->data[lvdsofs] & 2; in nouveau_bios_parse_lvds_table()
610 bios->fp.strapless_is_24bit = bios->data[bios->fp.lvdsmanufacturerpointer + 4]; in nouveau_bios_parse_lvds_table()
611 bios->fp.duallink_transition_clk = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 5]) * 10; in nouveau_bios_parse_lvds_table()
617 bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk); in nouveau_bios_parse_lvds_table()
619 *dl = bios->fp.dual_link; in nouveau_bios_parse_lvds_table()
629 * This runs the TMDS regs setting code found on BIT bios cards in run_tmds_table()
637 struct nvbios *bios = &drm->vbios; in run_tmds_table() local
638 int cv = bios->chip_version; in run_tmds_table()
649 clktable = bios->tmds.output0_script_ptr; in run_tmds_table()
653 clktable = bios->tmds.output1_script_ptr; in run_tmds_table()
662 scriptptr = clkcmptable(bios, clktable, pxclk); in run_tmds_table()
678 static void parse_script_table_pointers(struct nvbios *bios, uint16_t offset) in parse_script_table_pointers() argument
692 bios->init_script_tbls_ptr = ROM16(bios->data[offset]); in parse_script_table_pointers()
695 static int parse_bit_A_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bit… in parse_bit_A_tbl_entry() argument
712 load_table_ptr = ROM16(bios->data[bitentry->offset]); in parse_bit_A_tbl_entry()
719 version = bios->data[load_table_ptr]; in parse_bit_A_tbl_entry()
727 headerlen = bios->data[load_table_ptr + 1]; in parse_bit_A_tbl_entry()
728 entrylen = bios->data[load_table_ptr + 2]; in parse_bit_A_tbl_entry()
729 num_entries = bios->data[load_table_ptr + 3]; in parse_bit_A_tbl_entry()
737 bios->dactestval = ROM32(bios->data[load_table_ptr + headerlen]) & 0x3ff; in parse_bit_A_tbl_entry()
742 static int parse_bit_display_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entr… in parse_bit_display_tbl_entry() argument
759 bios->fp.fptablepointer = ROM16(bios->data[bitentry->offset + 2]); in parse_bit_display_tbl_entry()
764 static int parse_bit_init_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *… in parse_bit_init_tbl_entry() argument
778 parse_script_table_pointers(bios, bitentry->offset); in parse_bit_init_tbl_entry()
782 static int parse_bit_i_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bit… in parse_bit_i_tbl_entry() argument
787 * offset + 0 (32 bits): BIOS version dword (as in B table) in parse_bit_i_tbl_entry()
788 * offset + 5 (8 bits): BIOS feature byte (same as for BMP?) in parse_bit_i_tbl_entry()
805 * bit 4 seems to indicate a mobile bios (doesn't suffer from BMP's in parse_bit_i_tbl_entry()
808 bios->feature_byte = bios->data[bitentry->offset + 5]; in parse_bit_i_tbl_entry()
809 bios->is_mobile = bios->feature_byte & FEATURE_MOBILE; in parse_bit_i_tbl_entry()
817 daccmpoffset = ROM16(bios->data[bitentry->offset + 13]); in parse_bit_i_tbl_entry()
829 dacver = bios->data[daccmpoffset]; in parse_bit_i_tbl_entry()
830 dacheaderlen = bios->data[daccmpoffset + 1]; in parse_bit_i_tbl_entry()
838 bios->dactestval = ROM32(bios->data[daccmpoffset + dacheaderlen]); in parse_bit_i_tbl_entry()
839 bios->tvdactestval = ROM32(bios->data[daccmpoffset + dacheaderlen + 4]); in parse_bit_i_tbl_entry()
844 static int parse_bit_lvds_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *… in parse_bit_lvds_tbl_entry() argument
864 bios->fp.lvdsmanufacturerpointer = ROM16(bios->data[bitentry->offset]); in parse_bit_lvds_tbl_entry()
870 parse_bit_M_tbl_entry(struct drm_device *dev, struct nvbios *bios, in parse_bit_M_tbl_entry() argument
884 * Older bios versions don't have a sufficiently long table for in parse_bit_M_tbl_entry()
891 bios->ram_restrict_group_count = bios->data[bitentry->offset + 2]; in parse_bit_M_tbl_entry()
892 bios->ram_restrict_tbl_ptr = ROM16(bios->data[bitentry->offset + 3]); in parse_bit_M_tbl_entry()
894 bios->ram_restrict_group_count = bios->data[bitentry->offset + 0]; in parse_bit_M_tbl_entry()
895 bios->ram_restrict_tbl_ptr = ROM16(bios->data[bitentry->offset + 1]); in parse_bit_M_tbl_entry()
901 static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *… in parse_bit_tmds_tbl_entry() argument
934 tmdstableptr = ROM16(bios->data[bitentry->offset]); in parse_bit_tmds_tbl_entry()
941 bios->data[tmdstableptr] >> 4, bios->data[tmdstableptr] & 0xf); in parse_bit_tmds_tbl_entry()
944 if (bios->data[tmdstableptr] != 0x11) in parse_bit_tmds_tbl_entry()
951 script1 = ROM16(bios->data[tmdstableptr + 7]); in parse_bit_tmds_tbl_entry()
952 script2 = ROM16(bios->data[tmdstableptr + 9]); in parse_bit_tmds_tbl_entry()
953 if (bios->data[script1] != 'q' || bios->data[script2] != 'q') in parse_bit_tmds_tbl_entry()
956 bios->tmds.output0_script_ptr = ROM16(bios->data[tmdstableptr + 11]); in parse_bit_tmds_tbl_entry()
957 bios->tmds.output1_script_ptr = ROM16(bios->data[tmdstableptr + 13]); in parse_bit_tmds_tbl_entry()
973 struct nvbios *bios = &drm->vbios; in bit_table() local
976 if (bios->type != NVBIOS_BIT) in bit_table()
979 entries = bios->data[bios->offset + 10]; in bit_table()
980 entry = &bios->data[bios->offset + 12]; in bit_table()
991 entry += bios->data[bios->offset + 9]; in bit_table()
998 parse_bit_table(struct nvbios *bios, const uint16_t bitoffset, in parse_bit_table() argument
1001 struct drm_device *dev = bios->dev; in parse_bit_table()
1006 return table->parse_fn(dev, bios, &bitentry); in parse_bit_table()
1013 parse_bit_structure(struct nvbios *bios, const uint16_t bitoffset) in parse_bit_structure() argument
1019 * for use of bios->*_version or bios->feature_byte while parsing; in parse_bit_structure()
1021 * data from the image into the bios struct, thus no interdependencies in parse_bit_structure()
1023 ret = parse_bit_table(bios, bitoffset, &BIT_TABLE('i', i)); in parse_bit_structure()
1026 if (bios->major_version >= 0x60) /* g80+ */ in parse_bit_structure()
1027 parse_bit_table(bios, bitoffset, &BIT_TABLE('A', A)); in parse_bit_structure()
1028 parse_bit_table(bios, bitoffset, &BIT_TABLE('D', display)); in parse_bit_structure()
1029 ret = parse_bit_table(bios, bitoffset, &BIT_TABLE('I', init)); in parse_bit_structure()
1032 parse_bit_table(bios, bitoffset, &BIT_TABLE('M', M)); /* memory? */ in parse_bit_structure()
1033 parse_bit_table(bios, bitoffset, &BIT_TABLE('L', lvds)); in parse_bit_structure()
1034 parse_bit_table(bios, bitoffset, &BIT_TABLE('T', tmds)); in parse_bit_structure()
1039 static int parse_bmp_structure(struct drm_device *dev, struct nvbios *bios, unsigned int offset) in parse_bmp_structure() argument
1047 * offset + 10: BCD encoded BIOS version in parse_bmp_structure()
1049 * offset + 18: init script table pointer (for bios versions < 5.10h) in parse_bmp_structure()
1050 * offset + 20: extra init script table pointer (for bios in parse_bmp_structure()
1053 * offset + 24: memory init table pointer (used on early bios versions) in parse_bmp_structure()
1085 uint8_t *bmp = &bios->data[offset], bmp_version_major, bmp_version_minor; in parse_bmp_structure()
1090 bios->digital_min_front_porch = 0x4b; in parse_bmp_structure()
1091 bios->fmaxvco = 256000; in parse_bmp_structure()
1092 bios->fminvco = 128000; in parse_bmp_structure()
1093 bios->fp.duallink_transition_clk = 90000; in parse_bmp_structure()
1106 *(uint16_t *)&bios->data[0x36] = 0; in parse_bmp_structure()
1115 "Please send in your bios\n"); in parse_bmp_structure()
1168 * Bit 4 seems to indicate either a mobile bios or a quadro card -- in parse_bmp_structure()
1171 * bit 6 a tv bios. in parse_bmp_structure()
1173 bios->feature_byte = bmp[9]; in parse_bmp_structure()
1176 bios->old_style_init = true; in parse_bmp_structure()
1180 bios->init_script_tbls_ptr = ROM16(bmp[legacy_scripts_offset]); in parse_bmp_structure()
1181 bios->extra_init_script_tbl_ptr = ROM16(bmp[legacy_scripts_offset + 2]); in parse_bmp_structure()
1184 bios->legacy.mem_init_tbl_ptr = ROM16(bmp[24]); in parse_bmp_structure()
1185 bios->legacy.sdr_seq_tbl_ptr = ROM16(bmp[26]); in parse_bmp_structure()
1186 bios->legacy.ddr_seq_tbl_ptr = ROM16(bmp[28]); in parse_bmp_structure()
1192 bios->legacy.i2c_indices.crt = bios->data[legacy_i2c_offset]; in parse_bmp_structure()
1193 bios->legacy.i2c_indices.tv = bios->data[legacy_i2c_offset + 1]; in parse_bmp_structure()
1194 bios->legacy.i2c_indices.panel = bios->data[legacy_i2c_offset + 2]; in parse_bmp_structure()
1197 bios->fmaxvco = ROM32(bmp[67]); in parse_bmp_structure()
1198 bios->fminvco = ROM32(bmp[71]); in parse_bmp_structure()
1201 parse_script_table_pointers(bios, offset + 75); in parse_bmp_structure()
1203 bios->tmds.output0_script_ptr = ROM16(bmp[89]); in parse_bmp_structure()
1204 bios->tmds.output1_script_ptr = ROM16(bmp[91]); in parse_bmp_structure()
1210 bios->legacy.lvds_single_a_script_ptr = ROM16(bmp[95]); in parse_bmp_structure()
1213 bios->fp.fptablepointer = ROM16(bmp[105]); in parse_bmp_structure()
1214 bios->fp.fpxlatetableptr = ROM16(bmp[107]); in parse_bmp_structure()
1215 bios->fp.xlatwidth = 1; in parse_bmp_structure()
1218 bios->fp.lvdsmanufacturerpointer = ROM16(bmp[117]); in parse_bmp_structure()
1219 bios->fp.fpxlatemanufacturertableptr = ROM16(bmp[119]); in parse_bmp_structure()
1223 bios->pll_limit_tbl_ptr = ROM16(bmp[142]); in parse_bmp_structure()
1227 bios->fp.duallink_transition_clk = ROM16(bmp[156]) * 10; in parse_bmp_structure()
1753 fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios) in fabricate_dcb_encoder_table() argument
1755 struct dcb_table *dcb = &bios->dcb; in fabricate_dcb_encoder_table()
1769 bios->legacy.i2c_indices.crt, 1, 1); in fabricate_dcb_encoder_table()
1771 if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0) in fabricate_dcb_encoder_table()
1773 bios->legacy.i2c_indices.tv, in fabricate_dcb_encoder_table()
1776 else if (bios->tmds.output0_script_ptr || in fabricate_dcb_encoder_table()
1777 bios->tmds.output1_script_ptr) in fabricate_dcb_encoder_table()
1779 bios->legacy.i2c_indices.panel, in fabricate_dcb_encoder_table()
1817 dcb_fake_connectors(struct nvbios *bios) in dcb_fake_connectors() argument
1819 struct dcb_table *dcbt = &bios->dcb; in dcb_fake_connectors()
1826 * and, as usual, a blacklist of boards with bad bios data.. in dcb_fake_connectors()
1828 if (!nv_match_device(bios->dev, 0x0392, 0x107d, 0x20a2)) { in dcb_fake_connectors()
1856 u8 *conntab = olddcb_conntab(bios->dev); in dcb_fake_connectors()
1863 parse_dcb_table(struct drm_device *dev, struct nvbios *bios) in parse_dcb_table() argument
1866 struct dcb_table *dcb = &bios->dcb; in parse_dcb_table()
1873 if (bios->type == NVBIOS_BMP) { in parse_dcb_table()
1874 fabricate_dcb_encoder_table(dev, bios); in parse_dcb_table()
1905 dcb_fake_connectors(bios); in parse_dcb_table()
1909 static int load_nv17_hwsq_ucode_entry(struct drm_device *dev, struct nvbios *bios, uint16_t hwsq_of… in load_nv17_hwsq_ucode_entry() argument
1926 if (bios->data[hwsq_offset] <= entry) { in load_nv17_hwsq_ucode_entry()
1932 bytes_to_write = bios->data[hwsq_offset + 1]; in load_nv17_hwsq_ucode_entry()
1944 nvif_wr32(device, 0x00001304, ROM32(bios->data[hwsq_entry_offset])); in load_nv17_hwsq_ucode_entry()
1949 nvif_wr32(device, 0x00001400 + i, ROM32(bios->data[hwsq_entry_offset + i + 4])); in load_nv17_hwsq_ucode_entry()
1958 struct nvbios *bios) in load_nv17_hw_sequencer_ucode() argument
1973 hwsq_offset = findstr(bios->data, bios->length, hwsq_signature, sz); in load_nv17_hw_sequencer_ucode()
1978 return load_nv17_hwsq_ucode_entry(dev, bios, hwsq_offset + sz, 0); in load_nv17_hw_sequencer_ucode()
1984 struct nvbios *bios = &drm->vbios; in nouveau_bios_embedded_edid() local
1991 if (bios->fp.edid) in nouveau_bios_embedded_edid()
1992 return bios->fp.edid; in nouveau_bios_embedded_edid()
1995 newoffset = findstr(&bios->data[offset], searchlen, in nouveau_bios_embedded_edid()
2000 if (!nv_cksum(&bios->data[offset], EDID1_LEN)) in nouveau_bios_embedded_edid()
2007 NV_INFO(drm, "Found EDID in BIOS\n"); in nouveau_bios_embedded_edid()
2009 return bios->fp.edid = &bios->data[offset]; in nouveau_bios_embedded_edid()
2015 struct nvkm_bios *bios = nvxx_bios(&drm->client.device); in NVInitVBIOS() local
2022 legacy->data = bios->data; in NVInitVBIOS()
2023 legacy->length = bios->size; in NVInitVBIOS()
2024 legacy->major_version = bios->version.major; in NVInitVBIOS()
2025 legacy->chip_version = bios->version.chip; in NVInitVBIOS()
2026 if (bios->bit_offset) { in NVInitVBIOS()
2028 legacy->offset = bios->bit_offset; in NVInitVBIOS()
2031 if (bios->bmp_offset) { in NVInitVBIOS()
2033 legacy->offset = bios->bmp_offset; in NVInitVBIOS()
2044 struct nvbios *bios = &drm->vbios; in nouveau_run_vbios_init() local
2047 /* Reset the BIOS head to 0. */ in nouveau_run_vbios_init()
2048 bios->state.crtchead = 0; in nouveau_run_vbios_init()
2050 if (bios->major_version < 5) /* BMP only */ in nouveau_run_vbios_init()
2051 load_nv17_hw_sequencer_ucode(dev, bios); in nouveau_run_vbios_init()
2053 if (bios->execute) { in nouveau_run_vbios_init()
2054 bios->fp.last_script_invoc = 0; in nouveau_run_vbios_init()
2055 bios->fp.lvds_init_run = false; in nouveau_run_vbios_init()
2082 struct nvbios *bios = &drm->vbios; in nouveau_bios_init() local
2092 ret = parse_dcb_table(dev, bios); in nouveau_bios_init()
2096 if (!bios->major_version) /* we don't run version 0 bios */ in nouveau_bios_init()
2100 bios->execute = false; in nouveau_bios_init()
2106 bios->execute = true; in nouveau_bios_init()
2114 if (bios->major_version < 5) in nouveau_bios_init()
2115 bios->is_mobile = NVReadVgaCrtc(dev, 0, NV_CIO_CRE_4B) & 0x40; in nouveau_bios_init()
2118 if (bios->is_mobile || bios->major_version >= 5) in nouveau_bios_init()
2119 ret = parse_fp_mode_table(dev, bios); in nouveau_bios_init()
2122 bios->execute = true; in nouveau_bios_init()