summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-24 12:48:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-24 12:48:41 -0700
commit0257a0c0c1997aac28420e784b3ef8f3ce17f093 (patch)
tree043bef9438fffdbdafe84b67211df6b67f4f0c18 /drivers
parente40c9056db75e093e6d99d2c14510cb131eb482a (diff)
parent9f844e5118d1627025c8ea7cfc0ea69038ea63fd (diff)
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: Fix radeon_gem_busy_ioctl harder.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gem.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index 14c199802920..d880edf254db 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -274,12 +274,18 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
}
robj = gobj->driver_private;
r = radeon_object_busy_domain(robj, &cur_placement);
- if (cur_placement == TTM_PL_VRAM)
+ switch (cur_placement) {
+ case TTM_PL_VRAM:
args->domain = RADEON_GEM_DOMAIN_VRAM;
- if (cur_placement == TTM_PL_FLAG_TT)
+ break;
+ case TTM_PL_TT:
args->domain = RADEON_GEM_DOMAIN_GTT;
- if (cur_placement == TTM_PL_FLAG_SYSTEM)
+ break;
+ case TTM_PL_SYSTEM:
args->domain = RADEON_GEM_DOMAIN_CPU;
+ default:
+ break;
+ }
mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(gobj);
mutex_unlock(&dev->struct_mutex);