drm/radeon: use GEM references instead of TTMs
Instead of a TTM reference grab a GEM reference whenever necessary. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
dee44a7cb5
commit
fd69ef0502
2 changed files with 3 additions and 6 deletions
|
@ -88,7 +88,7 @@ static void radeon_gem_object_free(struct drm_gem_object *gobj)
|
|||
|
||||
if (robj) {
|
||||
radeon_mn_unregister(robj);
|
||||
radeon_bo_unref(&robj);
|
||||
ttm_bo_put(&robj->tbo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -256,18 +256,15 @@ struct radeon_bo *radeon_bo_ref(struct radeon_bo *bo)
|
|||
if (bo == NULL)
|
||||
return NULL;
|
||||
|
||||
ttm_bo_get(&bo->tbo);
|
||||
drm_gem_object_get(&bo->tbo.base);
|
||||
return bo;
|
||||
}
|
||||
|
||||
void radeon_bo_unref(struct radeon_bo **bo)
|
||||
{
|
||||
struct ttm_buffer_object *tbo;
|
||||
|
||||
if ((*bo) == NULL)
|
||||
return;
|
||||
tbo = &((*bo)->tbo);
|
||||
ttm_bo_put(tbo);
|
||||
drm_gem_object_put(&(*bo)->tbo.base);
|
||||
*bo = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue