drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 8 Jan 2016 19:29:40 +0000 (20:29 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Jan 2016 21:56:46 +0000 (07:56 +1000)
commita50e2bf5a0f674d62b69f51f6935a30e82bd015c
tree737174e2d86df23c3efe57285e338011c9455e64
parentfb89ac5102ae2875d685c847e6b5dbc141622d43
drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates

When the framebuffer is a vmwgfx dma buffer and a proxy surface is
created, the vmw_kms_update_proxy() function requires that the proxy
surface width and the framebuffer pitch are compatible, otherwise
display corruption occurs as seen in gnome-shell/native with software
3D. Since the framebuffer pitch is determined by user-space, allocate
a proxy surface the width of which is based on the framebuffer pitch
rather than on the framebuffer width.

Cc: <stable@vger.kernel.org>
Reported-by: Raphael Hertzog <buxy@kali.org>
Tested-by: Mati Aharoni <muts@kali.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c