Commit 9f844e51 authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie

drm/radeon/kms: Fix radeon_gem_busy_ioctl harder.

It was mixing up TTM placement values and flags.
Signed-off-by: default avatarMichel Dänzer <daenzer@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3edf2fb9
...@@ -274,12 +274,18 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data, ...@@ -274,12 +274,18 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
} }
robj = gobj->driver_private; robj = gobj->driver_private;
r = radeon_object_busy_domain(robj, &cur_placement); 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; args->domain = RADEON_GEM_DOMAIN_VRAM;
if (cur_placement == TTM_PL_FLAG_TT) break;
case TTM_PL_TT:
args->domain = RADEON_GEM_DOMAIN_GTT; args->domain = RADEON_GEM_DOMAIN_GTT;
if (cur_placement == TTM_PL_FLAG_SYSTEM) break;
case TTM_PL_SYSTEM:
args->domain = RADEON_GEM_DOMAIN_CPU; args->domain = RADEON_GEM_DOMAIN_CPU;
default:
break;
}
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(gobj); drm_gem_object_unreference(gobj);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment