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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index 382485115b06..833b172a2c2a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -120,7 +120,11 @@ static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo)
120 */ 120 */
121static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo) 121static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo)
122{ 122{
123 return bo->tbo.mem.mem_type != TTM_PL_SYSTEM; 123 switch (bo->tbo.mem.mem_type) {
124 case TTM_PL_TT: return amdgpu_ttm_is_bound(bo->tbo.ttm);
125 case TTM_PL_VRAM: return true;
126 default: return false;
127 }
124} 128}
125 129
126int amdgpu_bo_create(struct amdgpu_device *adev, 130int amdgpu_bo_create(struct amdgpu_device *adev,