diff options
author | Christian König <christian.koenig@amd.com> | 2014-07-30 23:04:56 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-08-05 16:53:53 +0400 |
commit | 512d8afc5d971be1e32596c6ad0a68abe1373cd9 (patch) | |
tree | fe085959774760c7b808b176289416b5c8009905 /drivers/gpu/drm/radeon/radeon_object.c | |
parent | e7e31600d3e2f8b7726b0521149fc55c62a90467 (diff) | |
download | linux-512d8afc5d971be1e32596c6ad0a68abe1373cd9.tar.xz |
drm/radeon: add radeon_bo_ref function
To be consistent with radeon_bo_unref, needed in the following patch.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 9505766e46dd..480c87d8edc5 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -236,6 +236,15 @@ void radeon_bo_kunmap(struct radeon_bo *bo) ttm_bo_kunmap(&bo->kmap); } +struct radeon_bo *radeon_bo_ref(struct radeon_bo *bo) +{ + if (bo == NULL) + return NULL; + + ttm_bo_reference(&bo->tbo); + return bo; +} + void radeon_bo_unref(struct radeon_bo **bo) { struct ttm_buffer_object *tbo; |