diff options
author | Andres Rodriguez <andresx7@gmail.com> | 2017-09-16 04:05:19 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-09 23:30:19 +0300 |
commit | b82485fd384a56c27fae44e649552eca6334237a (patch) | |
tree | e76d630f2fe71fa5a435f7abb0e45f0ac005ba7e /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
parent | 9fc8fc709b356c85034cbcb3b84c9d8b77865f52 (diff) | |
download | linux-b82485fd384a56c27fae44e649552eca6334237a.tar.xz |
drm/amdgpu: add helper to convert a ttm bo to amdgpu_bo
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 39b6bf6fb051..c26ef53604af 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -94,6 +94,11 @@ struct amdgpu_bo { }; }; +static inline struct amdgpu_bo *ttm_to_amdgpu_bo(struct ttm_buffer_object *tbo) +{ + return container_of(tbo, struct amdgpu_bo, tbo); +} + /** * amdgpu_mem_type_to_domain - return domain corresponding to mem_type * @mem_type: ttm memory type |