Commit e24c9c44 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bios/devinit: properly handle unknown generic conditions

Upon encountering an unknown condition code, the script interpreter
is supposed to skip 'size' bytes and continue at the next devinit
token.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 989f5784
...@@ -795,11 +795,11 @@ init_generic_condition(struct nvbios_init *init) ...@@ -795,11 +795,11 @@ init_generic_condition(struct nvbios_init *init)
struct nvkm_bios *bios = init->bios; struct nvkm_bios *bios = init->bios;
struct nvbios_dpout info; struct nvbios_dpout info;
u8 cond = nvbios_rd08(bios, init->offset + 1); u8 cond = nvbios_rd08(bios, init->offset + 1);
u8 unkn = nvbios_rd08(bios, init->offset + 2); u8 size = nvbios_rd08(bios, init->offset + 2);
u8 ver, hdr, cnt, len; u8 ver, hdr, cnt, len;
u16 data; u16 data;
trace("GENERIC_CONDITION\t0x%02x 0x%02x\n", cond, unkn); trace("GENERIC_CONDITION\t0x%02x 0x%02x\n", cond, size);
init->offset += 3; init->offset += 3;
switch (cond) { switch (cond) {
...@@ -829,6 +829,7 @@ init_generic_condition(struct nvbios_init *init) ...@@ -829,6 +829,7 @@ init_generic_condition(struct nvbios_init *init)
break; break;
default: default:
warn("INIT_GENERIC_CONDITON: unknown 0x%02x\n", cond); warn("INIT_GENERIC_CONDITON: unknown 0x%02x\n", cond);
init->offset += size;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment