Skip to contentSkip to conversation

drm/amdgpu: fix smu not match warning

PATCH In review Stanley.Yang 3 participants 3 messages Nov 16, 2021 – Nov 17, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix smu not match warning

update smu driver if and version to avoid mismatch log

v2:
update smu driver interface

Change-Id I97f2bc4ed9a9cba313b744e2ff6812c90b244935
---
 .../drm/amd/pm/inc/smu13_driver_if_aldebaran.h | 18 +++++++++++++++++-
 drivers/gpu/drm/amd/pm/inc/smu_v13_0.h         |  2 +-
 2 files changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu13_driver_if_aldebaran.h +17 -1
index a017983ff1fa..0f67c56c2863 100644
@@ -140,6 +140,8 @@
 
 #define MAX_SW_I2C_COMMANDS                24
 
+#define ALDEBARAN_UMC_CHANNEL_NUM    32
+
 typedef enum {
   I2C_CONTROLLER_PORT_0, //CKSVII2C0
   I2C_CONTROLLER_PORT_1, //CKSVII2C1
@@ -507,6 +509,19 @@ typedef struct {
   uint32_t MmHubPadding[8]; // SMU internal use
 } AvfsDebugTable_t;
 
+typedef struct {
+	uint64_t mca_umc_status;
+	uint64_t mca_umc_addr;
+	uint16_t ce_count_lo_chip;
+	uint16_t ce_count_hi_chip;
+
+	uint32_t eccPadding;
+} EccInfo_t;
+
+typedef struct {
+	EccInfo_t  EccInfo[ALDEBARAN_UMC_CHANNEL_NUM];
+} EccInfoTable_t;
+
 // These defines are used with the following messages:
 // SMC_MSG_TransferTableDram2Smu
 // SMC_MSG_TransferTableSmu2Dram
@@ -517,6 +532,7 @@ typedef struct {
 #define TABLE_SMU_METRICS             4
 #define TABLE_DRIVER_SMU_CONFIG       5
 #define TABLE_I2C_COMMANDS            6
-#define TABLE_COUNT                   7
+#define TABLE_ECCINFO                 7
+#define TABLE_COUNT                   8
 
 #endif
drivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1 -1
index e5d3b0d1a032..2e35885c7287 100644
@@ -27,7 +27,7 @@
 
 #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF
 #define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04
-#define SMU13_DRIVER_IF_VERSION_ALDE 0x07
+#define SMU13_DRIVER_IF_VERSION_ALDE 0x08
 
 /* MP Apertures */
 #define MP0_Public			0x03800000
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Stanley.Yang

update smu driver if and version to avoid mismatch log

v2:
update smu driver interface

A version mismatch can still happen with an older FW. I think it's better to change the patch subject also as - "Update smu driver interface for aldebaran" and provide the version number in comments.

With that changed,

Thanks,
Lijo

Quoted 64 lines
Change-Id I97f2bc4ed9a9cba313b744e2ff6812c90b244935
---
  .../drm/amd/pm/inc/smu13_driver_if_aldebaran.h | 18 +++++++++++++++++-
  drivers/gpu/drm/amd/pm/inc/smu_v13_0.h         |  2 +-
  2 files changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu13_driver_if_aldebaran.h +17 -1
index a017983ff1fa..0f67c56c2863 100644
@@ -140,6 +140,8 @@
 
  #define MAX_SW_I2C_COMMANDS                24
 
+#define ALDEBARAN_UMC_CHANNEL_NUM    32
+
  typedef enum {
    I2C_CONTROLLER_PORT_0, //CKSVII2C0
    I2C_CONTROLLER_PORT_1, //CKSVII2C1
@@ -507,6 +509,19 @@ typedef struct {
    uint32_t MmHubPadding[8]; // SMU internal use
  } AvfsDebugTable_t;
 
+typedef struct {
+	uint64_t mca_umc_status;
+	uint64_t mca_umc_addr;
+	uint16_t ce_count_lo_chip;
+	uint16_t ce_count_hi_chip;
+
+	uint32_t eccPadding;
+} EccInfo_t;
+
+typedef struct {
+	EccInfo_t  EccInfo[ALDEBARAN_UMC_CHANNEL_NUM];
+} EccInfoTable_t;
+
  // These defines are used with the following messages:
  // SMC_MSG_TransferTableDram2Smu
  // SMC_MSG_TransferTableSmu2Dram
@@ -517,6 +532,7 @@ typedef struct {
  #define TABLE_SMU_METRICS             4
  #define TABLE_DRIVER_SMU_CONFIG       5
  #define TABLE_I2C_COMMANDS            6
-#define TABLE_COUNT                   7
+#define TABLE_ECCINFO                 7
+#define TABLE_COUNT                   8
 
  #endif
drivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1 -1
index e5d3b0d1a032..2e35885c7287 100644
@@ -27,7 +27,7 @@
 
  #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF
  #define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04
-#define SMU13_DRIVER_IF_VERSION_ALDE 0x07
+#define SMU13_DRIVER_IF_VERSION_ALDE 0x08
 
  /* MP Apertures */
  #define MP0_Public			0x03800000
Reviewed-by on v1 1/1
#2 lore raw
In reply to Stanley.Yang

[AMD Official Use Only]

Quoted 80 lines

-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Tuesday, November 16, 2021 4:03 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>; Quan, Evan <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: fix smu not match warning

update smu driver if and version to avoid mismatch log

v2:
update smu driver interface

Change-Id I97f2bc4ed9a9cba313b744e2ff6812c90b244935
---
 .../drm/amd/pm/inc/smu13_driver_if_aldebaran.h | 18
+++++++++++++++++-
 drivers/gpu/drm/amd/pm/inc/smu_v13_0.h         |  2 +-
 2 files changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu13_driver_if_aldebaran.h +17 -1
index a017983ff1fa..0f67c56c2863 100644
@@ -140,6 +140,8 @@
 
 #define MAX_SW_I2C_COMMANDS                24
 
+#define ALDEBARAN_UMC_CHANNEL_NUM    32
+
 typedef enum {
   I2C_CONTROLLER_PORT_0, //CKSVII2C0
   I2C_CONTROLLER_PORT_1, //CKSVII2C1
@@ -507,6 +509,19 @@ typedef struct {
   uint32_t MmHubPadding[8]; // SMU internal use  } AvfsDebugTable_t;
 
+typedef struct {
+	uint64_t mca_umc_status;
+	uint64_t mca_umc_addr;
+	uint16_t ce_count_lo_chip;
+	uint16_t ce_count_hi_chip;
+
+	uint32_t eccPadding;
+} EccInfo_t;
+
+typedef struct {
+	EccInfo_t  EccInfo[ALDEBARAN_UMC_CHANNEL_NUM];
+} EccInfoTable_t;
+
 // These defines are used with the following messages:
 // SMC_MSG_TransferTableDram2Smu
 // SMC_MSG_TransferTableSmu2Dram
@@ -517,6 +532,7 @@ typedef struct {
 #define TABLE_SMU_METRICS             4
 #define TABLE_DRIVER_SMU_CONFIG       5
 #define TABLE_I2C_COMMANDS            6
-#define TABLE_COUNT                   7
+#define TABLE_ECCINFO                 7
+#define TABLE_COUNT                   8
 
 #endif
drivers/gpu/drm/amd/pm/inc/smu_v13_0.h +0 -0
index e5d3b0d1a032..2e35885c7287 100644
@@ -27,7 +27,7 @@
 
 #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF  #define

SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04 -#define
SMU13_DRIVER_IF_VERSION_ALDE 0x07
+#define SMU13_DRIVER_IF_VERSION_ALDE 0x08

/* MP Apertures */
#define MP0_Public 0x03800000
--
2.17.1