Commit d59bc632 authored by Christian König's avatar Christian König

drm/ttm: fix pipelined gutting for evictions v2

We can't pipeline that during eviction because the memory needs
to be available immediately.

v2: fix how we cleanup the BOs resources
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Tested-by: default avatarAlex Sierra <alex.sierra@amd.com>
Link: https://patchwork.freedesktop.org/patch/379039/
parent 7427a7a0
......@@ -652,8 +652,12 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo,
placement.num_busy_placement = 0;
bdev->driver->evict_flags(bo, &placement);
if (!placement.num_placement && !placement.num_busy_placement)
return ttm_bo_pipeline_gutting(bo);
if (!placement.num_placement && !placement.num_busy_placement) {
ttm_bo_wait(bo, false, false);
ttm_bo_cleanup_memtype_use(bo);
return 0;
}
evict_mem = bo->mem;
evict_mem.mm_node = NULL;
......
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