diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-02-18 04:10:04 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-02-25 13:22:10 +1000 |
commit | 5ab28509d22b16a3b03f2c1af3d4ab5ad8f9cc09 (patch) | |
tree | 26adbe786af8dd8e46c0fda7efb97afdc480a3ad | |
parent | a46e4dd535c7ca10ab5364b7c248ea6595cce207 (diff) | |
download | nouveau-5ab28509d22b16a3b03f2c1af3d4ab5ad8f9cc09.tar.gz |
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: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drm/nouveau/nvkm/subdev/bios/init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drm/nouveau/nvkm/subdev/bios/init.c b/drm/nouveau/nvkm/subdev/bios/init.c index c99b66761..38ed09fd3 100644 --- a/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drm/nouveau/nvkm/subdev/bios/init.c @@ -795,11 +795,11 @@ init_generic_condition(struct nvbios_init *init) struct nvkm_bios *bios = init->bios; struct nvbios_dpout info; 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; 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; switch (cond) { @@ -829,6 +829,7 @@ init_generic_condition(struct nvbios_init *init) break; default: warn("INIT_GENERIC_CONDITON: unknown 0x%02x\n", cond); + init->offset += size; break; } } |