hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
....@@ -27,7 +27,7 @@
2727 #include <linux/list.h>
2828 #include "kfd_crat.h"
2929
30
-#define KFD_TOPOLOGY_PUBLIC_NAME_SIZE 128
30
+#define KFD_TOPOLOGY_PUBLIC_NAME_SIZE 32
3131
3232 #define HSA_CAP_HOT_PLUGGABLE 0x00000001
3333 #define HSA_CAP_ATS_PRESENT 0x00000002
....@@ -41,14 +41,23 @@
4141 #define HSA_CAP_WATCH_POINTS_TOTALBITS_SHIFT 8
4242 #define HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK 0x00003000
4343 #define HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT 12
44
-#define HSA_CAP_RESERVED 0xffffc000
4544
4645 #define HSA_CAP_DOORBELL_TYPE_PRE_1_0 0x0
4746 #define HSA_CAP_DOORBELL_TYPE_1_0 0x1
4847 #define HSA_CAP_DOORBELL_TYPE_2_0 0x2
4948 #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP 0x00004000
5049
50
+#define HSA_CAP_SRAM_EDCSUPPORTED 0x00080000
51
+#define HSA_CAP_MEM_EDCSUPPORTED 0x00100000
52
+#define HSA_CAP_RASEVENTNOTIFY 0x00200000
53
+#define HSA_CAP_ASIC_REVISION_MASK 0x03c00000
54
+#define HSA_CAP_ASIC_REVISION_SHIFT 22
55
+
56
+#define HSA_CAP_RESERVED 0xfc078000
57
+
5158 struct kfd_node_properties {
59
+ uint64_t hive_id;
60
+ uint64_t unique_id;
5261 uint32_t cpu_cores_count;
5362 uint32_t simd_count;
5463 uint32_t mem_banks_count;
....@@ -60,6 +69,7 @@
6069 uint32_t max_waves_per_simd;
6170 uint32_t lds_size_in_kb;
6271 uint32_t gds_size_in_kb;
72
+ uint32_t num_gws;
6373 uint32_t wave_front_size;
6474 uint32_t array_count;
6575 uint32_t simd_arrays_per_engine;
....@@ -70,10 +80,15 @@
7080 uint32_t vendor_id;
7181 uint32_t device_id;
7282 uint32_t location_id;
83
+ uint32_t domain;
7384 uint32_t max_engine_clk_fcompute;
7485 uint32_t max_engine_clk_ccompute;
7586 int32_t drm_render_minor;
76
- uint16_t marketing_name[KFD_TOPOLOGY_PUBLIC_NAME_SIZE];
87
+ uint32_t num_sdma_engines;
88
+ uint32_t num_sdma_xgmi_engines;
89
+ uint32_t num_sdma_queues_per_engine;
90
+ uint32_t num_cp_queues;
91
+ char name[KFD_TOPOLOGY_PUBLIC_NAME_SIZE];
7792 };
7893
7994 #define HSA_MEM_HEAP_TYPE_SYSTEM 0
....@@ -94,6 +109,7 @@
94109 uint32_t flags;
95110 uint32_t width;
96111 uint32_t mem_clk_max;
112
+ struct kfd_dev *gpu;
97113 struct kobject *kobj;
98114 struct attribute attr;
99115 };
....@@ -115,6 +131,7 @@
115131 uint32_t cache_latency;
116132 uint32_t cache_type;
117133 uint8_t sibling_map[CRAT_SIBLINGMAP_SIZE];
134
+ struct kfd_dev *gpu;
118135 struct kobject *kobj;
119136 struct attribute attr;
120137 };
....@@ -133,6 +150,7 @@
133150 uint32_t max_bandwidth;
134151 uint32_t rec_transfer_size;
135152 uint32_t flags;
153
+ struct kfd_dev *gpu;
136154 struct kobject *kobj;
137155 struct attribute attr;
138156 };