drm/vmwgfx: fix update of display surface when resolution changes
authorRoland Scheidegger <sroland@vmware.com>
Thu, 9 Jul 2020 16:54:14 +0000 (18:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:26 +0000 (09:34 +0200)
commit6d03387205bde13c0a68ed97e1fe7e5f6741e070
tree20ae5ead9c49bdf63048deba4cd7df33c8e0ae71
parent59f56744e6023e8f17f0efda698eb5c58598ecdc
drm/vmwgfx: fix update of display surface when resolution changes

commit 1f054fd26e29784d373c3d29c348ee48f1c41fb2 upstream.

The assignment of metadata overwrote the new display resolution values,
hence we'd miss the size actually changed and wouldn't redefine the
surface. This would then lead to command buffer error when trying to
update the screen target (due to the size mismatch), and result in a
VM with black screen.

Fixes: 504901dbb0b5 ("drm/vmwgfx: Refactor surface_define to use vmw_surface_metadata")
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c