From: Alex Deucher Date: Fri, 6 Nov 2020 14:50:22 +0000 (-0500) Subject: drm/amdgpu/pm/smu11: cache smu firmware version X-Git-Tag: baikal/mips/sdk5.9~12066^2^2~420 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=a28e7343b3a5bea5f18fa3f480aae95fa4735027;p=kernel.git drm/amdgpu/pm/smu11: cache smu firmware version So we print the proper SMU firmware version in debugfs, ioctls, etc. for vangogh. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c index b6453ee6f8e65..6b7d1335b46d8 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c @@ -216,6 +216,7 @@ int smu_v11_0_check_fw_status(struct smu_context *smu) int smu_v11_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; @@ -228,6 +229,8 @@ int smu_v11_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_ARCTURUS: