aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-24 15:48:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-24 15:48:41 -0400
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,
274 } 274 }
275 robj = gobj->driver_private; 275 robj = gobj->driver_private;
276 r = radeon_object_busy_domain(robj, &cur_placement); 276 r = radeon_object_busy_domain(robj, &cur_placement);
277 if (cur_placement == TTM_PL_VRAM) 277 switch (cur_placement) {
278 case TTM_PL_VRAM:
278 args->domain = RADEON_GEM_DOMAIN_VRAM; 279 args->domain = RADEON_GEM_DOMAIN_VRAM;
279 if (cur_placement == TTM_PL_FLAG_TT) 280 break;
281 case TTM_PL_TT:
280 args->domain = RADEON_GEM_DOMAIN_GTT; 282 args->domain = RADEON_GEM_DOMAIN_GTT;
281 if (cur_placement == TTM_PL_FLAG_SYSTEM) 283 break;
284 case TTM_PL_SYSTEM:
282 args->domain = RADEON_GEM_DOMAIN_CPU; 285 args->domain = RADEON_GEM_DOMAIN_CPU;
286 default:
287 break;
288 }
283 mutex_lock(&dev->struct_mutex); 289 mutex_lock(&dev->struct_mutex);
284 drm_gem_object_unreference(gobj); 290 drm_gem_object_unreference(gobj);
285 mutex_unlock(&dev->struct_mutex); 291 mutex_unlock(&dev->struct_mutex);