Skip to content
Snippets Groups Projects
Commit 64e257f1 authored by Christian König's avatar Christian König
Browse files

drm/nouveau: audit bo->resource usage


Make sure we can at least move and release BOs without backing store.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220707102453.3633-4-christian.koenig@amd.com
parent 63af82cf
No related branches found
No related tags found
No related merge requests found
......@@ -1008,7 +1008,8 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict,
}
/* Fake bo copy. */
if (old_reg->mem_type == TTM_PL_SYSTEM && !bo->ttm) {
if (!old_reg || (old_reg->mem_type == TTM_PL_SYSTEM &&
!bo->ttm)) {
ttm_bo_move_null(bo, new_reg);
goto out;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment