diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-01-05 20:07:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-15 15:28:51 -0800 |
commit | e45410185006f748b0d48292550cfad2e37f47a5 (patch) | |
tree | aa0f42132065cde094887c2bdc715d16c0fb7dfa /drivers/gpu/drm/nouveau/core | |
parent | b251b2f4a378b977f7d203e6a269b2fe28af3330 (diff) | |
download | linux-stable-e45410185006f748b0d48292550cfad2e37f47a5.tar.gz linux-stable-e45410185006f748b0d48292550cfad2e37f47a5.tar.bz2 linux-stable-e45410185006f748b0d48292550cfad2e37f47a5.zip |
drm/nouveau/bios: make jump conditional
commit 6d60792ec059d9f2139828f9f017679abb81aa73 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index e2d7f38447cc..3044b07230db 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c @@ -1295,7 +1295,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; } /** |