summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
diff options
context:
space:
mode:
authorThomas Hellstrom2010-01-16 16:05:05 +0100
committerDave Airlie2010-01-25 07:04:39 +0100
commit8ba5152a3acd5914cade42a1c8c9dc58ad8d1a89 (patch)
tree7e5433d4d03d753a152a9e1eec5c6e4c6958709a /drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
parentdrm/ttm: Allow system memory as a busy placement. (diff)
downloadkernel-qcow2-linux-8ba5152a3acd5914cade42a1c8c9dc58ad8d1a89.tar.gz
kernel-qcow2-linux-8ba5152a3acd5914cade42a1c8c9dc58ad8d1a89.tar.xz
kernel-qcow2-linux-8ba5152a3acd5914cade42a1c8c9dc58ad8d1a89.zip
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index e0878077e8aa..e01db120efff 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -872,7 +872,7 @@ int vmw_dmabuf_alloc_ioctl(struct drm_device *dev, void *data,
}
ret = vmw_dmabuf_init(dev_priv, &vmw_user_bo->dma, req->size,
- &vmw_vram_placement, true,
+ &vmw_vram_sys_placement, true,
&vmw_user_dmabuf_destroy);
if (unlikely(ret != 0))
return ret;