summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-01-13 00:21:49 +0100
committerDave Airlie <airlied@redhat.com>2010-01-13 04:25:14 +0100
commit9270eb1b496cb002d75f49ef82c9ef4cbd22a5a0 (patch)
tree10ad9294e12834b7ff4ea9d91ea5e0bc73744c55 /drivers/gpu
parentdrm/radeon/kms: Fix crash getting TV info with no BIOS. (diff)
downloadlinux-9270eb1b496cb002d75f49ef82c9ef4cbd22a5a0.tar.xz
linux-9270eb1b496cb002d75f49ef82c9ef4cbd22a5a0.zip
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: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index a00450743d60..db820ae9a034 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -215,7 +215,10 @@ 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:
- radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_GTT);
+ 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:
default: