From: Ilia Mirkin Date: Mon, 6 Jan 2014 01:07:02 +0000 (-0500) Subject: drm/nouveau/bios: make jump conditional X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d60792ec059d9f2139828f9f017679abb81aa73;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Ilia Mirkin Cc: stable@vger.kernel.org --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index 420908cb82b6..9f5b81e99731 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c @@ -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; } /**