[PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

Limonciello, Mario Mario.Limonciello at amd.com
Tue Dec 14 02:42:41 UTC 2021


I've pushed it already after Alex's review comment. I'll send an extra patch tomorrow for this extra cleanup.

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Chen, Guchun <Guchun.Chen at amd.com>
Sent: Monday, December 13, 2021 8:41:17 PM
To: Limonciello, Mario <Mario.Limonciello at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
Subject: RE: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

[Public]

A nitpick.

As we have defined a local variable 'adev', so code like 'smu->adev' should be replaced directly by 'adev' in the function to make code clean.

With above addressed, the series is:

Reviewed-by: Guchun Chen <guchun.chen at amd.com>

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Mario Limonciello
Sent: Monday, December 13, 2021 11:09 PM
To: amd-gfx at lists.freedesktop.org
Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
Subject: [PATCH v2 1/2] drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC

This value does not get cached into adev->pm.fw_version during startup for smu13 like it does for other SMU like smu12.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
v1->v2:
* Run on all v13 APU to match v12 behavior  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 55421ea622fb..7fdb63da1316 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -196,6 +196,7 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)

 int smu_v13_0_check_fw_version(struct smu_context *smu)  {
+       struct amdgpu_device *adev = smu->adev;
         uint32_t if_version = 0xff, smu_version = 0xff;
         uint16_t smu_major;
         uint8_t smu_minor, smu_debug;
@@ -208,6 +209,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
         smu_major = (smu_version >> 16) & 0xffff;
         smu_minor = (smu_version >> 8) & 0xff;
         smu_debug = (smu_version >> 0) & 0xff;
+       if (smu->is_apu)
+               adev->pm.fw_version = smu_version;

         switch (smu->adev->ip_versions[MP1_HWIP][0]) {
         case IP_VERSION(13, 0, 2):
--
2.25.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20211214/f19b864b/attachment.htm>


More information about the amd-gfx mailing list