diff options
author | Andres Rodriguez <andresx7@gmail.com> | 2017-09-15 21:05:19 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-09 16:30:19 -0400 |
commit | b82485fd384a56c27fae44e649552eca6334237a (patch) | |
tree | e76d630f2fe71fa5a435f7abb0e45f0ac005ba7e /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
parent | 9fc8fc709b356c85034cbcb3b84c9d8b77865f52 (diff) |
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 { | |||
94 | }; | 94 | }; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static inline struct amdgpu_bo *ttm_to_amdgpu_bo(struct ttm_buffer_object *tbo) | ||
98 | { | ||
99 | return container_of(tbo, struct amdgpu_bo, tbo); | ||
100 | } | ||
101 | |||
97 | /** | 102 | /** |
98 | * amdgpu_mem_type_to_domain - return domain corresponding to mem_type | 103 | * amdgpu_mem_type_to_domain - return domain corresponding to mem_type |
99 | * @mem_type: ttm memory type | 104 | * @mem_type: ttm memory type |