diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 8e2b556f0b7b..06b6fa35db99 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -37,6 +37,8 @@  #define AMDGPU_BO_INVALID_OFFSET	LONG_MAX  #define AMDGPU_BO_MAX_PLACEMENTS	3 +#define to_amdgpu_bo_user(abo) container_of((abo), struct amdgpu_bo_user, bo) +  struct amdgpu_bo_param {  	unsigned long			size;  	int				byte_align; @@ -112,6 +114,15 @@ struct amdgpu_bo {  	struct kgd_mem                  *kfd_bo;  }; +struct amdgpu_bo_user { +	struct amdgpu_bo		bo; +	u64				tiling_flags; +	u64				metadata_flags; +	void				*metadata; +	u32				metadata_size; + +}; +  static inline struct amdgpu_bo *ttm_to_amdgpu_bo(struct ttm_buffer_object *tbo)  {  	return container_of(tbo, struct amdgpu_bo, tbo); @@ -255,6 +266,9 @@ int amdgpu_bo_create_kernel(struct amdgpu_device *adev,  int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev,  			       uint64_t offset, uint64_t size, uint32_t domain,  			       struct amdgpu_bo **bo_ptr, void **cpu_addr); +int amdgpu_bo_create_user(struct amdgpu_device *adev, +			  struct amdgpu_bo_param *bp, +			  struct amdgpu_bo_user **ubo_ptr);  void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,  			   void **cpu_addr);  int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr); | 
