winsys/svga: Rework buffer allocation to make it more robust v2.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Oct 2011 13:27:10 +0000 (15:27 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 14 Oct 2011 07:53:19 +0000 (09:53 +0200)
commit5dddeb7776c62b6218add3a236551cde876b1cf0
tree0b1e4779aa633b397e87f50e465542c8f56d7ea7
parent83d57635bc7b8f837add26322da04e3d93da2c55
winsys/svga: Rework buffer allocation to make it more robust v2.

Don't allow any "CPU" buffers to be allocated by the pb_fenced
buffer manager, since we can't protect against failures during
buffer validation.
Also, add an extra slab buffer manager to allocate buffers from
the kernel if there is a failure to allocate from our big buffer pool.
The reason we use a slab manager for this, is to avoid allocating
many very small buffers from the kernel.

v2: Increased VMW_MAX_BUFFER_SIZE and fixed some comments.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/winsys/svga/drm/vmw_screen.h
src/gallium/winsys/svga/drm/vmw_screen_pools.c
src/gallium/winsys/svga/drm/vmw_screen_svga.c