Commit 0eaddb28 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie

drm/ttm: Allow system memory as a busy placement.

This is needed to fix a vmwgfx memory usage bug.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9299795c
...@@ -943,6 +943,14 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, ...@@ -943,6 +943,14 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
ttm_flag_masked(&cur_flags, placement->busy_placement[i], ttm_flag_masked(&cur_flags, placement->busy_placement[i],
~TTM_PL_MASK_MEMTYPE); ~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, ret = ttm_bo_mem_force_space(bo, mem_type, placement, mem,
interruptible, no_wait); interruptible, no_wait);
if (ret == 0 && mem->mm_node) { if (ret == 0 && mem->mm_node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment