diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-12-19 09:08:54 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-20 19:59:21 +0300 |
commit | f49e9bac191b066060a53d994f9c964fb71454f2 (patch) | |
tree | 5d04e99ad92d3415b0aaef066b83afc9ef92ecbb /drivers/gpu/drm/amd/powerplay | |
parent | 82eb0f3071d25ef670b7810dddfbd7d6f142a2a7 (diff) | |
download | linux-f49e9bac191b066060a53d994f9c964fb71454f2.tar.xz |
drm/amd/pp: Get and save Rv smu version
The smu firmware is loaded by the sbios on APUs, so query it
from the smu and save the smu fw version info that is reported
to userspace.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c index b98ade676d12..2d662b44af54 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c @@ -305,6 +305,14 @@ static int rv_smu_fini(struct pp_hwmgr *hwmgr) static int rv_start_smu(struct pp_hwmgr *hwmgr) { + struct cgs_firmware_info info = {0}; + + smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetSmuVersion); + rv_read_arg_from_smc(hwmgr, &hwmgr->smu_version); + info.version = hwmgr->smu_version >> 8; + + cgs_get_firmware_info(hwmgr->device, CGS_UCODE_ID_SMU, &info); + if (rv_verify_smc_interface(hwmgr)) return -EINVAL; if (rv_smc_enable_sdma(hwmgr)) |