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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:18 +0000 (15:07 -0800)
commit15ec2c4c10888f6403686be687e79165307e7e92
tree533abaf2b16ed32c29916a113d129026070e4c7f
parenta4de54fb20e68c235ab7bebf521873b724816c93
drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates

commit a50e2bf5a0f674d62b69f51f6935a30e82bd015c upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c