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=72943

Reported-by: Darcy Brás da Silva <dardevelin@cidadecool.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
This commit is contained in:
Ilia Mirkin 2014-01-05 20:07:02 -05:00 committed by Ben Skeggs
parent 6e9cbb40d2
commit 6d60792ec0

View file

@ -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;
}
/**