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