From: Ben Skeggs Date: Tue, 7 May 2013 05:54:13 +0000 (+1000) Subject: drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcode X-Git-Tag: Ubuntu-5.2.0-15.16~15631^2~1^2~8 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=46b47b8a7d9223b12ddcabf1f3fc6e753e2d84a1;p=mirror_ubuntu-eoan-kernel.git drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcode Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index c300b5e7b670..c434d398d16f 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c @@ -1940,8 +1940,8 @@ init_zm_mask_add(struct nvbios_init *init) trace("ZM_MASK_ADD\tR[0x%06x] &= 0x%08x += 0x%08x\n", addr, mask, add); init->offset += 13; - data = init_rd32(init, addr) & mask; - data |= ((data + add) & ~mask); + data = init_rd32(init, addr); + data = (data & mask) | ((data + add) & ~mask); init_wr32(init, addr, data); }