diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 13 |
1 files changed, 13 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..428aae048f4b 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 |
@@ -188,6 +193,14 @@ static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo) | |||
188 | } | 193 | } |
189 | } | 194 | } |
190 | 195 | ||
196 | /** | ||
197 | * amdgpu_bo_explicit_sync - return whether the bo is explicitly synced | ||
198 | */ | ||
199 | static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo) | ||
200 | { | ||
201 | return bo->flags & AMDGPU_GEM_CREATE_EXPLICIT_SYNC; | ||
202 | } | ||
203 | |||
191 | int amdgpu_bo_create(struct amdgpu_device *adev, | 204 | int amdgpu_bo_create(struct amdgpu_device *adev, |
192 | unsigned long size, int byte_align, | 205 | unsigned long size, int byte_align, |
193 | bool kernel, u32 domain, u64 flags, | 206 | bool kernel, u32 domain, u64 flags, |