drm/vmwgfx: Optimize memory footprint for DMA buffers.
authorThomas Hellstrom <thellstrom@vmware.com>
Sat, 16 Jan 2010 15:05:05 +0000 (16:05 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 25 Jan 2010 06:04:39 +0000 (16:04 +1000)
commit0d551f32fbcfbd3c2b2196ec1c87d77d2ec61861
tree7e5433d4d03d753a152a9e1eec5c6e4c6958709a
parenta80a2f94628ebc2b6463bfff0f722fb824495405
drm/vmwgfx: Optimize memory footprint for DMA buffers.

Use VRAM whenever there is free space for DMA buffers,
but use system GMR memory if using VRAM would cause an eviction.

This significantly reduces the guest system memory usage for
VMs with a large amount of VRAM allocated.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c