Commit 6d60792e authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Ben Skeggs

drm/nouveau/bios: make jump conditional

This fixes a hang in VBIOS scripts of the form "condition; jump".
The jump used to always be executed, while now it will only be
executed if the condition is true.

See https://bugs.freedesktop.org/show_bug.cgi?id=72943Reported-by: default avatarDarcy Brás da Silva <dardevelin@cidadecool.com>
Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
parent 6e9cbb40
......@@ -1294,7 +1294,11 @@ init_jump(struct nvbios_init *init)
u16 offset = nv_ro16(bios, init->offset + 1);
trace("JUMP\t0x%04x\n", offset);
init->offset = offset;
if (init_exec(init))
init->offset = offset;
else
init->offset += 3;
}
/**
......
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