From 5558c93c72214e691aeac59ecfa59fa8b4d6e52e Mon Sep 17 00:00:00 2001 From: Roger He Date: Fri, 14 Jul 2017 12:41:13 +0800 Subject: [PATCH 0810/4131] drm/amd/amdgpu: add DGMA support in amdgpu_bo_gpu_accessible Change-Id: I38ed6d3ab679979f6ce648f3c21ba49335078949 Reviewed-by: Flora Cui Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 78eacc3..36f2133 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -181,7 +181,12 @@ static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo) { switch (bo->tbo.mem.mem_type) { case TTM_PL_TT: return amdgpu_ttm_is_bound(bo->tbo.ttm); - case TTM_PL_VRAM: return true; + + case TTM_PL_VRAM: + case AMDGPU_PL_DGMA: + case AMDGPU_PL_DGMA_IMPORT: + return true; + default: return false; } } -- 2.7.4