[PATCH 23/37] drm/amdkfd: Fixup incorrect info in the CZ CRAT table

Felix Kuehling Felix.Kuehling at amd.com
Sat Dec 9 04:09:01 UTC 2017


From: Philip Cox <Philip.Cox at amd.com>

* Wrong value for max_waves_per_simd
* Missing ATC capability bit

Signed-off-by: Philip Cox <Philip.Cox at amd.com>
Signed-off-by: Kent Russell <kent.russell at amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 52d20f5..80bc71d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1229,12 +1229,15 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
 	/* Fix errors in CZ CRAT.
 	 * simd_count: Carrizo CRAT reports wrong simd_count, probably
 	 *		because it doesn't consider masked out CUs
-	 * capability flag: Carrizo CRAT doesn't report IOMMU
-	 *		flags. TODO: Fix this.
+	 * max_waves_per_simd: Carrizo reports wrong max_waves_per_simd
+	 * capability flag: Carrizo CRAT doesn't report IOMMU flags
 	 */
-	if (dev->gpu->device_info->asic_family == CHIP_CARRIZO)
+	if (dev->gpu->device_info->asic_family == CHIP_CARRIZO) {
 		dev->node_props.simd_count =
 			cu_info.simd_per_cu * cu_info.cu_active_number;
+		dev->node_props.max_waves_per_simd = 10;
+		dev->node_props.capability |= HSA_CAP_ATS_PRESENT;
+	}
 
 	kfd_debug_print_topology();
 
-- 
2.7.4



More information about the amd-gfx mailing list