Skip to contentSkip to conversation

drm/amd/powerplay: maintain SMU FW backward compatibility

PATCH In review Evan Quan 2 participants 4 messages Jul 16, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/2 drm/amd/powerplay: maintain SMU FW backward compatibility

Do not halt driver loading on if_version mismatch. As our driver and FWs are backward compatible.

Change-Id I01271202d08a62e775efabfb66310f6cc742b9dd
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +9 -3
index bc4f8de629b5..12c6482d37f4 100644
@@ -262,14 +262,20 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu)
 	smu_minor = (smu_version >> 8) & 0xff;
 	smu_debug = (smu_version >> 0) & 0xff;
 
-
+	/*
+	 * 1. if_version mismatch is not critical as our fw is designed
+	 * to be backward compatible.
+	 * 2. New fw usually brings some optimizations. But that's visible
+	 * only on the paired driver.
+	 * Considering above, we just leave user a warning message instead
+	 * of halt driver loading.
+	 */
 	if (if_version != smu->smc_if_version) {
 		pr_info("smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
 			"smu fw version = 0x%08x (%d.%d.%d)\n",
 			smu->smc_if_version, if_version,
 			smu_version, smu_major, smu_minor, smu_debug);
-		pr_err("SMU driver if version not matched\n");
-		ret = -EINVAL;
+		pr_warn("SMU driver if version not matched\n");
 	}
 
 	return ret;
Signature · 6 lines
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#2 lore raw

PATCH 2/2 drm/amd/powerplay: update vega20 driver if to fit latest SMU firmware

Optimization for the socket power calculation is introduced.

Change-Id Icc8a687357ba46ae1d199d89cb2000c61b4de703
---
 drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if.h +4 -2
index 195c4ae67058..755d51f9c6a9 100644
@@ -27,7 +27,7 @@
 // *** IMPORTANT ***
 // SMU TEAM: Always increment the interface version if
 // any structure is changed in this file
-#define SMU11_DRIVER_IF_VERSION 0x12
+#define SMU11_DRIVER_IF_VERSION 0x13
 
 #define PPTABLE_V20_SMU_VERSION 3
 
@@ -615,6 +615,7 @@ typedef struct {
   uint16_t     UclkAverageLpfTau;
   uint16_t     GfxActivityLpfTau;
   uint16_t     UclkActivityLpfTau;
+  uint16_t     SocketPowerLpfTau;
 
 
   uint32_t     MmHubPadding[8];
@@ -665,7 +666,8 @@ typedef struct {
   uint32_t ThrottlerStatus       ;
 
   uint8_t  LinkDpmLevel;
-  uint8_t  Padding[3];
+  uint16_t AverageSocketPower;
+  uint8_t  Padding;
 
 
   uint32_t     MmHubPadding[7];
Signature · 6 lines
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Kenneth Feng
#4 lore raw

RE: [PATCH 2/2] drm/amd/powerplay: update vega20 driver if to fit latest SMU firmware

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Evan Quan
Sent: Tuesday, July 16, 2019 4:51 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drm/amd/powerplay: update vega20 driver if to fit latest SMU firmware

[CAUTION: External Email]

Optimization for the socket power calculation is introduced.

Change-Id Icc8a687357ba46ae1d199d89cb2000c61b4de703
---
 drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if.h +4 -1
index 195c4ae67058..755d51f9c6a9 100644
@@ -27,7 +27,7 @@
 // *** IMPORTANT ***
 // SMU TEAM: Always increment the interface version if  // any structure is changed in this file -#define SMU11_DRIVER_IF_VERSION 0x12
+#define SMU11_DRIVER_IF_VERSION 0x13
 
 #define PPTABLE_V20_SMU_VERSION 3
 
@@ -615,6 +615,7 @@ typedef struct {
   uint16_t     UclkAverageLpfTau;
   uint16_t     GfxActivityLpfTau;
   uint16_t     UclkActivityLpfTau;
+  uint16_t     SocketPowerLpfTau;
 
 
   uint32_t     MmHubPadding[8];
@@ -665,7 +666,8 @@ typedef struct {
   uint32_t ThrottlerStatus       ;
 
   uint8_t  LinkDpmLevel;
-  uint8_t  Padding[3];
+  uint16_t AverageSocketPower;
+  uint8_t  Padding;
 
 
   uint32_t     MmHubPadding[7];

--
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Kenneth Feng
#5 lore raw
In reply to a message not in the archive

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Evan Quan
Sent: Tuesday, July 16, 2019 4:51 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH 1/2] drm/amd/powerplay: maintain SMU FW backward compatibility

[CAUTION: External Email]

Do not halt driver loading on if_version mismatch. As our driver and FWs are backward compatible.

Change-Id I01271202d08a62e775efabfb66310f6cc742b9dd
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +9 -3
index bc4f8de629b5..12c6482d37f4 100644
@@ -262,14 +262,20 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu)
        smu_minor = (smu_version >> 8) & 0xff;
        smu_debug = (smu_version >> 0) & 0xff;
 
-
+       /*
+        * 1. if_version mismatch is not critical as our fw is designed
+        * to be backward compatible.
+        * 2. New fw usually brings some optimizations. But that's visible
+        * only on the paired driver.
+        * Considering above, we just leave user a warning message instead
+        * of halt driver loading.
+        */
        if (if_version != smu->smc_if_version) {
                pr_info("smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
                        "smu fw version = 0x%08x (%d.%d.%d)\n",
                        smu->smc_if_version, if_version,
                        smu_version, smu_major, smu_minor, smu_debug);
-               pr_err("SMU driver if version not matched\n");
-               ret = -EINVAL;
+               pr_warn("SMU driver if version not matched\n");
        }
 
        return ret;

--
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx