summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_gem.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-03-02 03:56:19 +0400
committerChristian König <christian.koenig@amd.com>2014-03-03 13:57:10 +0400
commit0bc490a8d9e0f2f54ec8f9d09a367db66605ff40 (patch)
tree21caea90e3d27d1882f2ec7b8bbc94d28be9587d /drivers/gpu/drm/radeon/radeon_gem.c
parent67e8e3f970ad747d3c854fb40f8ec0cecedd9089 (diff)
downloadlinux-0bc490a8d9e0f2f54ec8f9d09a367db66605ff40.tar.xz
drm/radeon: deduplicate code in radeon_gem_busy_ioctl
Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gem.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gem.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index 9863ca742494..d09650c1d720 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -344,18 +344,7 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
}
robj = gem_to_radeon_bo(gobj);
r = radeon_bo_wait(robj, &cur_placement, true);
- switch (cur_placement) {
- case TTM_PL_VRAM:
- args->domain = RADEON_GEM_DOMAIN_VRAM;
- break;
- case TTM_PL_TT:
- args->domain = RADEON_GEM_DOMAIN_GTT;
- break;
- case TTM_PL_SYSTEM:
- args->domain = RADEON_GEM_DOMAIN_CPU;
- default:
- break;
- }
+ args->domain = radeon_mem_type_to_domain(cur_placement);
drm_gem_object_unreference_unlocked(gobj);
r = radeon_gem_handle_lockup(rdev, r);
return r;