drm/amd/pm: fix reading SMU FW version from amdgpu_firmware_info on YC
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 9 Dec 2021 18:13:53 +0000 (12:13 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 08:32:49 +0000 (09:32 +0100)
commit dcd10d879a9d1d4e929d374c2f24aba8fac3252b upstream.

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@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

index a0e50f23b1dd7151906488ece016ff8c66b78abf..8d4aa16b2ae7c65d7717fe1c686bae14d70631eb 100644 (file)
@@ -197,6 +197,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;
@@ -209,6 +210,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->asic_type) {
        case CHIP_ALDEBARAN: