Skip to content

Commit

Permalink
drm/nouveau/bios: make jump conditional
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ilia Mirkin authored and Ben Skeggs committed Jan 7, 2014
1 parent 6e9cbb4 commit 6d60792
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/bios/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 6d60792

Please sign in to comment.