diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-01-16 10:05:04 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-25 01:04:30 -0500 |
commit | 0eaddb28d3460f13102cd82cf58af875bfb1bd53 (patch) | |
tree | 5fe3e9f8c1e7d6c5c1fd2c2bf445a3d7cc9d33e2 | |
parent | 9299795c6e1e11b2d1e6f53a03902dc80cfb3320 (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 8 |
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, | |||
943 | ttm_flag_masked(&cur_flags, placement->busy_placement[i], | 943 | ttm_flag_masked(&cur_flags, placement->busy_placement[i], |
944 | ~TTM_PL_MASK_MEMTYPE); | 944 | ~TTM_PL_MASK_MEMTYPE); |
945 | 945 | ||
946 | |||
947 | if (mem_type == TTM_PL_SYSTEM) { | ||
948 | mem->mem_type = mem_type; | ||
949 | mem->placement = cur_flags; | ||
950 | mem->mm_node = NULL; | ||
951 | return 0; | ||
952 | } | ||
953 | |||
946 | ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem, | 954 | ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem, |
947 | interruptible, no_wait); | 955 | interruptible, no_wait); |
948 | if (ret == 0 && mem->mm_node) { | 956 | if (ret == 0 && mem->mm_node) { |