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

Chen, Guchun Guchun.Chen at amd.com
Mon Dec 13 03:35:49 UTC 2021


[Public]

In SMU11/SMU12, it will cache pm.fw_version unconditionally only in APU case. So we should apply the same code in smu_v13_0_check_fw_version?

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Mario Limonciello
Sent: Friday, December 10, 2021 10:29 PM
To: amd-gfx at lists.freedesktop.org
Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
Subject: [PATCH] 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 smu10.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++
 1 file changed, 2 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..85dbd6a7efa9 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
@@ -226,6 +226,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
 
 	dev_info(smu->adev->dev, "smu fw reported version = 0x%08x (%d.%d.%d)\n",
 			 smu_version, smu_major, smu_minor, smu_debug);
+	if (!smu->adev->pm.fw_version)
+		smu->adev->pm.fw_version = smu_version;
 
 	/*
 	 * 1. if_version mismatch is not critical as our fw is designed
--
2.25.1


More information about the amd-gfx mailing list