diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-08-22 11:38:23 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-22 21:36:13 -0400 |
commit | 9f844e5118d1627025c8ea7cfc0ea69038ea63fd (patch) | |
tree | b11958af81718ad7325eec37fc9f1378a078bc99 /drivers | |
parent | 3edf2fb9d80a46d6c32ba12547a42419845b4b76 (diff) |
drm/radeon/kms: Fix radeon_gem_busy_ioctl harder.
It was mixing up TTM placement values and flags.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-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); |