aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch
new file mode 100644
index 00000000..74af7228
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3415-drm-amdkfd-Update-number-of-compute-unit-from-KGD.patch
@@ -0,0 +1,58 @@
+From 4dfa91d8d23f49fa4955544a2e3024d8c35a7418 Mon Sep 17 00:00:00 2001
+From: Flora Cui <flora.cui@amd.com>
+Date: Fri, 8 Dec 2017 23:08:46 -0500
+Subject: [PATCH 3415/4131] drm/amdkfd: Update number of compute unit from KGD
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Overwrite the active simd_count from KGD at driver loading time. This is
+based on assumption that register GC_USER_SHADER_ARRAY_CONFIG won’t get
+changed.
+
+V2: remove the incorrect simd_count reported at loading module.
+
+Signed-off-by: Flora Cui <flora.cui@amd.com>
+Reviewed by: Yair Shachar< yair.shachar@amd.com>
+Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
+Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+index cb0303a..ca2e51a 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+@@ -133,8 +133,7 @@ static void kfd_populated_cu_info_gpu(struct kfd_topology_device *dev,
+ dev->node_props.max_slots_scratch_cu = cu->max_slots_scatch_cu;
+ if (cu->hsa_capability & CRAT_CU_FLAGS_HOT_PLUGGABLE)
+ dev->node_props.capability |= HSA_CAP_HOT_PLUGGABLE;
+- pr_info("CU GPU: simds=%d id_base=%d\n", cu->num_simd_cores,
+- cu->processor_id_low);
++ pr_info("CU GPU: id_base=%d\n", cu->processor_id_low);
+ }
+
+ /* kfd_parse_subtype_cu is called when the topology mutex is already acquired */
+@@ -1124,6 +1123,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
+ {
+ uint32_t gpu_id;
+ struct kfd_topology_device *dev;
++ struct kfd_cu_info cu_info;
+ int res;
+
+ gpu_id = kfd_generate_gpu_id(gpu);
+@@ -1161,6 +1161,9 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
+
+ dev->gpu_id = gpu_id;
+ gpu->id = gpu_id;
++ dev->gpu->kfd2kgd->get_cu_info(dev->gpu->kgd, &cu_info);
++ dev->node_props.simd_count = dev->node_props.simd_per_cu *
++ cu_info.cu_active_number;
+ dev->node_props.vendor_id = gpu->pdev->vendor;
+ dev->node_props.device_id = gpu->pdev->device;
+ dev->node_props.location_id = (gpu->pdev->bus->number << 24) +
+--
+2.7.4
+