drm/amdgpu: Fetch TOS version in PSP v15.0.8
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fetch TOS version in PSP v15.0.8
For PSP v15.0.8, PSP is initialized along with VBIOS. Query and keep the version during early init.
Signed-off-by Lijo Lazar <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- drivers/gpu/drm/amd/amdgpu/psp_v15_0_8.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -2
@@ -191,6 +191,7 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block) psp->autoload_supported = true; psp->boot_time_tmr = true; + psp->adev = adev;switch (amdgpu_ip_version (adev,MP0_HWIP ,0 )) {case IP_VERSION (9 ,0 ,0 ):
@@ -298,8 +299,6 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block)return -EINVAL ; } - psp->adev = adev; - adev->psp_timeout =20000 ;psp_check_pmfw_centralized_cstate_management (psp);
drivers/gpu/drm/amd/amdgpu/psp_v15_0_8.c +10 -0
@@ -36,6 +36,13 @@ MODULE_FIRMWARE("amdgpu/psp_15_0_8_toc_1.bin");MODULE_FIRMWARE ("amdgpu/psp_15_0_8_rl.bin" );MODULE_FIRMWARE ("amdgpu/psp_15_0_8_ta.bin" ); +static void psp_v15_0_8_init_sos_version (struct psp_context *psp) +{ +struct amdgpu_device *adev = psp->adev; + + psp->sos.fw_version =RREG32_SOC15 (MP0 ,0 , regMPASP_SMN_C2PMSG_58); +} +static int psp_v15_0_8_init_microcode (struct psp_context *psp) {struct amdgpu_device *adev = psp->adev;
@@ -507,4 +514,7 @@ static const struct psp_funcs psp_v15_0_8_funcs = {void psp_v15_0_8_set_psp_funcs (struct psp_context *psp) { psp->funcs = &psp_v15_0_8_funcs; + +/* Initialize SOS version as well */ +psp_v15_0_8_init_sos_version (psp); }
Signature · 1 line
2.49.0