diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 12 |
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); |