PSP 15.0.0 support
Subsystems (3)
Alex Deucher
maintainercover PSP 15.0.0 support
This series adds support for PSP 15.0.0. The first patch adds register headers which are large for the mailing list.
Alex Deucher (1):
drm/amdgpu: add MP 15.0.0 headers
Pratik Vishwakarma (2):
drm/amdgpu: Enable support for PSP 15_0_0
drm/amdgpu: Skip SMU init for backdoor loading
drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_v15_0.c | 202 ++++++ drivers/gpu/drm/amd/amdgpu/psp_v15_0.h | 30 + .../include/asic_reg/mp/mp_15_0_0_offset.h | 423 ++++++++++++ .../include/asic_reg/mp/mp_15_0_0_sh_mask.h | 626 ++++++++++++++++++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 +- 9 files changed, 1307 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v15_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v15_0.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_15_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_15_0_0_sh_mask.h
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 2/3 drm/amdgpu: Enable support for PSP 15_0_0
From: Pratik Vishwakarma <[email protected]>
Add support for PSP v 15.0.0.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_v15_0.c | 202 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v15_0.h | 30 +++ 6 files changed, 254 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v15_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v15_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -0
@@ -136,6 +136,7 @@ amdgpu-y += \ psp_v13_0.o \ psp_v13_0_4.o \ psp_v14_0.o \ + psp_v15_0.o \ psp_v15_0_8.o # add DCE block
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
@@ -2168,6 +2168,9 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (14 ,0 ,5 ):amdgpu_device_ip_block_add (adev, &psp_v14_0_ip_block);break ; +case IP_VERSION (15 ,0 ,0 ): +amdgpu_device_ip_block_add (adev, &psp_v15_0_ip_block); +break ;case IP_VERSION (15 ,0 ,8 ):amdgpu_device_ip_block_add (adev, &psp_v15_0_8_ip_block);break ;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +17 -1
@@ -39,6 +39,7 @@#include "psp_v13_0.h" #include "psp_v13_0_4.h" #include "psp_v14_0.h" +#include "psp_v15_0.h" #include "psp_v15_0_8.h" #include "amdgpu_ras.h"
@@ -260,6 +261,10 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block)psp_v14_0_set_psp_funcs (psp); psp->boot_time_tmr = false;break ; +case IP_VERSION (15 ,0 ,0 ): +psp_v15_0_0_set_psp_funcs (psp); + psp->boot_time_tmr = false; +break ;case IP_VERSION (15 ,0 ,8 ):psp_v15_0_8_set_psp_funcs (psp);break ;
@@ -905,6 +910,7 @@ static bool psp_skip_tmr(struct psp_context *psp)case IP_VERSION (13 ,0 ,10 ):case IP_VERSION (13 ,0 ,12 ):case IP_VERSION (13 ,0 ,14 ): +case IP_VERSION (15 ,0 ,0 ):case IP_VERSION (15 ,0 ,8 ):return true;default :
@@ -2927,7 +2933,7 @@ static int psp_prep_load_ip_fw_cmd_buf(struct psp_context *psp, ret =psp_get_fw_type (psp, ucode, &cmd->cmd.cmd_load_ip_fw.fw_type);if (ret) -dev_err (psp->adev->dev,"Unknown firmware type\n" ); +dev_err (psp->adev->dev,"Unknown firmware type %d\n" , ucode->ucode_id);return ret; }
@@ -3091,6 +3097,8 @@ static int psp_load_non_psp_fw(struct psp_context *psp)IP_VERSION (11 ,0 ,11 ) ||amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (11 ,0 ,12 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) == +IP_VERSION (15 ,0 ,0 ) ||amdgpu_ip_version (adev,MP0_HWIP ,0 ) == IP_VERSION(15, 0, 8)) && (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1 ||
@@ -4547,6 +4555,14 @@ const struct amdgpu_ip_block_version psp_v14_0_ip_block = { .funcs = &psp_ip_funcs, }; +const struct amdgpu_ip_block_version psp_v15_0_ip_block = { + .type =AMD_IP_BLOCK_TYPE_PSP , + .major =15 , + .minor =0 , + .rev =0 , + .funcs = &psp_ip_funcs, +}; +const struct amdgpu_ip_block_version psp_v15_0_8_ip_block = { .type =AMD_IP_BLOCK_TYPE_PSP , .major =15 ,
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +1 -0
@@ -540,6 +540,7 @@ extern const struct amdgpu_ip_block_version psp_v12_0_ip_block;extern const struct amdgpu_ip_block_version psp_v13_0_ip_block;extern const struct amdgpu_ip_block_version psp_v13_0_4_ip_block;extern const struct amdgpu_ip_block_version psp_v14_0_ip_block; +extern const struct amdgpu_ip_block_version psp_v15_0_ip_block;extern const struct amdgpu_ip_block_version psp_v15_0_8_ip_block; int psp_wait_for(struct psp_context *psp, uint32_t reg_index,
drivers/gpu/drm/amd/amdgpu/psp_v15_0.c new file +202 -0
202 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/psp_v15_0.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright 2025 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ +#ifndef __PSP_V15_0_0_H__ +#define __PSP_V15_0_0_H__ + +#include "amdgpu_psp.h" + +void psp_v15_0_0_set_psp_funcs (struct psp_context *psp); + +#endif
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 3/3 drm/amdgpu: Skip SMU init for backdoor loading
In reply to Alex DeucherFrom: Pratik Vishwakarma <[email protected]>
Handle backdoor firmware loading in smu init.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +4 -1
@@ -1921,7 +1921,10 @@ static int smu_hw_init(struct amdgpu_ip_block *ip_block) smu->pm_enabled = false;return 0 ; } - +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { +dev_info (adev->dev,"Do minimal SMU init for backdoor loading case\n" ); +return 0 ; + } ret =smu_start_smc_engine (smu);if (ret) {dev_err (adev->dev,"SMC engine is not correctly up!\n" );
Signature · 1 line
2.52.0
Re: [PATCH 3/3] drm/amdgpu: Skip SMU init for backdoor loading
Quoted 4 lines · Alex Deucher
From: Pratik Vishwakarma <[email protected]>
Handle backdoor firmware loading in smu init.
This is in common code and doesn't look to be universally applicable across all SOCs.
Thanks,
Lijo
Quoted 22 lines
Signed-off-by Pratik Vishwakarma <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +4
-1@@ -1921,7 +1921,10 @@ static int smu_hw_init(struct amdgpu_ip_block *ip_block) smu->pm_enabled = false;return 0 ; } - +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { +dev_info (adev->dev,"Do minimal SMU init for backdoor loading case\n" ); +return 0 ; + } ret =smu_start_smc_engine (smu);if (ret) {dev_err (adev->dev,"SMC engine is not correctly up!\n" );
Re: [PATCH 3/3] drm/amdgpu: Skip SMU init for backdoor loading
Quoted 11 lines · Lijo
Quoted 4 lines · Alex Deucher
From: Pratik Vishwakarma <[email protected]>
Handle backdoor firmware loading in smu init.
This is in common code and doesn't look to be universally applicable across all SOCs.
I'll drop this one.
Thanks,
Alex
Quoted 27 lines
Thanks,
LijoQuoted 22 lines
Signed-off-by Pratik Vishwakarma <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +4
-1@@ -1921,7 +1921,10 @@ static int smu_hw_init(struct amdgpu_ip_block *ip_block) smu->pm_enabled = false;return 0 ; } - +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { +dev_info (adev->dev,"Do minimal SMU init for backdoor loading case\n" ); +return 0 ; + } ret =smu_start_smc_engine (smu);if (ret) {dev_err (adev->dev,"SMC engine is not correctly up!\n" );