diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-02-17 18:10:04 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-03-14 00:13:17 (GMT) |
commit | e24c9c44d7a3b4a57661100efc11b340ecdc873c (patch) | |
tree | 5987481d1f51defbc24c1531e3e8d7d3b159a75b | |
parent | 989f57847396d1d042204747985d6aacf5399c8a (diff) | |
download | linux-e24c9c44d7a3b4a57661100efc11b340ecdc873c.tar.xz |
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: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c index c99b667..38ed09f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/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; } } |