aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1414-drm-amdgpu-Report-FB-as-private-if-BAR-is-above-40bi.patch
blob: 16b02e3288b62de159be3bad2e017674d8411fd4 (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
35
36
37
38
39
40
41
From a152b2ba3a9e60522d7cb58591b04ca1d439220f Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Sat, 9 Apr 2016 18:12:18 -0400
Subject: [PATCH 1414/4131] drm/amdgpu: Report FB as private if BAR is above
 40bit

When the BAR is above 40bit, the framebuffer is not peer-accessible
(although it is still CPU accessible). For HSA purposes, report
FB memory as private in this case.

Change-Id: Ia8d5d5d7e258d5008daab13b3992c9065c712ec0
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>

 Conflicts:
	drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 47397b6..62e7145 100755
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -371,11 +371,11 @@ void get_local_mem_info(struct kgd_dev *kgd,
 		mem_info->local_mem_size_public = adev->mc.visible_vram_size;
 		mem_info->local_mem_size_private = adev->mc.real_vram_size -
 				adev->mc.visible_vram_size;
-		mem_info->vram_width = adev->mc.vram_width;
 	} else {
-		pr_err("amdgpu: vram aperture is out of 40bit address base: 0x%llx limit 0x%llx\n",
-				adev->mc.aper_base, aper_limit);
+		mem_info->local_mem_size_public = 0;
+		mem_info->local_mem_size_private = adev->mc.real_vram_size;
 	}
+	mem_info->vram_width = adev->mc.vram_width;
 
 	pr_debug("amdgpu: address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
 			adev->mc.aper_base, aper_limit,
-- 
2.7.4