Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79d48dad authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent f4e65efc
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -207,8 +207,11 @@ nvbios_dpcfg_match(struct nvkm_bios *bios, u16 outp, u8 pc, u8 vs, u8 pe,
	if (*ver >= 0x30) {
	if (*ver >= 0x30) {
		const u8 vsoff[] = { 0, 4, 7, 9 };
		const u8 vsoff[] = { 0, 4, 7, 9 };
		idx = (pc * 10) + vsoff[vs] + pe;
		idx = (pc * 10) + vsoff[vs] + pe;
		if (*ver >= 0x40 && *hdr >= 0x12)
		if (*ver >= 0x40 && *ver <= 0x41 && *hdr >= 0x12)
			idx += nvbios_rd08(bios, outp + 0x11) * 40;
			idx += nvbios_rd08(bios, outp + 0x11) * 40;
		else
		if (*ver >= 0x42)
			idx += nvbios_rd08(bios, outp + 0x11) * 10;
	} else {
	} else {
		while ((data = nvbios_dpcfg_entry(bios, outp, ++idx,
		while ((data = nvbios_dpcfg_entry(bios, outp, ++idx,
						  ver, hdr, cnt, len))) {
						  ver, hdr, cnt, len))) {