aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch
new file mode 100644
index 00000000..d27dc967
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5624-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch
@@ -0,0 +1,32 @@
+From d9d090893b22e3bb4703986813ff20ddca34b3a9 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Fri, 28 Apr 2017 18:08:09 -0400
+Subject: [PATCH 5624/5725] drm/amdkfd: Disable the perf counters for old
+ kernels
+
+Because IOMMU functions are missing for old kernels such as 3.10 on
+Redhat 7.3, we choose to disable the performance counter feature on
+those kernels.
+
+Change-Id: Ie159d61a9b36cc38bd306b5e28fa5a3b83646d09
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
+index f4d29c4..4c518fe8 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
+@@ -190,4 +190,8 @@ struct kfd_topology_device *kfd_create_topology_device(
+ struct list_head *device_list);
+ void kfd_release_topology_device_list(struct list_head *device_list);
+
++extern bool amd_iommu_pc_supported(void);
++extern u8 amd_iommu_pc_get_max_banks(u16 devid);
++extern u8 amd_iommu_pc_get_max_counters(u16 devid);
++
+ #endif /* __KFD_TOPOLOGY_H__ */
+--
+2.7.4
+