Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82dee241 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: drop the backing store when DMA-buf imports are evicted



Instead of moving this to the SYSTEM domain just drop the backing store
and let the resulting allocation be freed.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarRoger He <Hongbo.He@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 536bbeba
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -204,6 +204,12 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo,
		.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM
	};

	if (bo->type == ttm_bo_type_sg) {
		placement->num_placement = 0;
		placement->num_busy_placement = 0;
		return;
	}

	if (!amdgpu_ttm_bo_is_amdgpu_bo(bo)) {
		placement->placement = &placements;
		placement->busy_placement = &placements;