svga/winsys: Propagate surface shared information to the winsys
authorThomas Hellstrom <thellstrom@vmware.com>
Sat, 8 Feb 2014 17:51:15 +0000 (09:51 -0800)
committerBrian Paul <brianp@vmware.com>
Fri, 14 Feb 2014 15:21:44 +0000 (08:21 -0700)
commit141e39a8936a7b19fd857a35ea2d200daf1777c7
treefac992f450ba785d7e3c285a841ea113aae1e2bf
parentfe6a854477c2ed30c37c200668a4dc86512120f7
svga/winsys: Propagate surface shared information to the winsys

The linux winsys needs to know whether a surface is shared.
For guest-backed surfaces we need this information to avoid allocating a
mob out of the mob cache for shared surfaces, but instead allocate a shared
mob, that is never put in the mob cache, from the kernel.

Also previously, all surfaces were given the "shareable" attribute when
allocated from the kernel. This is too permissive for client-local surfaces.
Now that we have the needed info, only set the "shareable" attribute if the
client indicates that it needs to share the surface.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/svga/svga_screen_cache.c
src/gallium/drivers/svga/svga_winsys.h
src/gallium/winsys/svga/drm/vmw_screen.h
src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
src/gallium/winsys/svga/drm/vmw_screen_svga.c