summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-01-16 16:05:04 +0100
committerDave Airlie <airlied@redhat.com>2010-01-25 16:04:30 +1000
commit0eaddb28d3460f13102cd82cf58af875bfb1bd53 (patch)
tree5fe3e9f8c1e7d6c5c1fd2c2bf445a3d7cc9d33e2 /drivers
parent9299795c6e1e11b2d1e6f53a03902dc80cfb3320 (diff)
downloadlinux-0eaddb28d3460f13102cd82cf58af875bfb1bd53.tar.gz
linux-0eaddb28d3460f13102cd82cf58af875bfb1bd53.tar.bz2
linux-0eaddb28d3460f13102cd82cf58af875bfb1bd53.zip
drm/ttm: Allow system memory as a busy placement.
This is needed to fix a vmwgfx memory usage bug. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 8036b6e189ee..1a3e909b7bba 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -943,6 +943,14 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
ttm_flag_masked(&cur_flags, placement->busy_placement[i],
~TTM_PL_MASK_MEMTYPE);
+
+ if (mem_type == TTM_PL_SYSTEM) {
+ mem->mem_type = mem_type;
+ mem->placement = cur_flags;
+ mem->mm_node = NULL;
+ return 0;
+ }
+
ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem,
interruptible, no_wait);
if (ret == 0 && mem->mm_node) {