aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index 4306b2f2c8f0..15a723adca76 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -114,6 +114,15 @@ static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo)
114 return drm_vma_node_offset_addr(&bo->tbo.vma_node); 114 return drm_vma_node_offset_addr(&bo->tbo.vma_node);
115} 115}
116 116
117/**
118 * amdgpu_bo_gpu_accessible - return whether the bo is currently in memory that
119 * is accessible to the GPU.
120 */
121static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo)
122{
123 return bo->tbo.mem.mem_type != TTM_PL_SYSTEM;
124}
125
117int amdgpu_bo_create(struct amdgpu_device *adev, 126int amdgpu_bo_create(struct amdgpu_device *adev,
118 unsigned long size, int byte_align, 127 unsigned long size, int byte_align,
119 bool kernel, u32 domain, u64 flags, 128 bool kernel, u32 domain, u64 flags,