Skip to content

Commit

Permalink
drm/radeon/kms: Fix radeon_gem_busy_ioctl harder.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Aug 23, 2009
1 parent 3edf2fb commit 9f844e5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/gpu/drm/radeon/radeon_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f844e5

Please sign in to comment.