aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/0810-drm-amd-amdgpu-add-DGMA-support-in-amdgpu_bo_gpu_acc.patch
blob: 64658cc518a430d14e08ec3e573896443bf8357c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 5558c93c72214e691aeac59ecfa59fa8b4d6e52e Mon Sep 17 00:00:00 2001
From: Roger He <Hongbo.He@amd.com>
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 <Flora.Cui@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
---
 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