winsys/svga: Optionally avoid caching buffer maps
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 22 Apr 2020 13:03:15 +0000 (15:03 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 13:45:12 +0000 (13:45 +0000)
commit298e247776309b4444b4c3ac26872fc1f694568c
treea7364cc117b3b200bf85411fad272981ca9b39ea
parent422148de52fc57f9f33e632883400fff49b3ad9d
winsys/svga: Optionally avoid caching buffer maps

Mapping of graphics kernel buffers is quite costly. Therefore the svga
drm winsys caches all kernel buffer maps. However, that may lead to
less testing coverage of the unmap paths and (possibly) processes running
out of virtual memory space. Introduce a possibility to avoid that caching
by setting the environment variable SVGA_FORCE_KERNEL_UNMAPS to 1.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Matthew McClure <mcclurem@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4804>
src/gallium/winsys/svga/drm/vmw_buffer.c
src/gallium/winsys/svga/drm/vmw_screen.c
src/gallium/winsys/svga/drm/vmw_screen.h
src/gallium/winsys/svga/drm/vmw_screen_ioctl.c