summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2024-03-11 10:32:01 +0530
committerAlex Deucher <alexander.deucher@amd.com>2024-05-17 17:40:36 -0400
commit8ce97959ecc23a49c8a24975f5566287e5b15944 (patch)
tree099c52977b59d0d4242693c676b5056aebcee551
parent0cdb3f9740844b9d95ca413e3fcff11f81223ecf (diff)
drm/amdgpu: Add nps info table to IP discovery
Add support to fetch NPS info table in IP discovery table. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/include/discovery.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/include/discovery.h b/drivers/gpu/drm/amd/include/discovery.h
index 7a9d473d0917..46bf19c9c5c4 100644
--- a/drivers/gpu/drm/amd/include/discovery.h
+++ b/drivers/gpu/drm/amd/include/discovery.h
@@ -31,15 +31,15 @@
#define HARVEST_TABLE_SIGNATURE 0x56524148
#define VCN_INFO_TABLE_ID 0x004E4356
#define MALL_INFO_TABLE_ID 0x4C4C414D
+#define NPS_INFO_TABLE_ID 0x0053504E
-typedef enum
-{
+typedef enum {
IP_DISCOVERY = 0,
GC,
HARVEST_INFO,
VCN_INFO,
MALL_INFO,
- RESERVED_1,
+ NPS_INFO,
TOTAL_TABLES = 6
} table;
@@ -380,6 +380,28 @@ struct vcn_info_v1_0 {
uint32_t reserved[4];
};
+#define NPS_INFO_TABLE_MAX_NUM_INSTANCES 12
+
+struct nps_info_header {
+ uint32_t table_id; /* table ID */
+ uint16_t version_major; /* table version */
+ uint16_t version_minor; /* table version */
+ uint32_t size_bytes; /* size of the entire header+data in bytes = 0x000000D4 (212) */
+};
+
+struct nps_instance_info_v1_0 {
+ uint64_t base_address;
+ uint64_t limit_address;
+};
+
+struct nps_info_v1_0 {
+ struct nps_info_header header;
+ uint32_t nps_type;
+ uint32_t count;
+ struct nps_instance_info_v1_0
+ instance_info[NPS_INFO_TABLE_MAX_NUM_INSTANCES];
+};
+
#pragma pack()
#endif