| .. | .. |
|---|
| 27 | 27 | #include <linux/list.h> |
|---|
| 28 | 28 | #include "kfd_crat.h" |
|---|
| 29 | 29 | |
|---|
| 30 | | -#define KFD_TOPOLOGY_PUBLIC_NAME_SIZE 128 |
|---|
| 30 | +#define KFD_TOPOLOGY_PUBLIC_NAME_SIZE 32 |
|---|
| 31 | 31 | |
|---|
| 32 | 32 | #define HSA_CAP_HOT_PLUGGABLE 0x00000001 |
|---|
| 33 | 33 | #define HSA_CAP_ATS_PRESENT 0x00000002 |
|---|
| .. | .. |
|---|
| 41 | 41 | #define HSA_CAP_WATCH_POINTS_TOTALBITS_SHIFT 8 |
|---|
| 42 | 42 | #define HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK 0x00003000 |
|---|
| 43 | 43 | #define HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT 12 |
|---|
| 44 | | -#define HSA_CAP_RESERVED 0xffffc000 |
|---|
| 45 | 44 | |
|---|
| 46 | 45 | #define HSA_CAP_DOORBELL_TYPE_PRE_1_0 0x0 |
|---|
| 47 | 46 | #define HSA_CAP_DOORBELL_TYPE_1_0 0x1 |
|---|
| 48 | 47 | #define HSA_CAP_DOORBELL_TYPE_2_0 0x2 |
|---|
| 49 | 48 | #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP 0x00004000 |
|---|
| 50 | 49 | |
|---|
| 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 | + |
|---|
| 51 | 58 | struct kfd_node_properties { |
|---|
| 59 | + uint64_t hive_id; |
|---|
| 60 | + uint64_t unique_id; |
|---|
| 52 | 61 | uint32_t cpu_cores_count; |
|---|
| 53 | 62 | uint32_t simd_count; |
|---|
| 54 | 63 | uint32_t mem_banks_count; |
|---|
| .. | .. |
|---|
| 60 | 69 | uint32_t max_waves_per_simd; |
|---|
| 61 | 70 | uint32_t lds_size_in_kb; |
|---|
| 62 | 71 | uint32_t gds_size_in_kb; |
|---|
| 72 | + uint32_t num_gws; |
|---|
| 63 | 73 | uint32_t wave_front_size; |
|---|
| 64 | 74 | uint32_t array_count; |
|---|
| 65 | 75 | uint32_t simd_arrays_per_engine; |
|---|
| .. | .. |
|---|
| 70 | 80 | uint32_t vendor_id; |
|---|
| 71 | 81 | uint32_t device_id; |
|---|
| 72 | 82 | uint32_t location_id; |
|---|
| 83 | + uint32_t domain; |
|---|
| 73 | 84 | uint32_t max_engine_clk_fcompute; |
|---|
| 74 | 85 | uint32_t max_engine_clk_ccompute; |
|---|
| 75 | 86 | 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]; |
|---|
| 77 | 92 | }; |
|---|
| 78 | 93 | |
|---|
| 79 | 94 | #define HSA_MEM_HEAP_TYPE_SYSTEM 0 |
|---|
| .. | .. |
|---|
| 94 | 109 | uint32_t flags; |
|---|
| 95 | 110 | uint32_t width; |
|---|
| 96 | 111 | uint32_t mem_clk_max; |
|---|
| 112 | + struct kfd_dev *gpu; |
|---|
| 97 | 113 | struct kobject *kobj; |
|---|
| 98 | 114 | struct attribute attr; |
|---|
| 99 | 115 | }; |
|---|
| .. | .. |
|---|
| 115 | 131 | uint32_t cache_latency; |
|---|
| 116 | 132 | uint32_t cache_type; |
|---|
| 117 | 133 | uint8_t sibling_map[CRAT_SIBLINGMAP_SIZE]; |
|---|
| 134 | + struct kfd_dev *gpu; |
|---|
| 118 | 135 | struct kobject *kobj; |
|---|
| 119 | 136 | struct attribute attr; |
|---|
| 120 | 137 | }; |
|---|
| .. | .. |
|---|
| 133 | 150 | uint32_t max_bandwidth; |
|---|
| 134 | 151 | uint32_t rec_transfer_size; |
|---|
| 135 | 152 | uint32_t flags; |
|---|
| 153 | + struct kfd_dev *gpu; |
|---|
| 136 | 154 | struct kobject *kobj; |
|---|
| 137 | 155 | struct attribute attr; |
|---|
| 138 | 156 | }; |
|---|