Skip to content

Commit 6d60792

Browse files
imirkinBen Skeggs
authored andcommitted
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
1 parent 6e9cbb4 commit 6d60792

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • drivers/gpu/drm/nouveau/core/subdev/bios

‎drivers/gpu/drm/nouveau/core/subdev/bios/init.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,11 @@ init_jump(struct nvbios_init *init)
12941294
u16 offset = nv_ro16(bios, init->offset + 1);
12951295

12961296
trace("JUMP\t0x%04x\n", offset);
1297-
init->offset = offset;
1297+
1298+
if (init_exec(init))
1299+
init->offset = offset;
1300+
else
1301+
init->offset += 3;
12981302
}
12991303

13001304
/**

0 commit comments

Comments
 (0)