提交 f49e9bac 编写于 作者: R Rex Zhu 提交者: Alex Deucher

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: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 82eb0f30
...@@ -801,6 +801,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device, ...@@ -801,6 +801,9 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
else else
strcpy(fw_name, "amdgpu/vega10_smc.bin"); strcpy(fw_name, "amdgpu/vega10_smc.bin");
break; break;
case CHIP_RAVEN:
adev->pm.fw_version = info->version;
return 0;
default: default:
DRM_ERROR("SMC firmware not supported\n"); DRM_ERROR("SMC firmware not supported\n");
return -EINVAL; return -EINVAL;
......
...@@ -305,6 +305,14 @@ static int rv_smu_fini(struct pp_hwmgr *hwmgr) ...@@ -305,6 +305,14 @@ static int rv_smu_fini(struct pp_hwmgr *hwmgr)
static int rv_start_smu(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)) if (rv_verify_smc_interface(hwmgr))
return -EINVAL; return -EINVAL;
if (rv_smc_enable_sdma(hwmgr)) if (rv_smc_enable_sdma(hwmgr))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册