aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1431-drm-amdgpu-Implement-get_cu_info-for-Hawaii.patch
blob: e3c9ecff503537eb040f144f3baf11759e9bc5ab (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 545af2b28ee94a7c98d191e86c829c8a2f6d9b65 Mon Sep 17 00:00:00 2001
From: Lan Xiao <Lan.Xiao@amd.com>
Date: Mon, 16 May 2016 15:59:53 -0400
Subject: [PATCH 1431/4131] drm/amdgpu: Implement get_cu_info for Hawaii

fix the problem LDS segment is 0

BUG:KFD-240
Change-Id: I94b3b982851360ee5b3790e6e155f6d0ae3a64dc
Signed-off-by: Lan Xiao <Lan.Xiao@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 5eb44f7..28e22f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -5251,11 +5251,18 @@ static void gfx_v7_0_get_cu_info(struct amdgpu_device *adev)
 	cu_info->number = active_cu_number;
 	cu_info->ao_cu_mask = ao_cu_mask;
 	cu_info->simd_per_cu = NUM_SIMD_PER_CU;
-	if (adev->asic_type == CHIP_KAVERI) {
+	switch (adev->asic_type) {
+	case CHIP_KAVERI:
+	case CHIP_HAWAII:
 		cu_info->max_waves_per_simd = 10;
 		cu_info->max_scratch_slots_per_cu = 32;
 		cu_info->wave_front_size = 64;
 		cu_info->lds_size = 64;
+		break;
+	default:
+		dev_warn(adev->dev, "CU info asic_type [0x%x] not supported\n",
+				adev->asic_type);
+		break;
 	}
 }
 
-- 
2.7.4