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

Commit 9270eb1b authored by Dave Airlie's avatar Dave Airlie
Browse files

drm/radeon/kms: only evict to GTT if CP is ready



Testing GTT ready might be more correct but cp.ready
works fine and has been tested on irc by 2-3 ppl.

fixes bug k.org 15035 and fd.o 25733

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 11f3b59e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -215,6 +215,9 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
	rbo = container_of(bo, struct radeon_bo, tbo);
	switch (bo->mem.mem_type) {
	case TTM_PL_VRAM:
		if (rbo->rdev->cp.ready == false)
			radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_CPU);
		else
			radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_GTT);
		break;
	case TTM_PL_TT: