drm/amdgpu/discovery: add harvest info data table
authorXiaojie Yuan <xiaojie.yuan@amd.com>
Thu, 21 Feb 2019 09:55:30 +0000 (17:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Jun 2019 23:58:21 +0000 (18:58 -0500)
Add support for the harvest tables.

Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/discovery.h

index 93a8ae0aacda6a5649592404cb660b8b58846637..e01d4cd9f2cb6258e5e9e6a14dbc1de337d1720d 100644 (file)
@@ -33,7 +33,7 @@ typedef enum
 {
        IP_DISCOVERY = 0,
        GC,
-       TABLE_3,
+       HARVEST_INFO,
        TABLE_4,
        RESERVED_1,
        RESERVED_2,
@@ -144,6 +144,22 @@ struct gc_info_v1_0 {
        uint32_t gc_num_gl2a;
 };
 
+typedef struct harvest_info_header {
+       uint32_t signature; /* Table Signature */
+       uint32_t version;   /* Table Version */
+} harvest_info_header;
+
+typedef struct harvest_info {
+       uint16_t hw_id;          /* Hardware ID */
+       uint8_t number_instance; /* Instance of the IP */
+       uint8_t reserved;        /* Reserved for alignment */
+} harvest_info;
+
+typedef struct harvest_table {
+       harvest_info_header header;
+       harvest_info list[32];
+} harvest_table;
+
 #pragma pack()
 
 #endif