diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-08-22 17:38:23 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-23 11:36:13 +1000 |
commit | 9f844e5118d1627025c8ea7cfc0ea69038ea63fd (patch) | |
tree | b11958af81718ad7325eec37fc9f1378a078bc99 | |
parent | 3edf2fb9d80a46d6c32ba12547a42419845b4b76 (diff) | |
download | blackbird-op-linux-9f844e5118d1627025c8ea7cfc0ea69038ea63fd.tar.gz blackbird-op-linux-9f844e5118d1627025c8ea7cfc0ea69038ea63fd.zip |
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>
-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, } 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); |