aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4143-drm-amdkfd-Disable-the-perf-counters-for-old-kernels.patch
blob: 62035ec7e590e0eeaa92b84e65214759a5b5b7d9 (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
From 9335b27a248873ac43730ef4f649c403880b9518 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 4143/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