winsys/svga: fix display corruption after surface_init
authorCharmaine Lee <charmainel@vmware.com>
Thu, 20 Aug 2020 23:43:00 +0000 (16:43 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 18:04:44 +0000 (18:04 +0000)
commitf41848a9df3c6eb81059edfd63347584790e0a3a
tree43ef1d03dce53f3bd1783eab6a099b7b8b240984
parent090239ea6b7fee79643960cbc361e4ec577c7be9
winsys/svga: fix display corruption after surface_init

When we initialize the buffer surface, do not map the existing storage
with DONTBLOCK, leave it as a synchronized map.
This patch also sets the surface rebind flag after it is bound to a
new buffer and sets the surface buffer pointer accordingly.

This fixes display corruption issue seen with running steam.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6415>
src/gallium/drivers/svga/svga_resource_buffer_upload.c
src/gallium/winsys/svga/drm/vmw_surface.c