mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
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>
This commit is contained in:
parent
e7e31600d3
commit
512d8afc5d
@ -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;
|
||||
|
@ -129,6 +129,7 @@ extern int radeon_bo_create(struct radeon_device *rdev,
|
||||
struct radeon_bo **bo_ptr);
|
||||
extern int radeon_bo_kmap(struct radeon_bo *bo, void **ptr);
|
||||
extern void radeon_bo_kunmap(struct radeon_bo *bo);
|
||||
extern struct radeon_bo *radeon_bo_ref(struct radeon_bo *bo);
|
||||
extern void radeon_bo_unref(struct radeon_bo **bo);
|
||||
extern int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr);
|
||||
extern int radeon_bo_pin_restricted(struct radeon_bo *bo, u32 domain,
|
||||
|
Loading…
Reference in New Issue
Block a user