aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | drm/amdgpu: Add psp command CONFIG_SQ_PERFMONFeifei Xu2024-09-261-1/+39
|/ | | | | | | | | | Add support for enable/disable perfmon profiling. Signed-off-by: Feifei Xu <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: James Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: load sos binary properly on the basis of pmfw versionLe Ma2024-09-181-6/+23
| | | | | | | | | | | | | | | | To be compatible with legacy IFWI, driver needs to carry legacy tOS and query pmfw version to load them accordingly. Add psp_firmware_header_v2_1 to handle the combined sos binary. Double the sos count limit for the case of aux sos fw packed. v2: pass the correct fw_bin_desc to parse_sos_bin_descriptor Signed-off-by: Le Ma <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix typo in the commentYan Zhen2024-09-181-1/+1
| | | | | | | | | | | | | | | | | | Correctly spelled comments make it easier for the reader to understand the code. Replace 'udpate' with 'update' in the comment & replace 'recieved' with 'received' in the comment & replace 'dsiable' with 'disable' in the comment & replace 'Initiailize' with 'Initialize' in the comment & replace 'disble' with 'disable' in the comment & replace 'Disbale' with 'Disable' in the comment & replace 'enogh' with 'enough' in the comment & replace 'availabe' with 'available' in the comment. Acked-by: Christian König <[email protected]> Signed-off-by: Yan Zhen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix ras UE error injection failure issueYiPeng Chai2024-07-241-3/+1
| | | | | | | | | | | | The ras command shared memory is allocated from VRAM and the response status of the command buffer will not be zero due to gpu being in fatal error state after ras UE error injection. Signed-off-by: YiPeng Chai <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 8284951a6e79c6806c675e5f68a4cd425dd56bc4)
* drm/amdgpu: add mutex to protect ras shared memoryYiPeng Chai2024-07-161-40/+83
| | | | | | | | | | | | Add mutex to protect ras shared memory. v2: Add TA_RAS_COMMAND__TRIGGER_ERROR command call status check. Signed-off-by: YiPeng Chai <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP IP v14.0.4 supportTim Huang2024-07-021-0/+1
| | | | | | | | | This patch is to add PSP 14.0.4 support. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: Add ISP driver supportPratap Nirujogi2024-06-271-0/+3
| | | | | | | | | | Add the isp driver in amdgpu to support ISP device on the APUs that supports ISP IP block. ISP hw block is used for camera front-end, pre and post processing operations. Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Pratap Nirujogi <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Don't show false warning for reg listLijo Lazar2024-06-271-4/+21
| | | | | | | | | | If reg list is already loaded on PSP 13.0.2 SOCs, psp will give TEE_ERR_CANCEL response on second time load. Avoid printing warn message for it. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: refine psp firmware loadingYang Wang2024-06-141-19/+7
| | | | | | | | refine psp firmware loading Signed-off-by: Yang Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix the waring dereferencing hiveJesse Zhang2024-05-131-0/+3
| | | | | | | | Check the amdgpu_hive_info *hive that maybe is NULL. Signed-off-by: Jesse Zhang <[email protected]> Reviewed-by: Tim Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add psp v13_0_14 ip blockHawking Zhang2024-05-021-3/+10
| | | | | | | | Add psp v13_0_14 ip block support. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support SDMA v3 struct fw front door loadLikun Gao2024-04-301-0/+1
| | | | | | | | | Add support for new SDMA firmware struct (V3) with PSP front door load type. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Load ipkeymgr drv for psp v14Hawking Zhang2024-04-171-0/+15
| | | | | | | | | | while DBG_DRV is renamed to HAD_DRV for psp v14, part of its APIs/functionality is moved to a new component named Ipkeymgr_Drv. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Likun Gao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add support for BAMACO mode checkingMa Jun2024-04-101-2/+4
| | | | | | | | Optimize the code to add support for BAMACO mode checking Signed-off-by: Ma Jun <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Bypass asd if display hw is not availableHawking Zhang2024-04-101-0/+5
| | | | | | | | ASD is not needed by headless GPU. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Bypass display ta if display hw is not availableHawking Zhang2024-03-201-0/+18
| | | | | | | | | Do not load/invoke display TA if display hardware is not available. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP 14.0.1 supportYifan Zhang2024-02-161-0/+1
| | | | | | | This patch to add PSP 14.0.1 support. Signed-off-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp_timeout to limit PSP related operationLikun Gao2024-02-141-1/+3
| | | | | | | | | Add a new parameter psp_timeout to limit psp related operation to unify the timeout limition for psp. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: set boot_time_tmr flagLikun Gao2024-02-141-6/+8
| | | | | | | | | | | | | | | | Set boot_time_tmr flag for the ASIC which MP0 ip version newer than 14.0.2 For runtime TMR: Init tmr and load tmr should did. For boottime TMR: If do not support autoload, skip init TMR. If support autoload, excute init TMR but skip load tmr. v2: rebase (Alex) Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: handle TMR type via flagLikun Gao2024-02-141-11/+13
| | | | | | | | | | | Add flag boot_time_tmr to indicate boot time TMR or runtime TMR instead of function. v2: rework logic (Alex) Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: set autoload support by defaultLikun Gao2024-02-141-6/+5
| | | | | | | | | | Set psp->autoload_supported to true by default, as only a few version of ASIC not support autoload, and the furture version of PSP should support this. Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support psp ip block for psp v14Likun Gao2024-02-141-0/+14
| | | | | | | | | | | Support PSP ip block for psp v14. Add psp ip block for psp v14_0_2 and v14_0_3. v2: sqaush in 14.0.3 firmware fix (Alex) Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add ucode id for jpeg DPG supportSaleemkhan Jamadar2024-02-121-0/+3
| | | | | | | | | | add ucode id and cmd buffer for jpeg psp sram programming and Jpeg DPG support. Signed-off-by: Saleemkhan Jamadar <[email protected]> Reviewed-by: Leo Liu <[email protected]> Reviewed-by: Veerabadhran Gopalakrishnan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP RAS address query commandTao Zhou2024-01-311-0/+25
| | | | | | | | Convert mca address to physical address or vice versa via RAS TA. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Query ras capablity from psp v2Hawking Zhang2024-01-151-0/+10
| | | | | | | | | | | | Instead of traditional atomfirmware interfaces for RAS capability, host driver can query ras capability from psp starting from psp v13_0_6. v2: drop redundant local variable from get_ras_capability. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: drop psp v13 query_boot_status implementationHawking Zhang2024-01-151-15/+0
| | | | | | | | | | Will replace it with new implementation to cover boot fails in ip discovery phase. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Yang Wang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Replace DRM_* with dev_* in amdgpu_psp.cHawking Zhang2024-01-151-69/+75
| | | | | | | | | | So kernel message has the device pcie bdf information, which helps issue debugging especially in multiple GPU system. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add debug flag to place fw bo on vram for frontdoor loadingLe Ma2024-01-151-1/+1
| | | | | | | | | | | | Use debug_mask=0x8 param to help isolating data path issues on new systems in early phase. v2: rename the flag for explicitness (lijo) Signed-off-by: Le Ma <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* Revert "drm/amdgpu: add param to specify fw bo location for front-door loading"Le Ma2024-01-151-1/+1
| | | | | | | | | | | This reverts commit c572abffe9f50c8ba33060865449313b3f588c35. Will use debug module param instead of independent module param. Signed-off-by: Le Ma <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add param to specify fw bo location for front-door loadingLe Ma2024-01-051-1/+1
| | | | | | | | This param can help isolating data path issues on new systems in early phase. Signed-off-by: Le Ma <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: xgmi_fill_topology_infoVignesh Chander2023-12-131-2/+2
| | | | | | | | | | | | | | 1. Use the mirrored topology info to fill links for VF. The new solution is required to simplify and optimize host driver logic. Only use the new solution for VFs that support full duplex and extended_peer_link_info otherwise the info would be incomplete. 2. avoid calling extended_link_info on VF as its not supported Signed-off-by: Vignesh Chander <[email protected]> Reviewed-by: Zhigang Luo <[email protected]> Reviewed-by: Jonathan Kim <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add and populate the port num into xgmi topology infoShiwu Zhang2023-11-171-0/+5
| | | | | | | | | The port num info is firstly introduced with 20.00.01.13 xgmi ta and make them as part of topology info. Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add psp v13 function to query boot statusHawking Zhang2023-11-031-0/+15
| | | | | | | | | | | | Add psp v13 function to query boot status. v2: limit the use case to dGPU only (Lijo) Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Yang Wang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support the port num info based on the capability flagShiwu Zhang2023-10-201-13/+32
| | | | | | | | | | | | | | XGMI TA will set the capability flag to indicate whether the port_num info is supported or not. KGD checks the flag and accordingly picks up the right buffer format and send the right command to TA to retrieve the info. v2: simplify the code by reusing the same statement (lijo) Signed-off-by: Shiwu Zhang <[email protected]> Acked-by: Lijo Lazar <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: prepare the output buffer for GET_PEER_LINKS commandShiwu Zhang2023-10-201-2/+10
| | | | | | | | | | | | | | | Per the xgmi ta implementation, KGD needs to fill in node_ids in concern into the shared command output buffer rather than the command input buffer. Input buffer is not used for GET_PEER_LINKS command execution. In this way, xgmi ta can reuse the node info in the output buffer just filled in and populate the same buffer with link info directly. Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: update the xgmi ta interface headerShiwu Zhang2023-10-201-3/+3
| | | | | | | | | | | | | | | | Update the header file to the v20.00.00.13 v1: rename TA_COMMAND_XGMI__GET_GET_TOPOLOGY_INFO to TA_COMMAND_XGMI__GET_TOPOLOGY_INFO And also rename struct ta_xgmi_cmd_get_peer_link_info_output to ta_xgmi_cmd_get_peer_link_info accordingly v2: add structs to support xgmi GET_EXTEND_PEER_LINK command Signed-off-by: Shiwu Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/pm: Add P2S tables for SMU v13.0.6Lijo Lazar2023-10-131-0/+7
| | | | | | | | | Add P2S table load support on SMU v13.0.6 ASICs. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add support to load P2S tablesLijo Lazar2023-10-131-0/+27
| | | | | | | | | Add support to load P2S tables through PSP. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Use function for IP version checkLijo Lazar2023-09-201-21/+27
| | | | | | | | | Use an inline function for version check. Gives more flexibility to handle any format changes. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP loading support for UMSCHLang Yu2023-08-311-0/+9
| | | | | | | | | Add front door loading support. Signed-off-by: Lang Yu <[email protected]> Reviewed-by: Leo Liu <[email protected]> Reviewed-by: Veerabadhran Gopalakrishnan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: fix VPE front door loading issueLang Yu2023-08-311-0/+3
| | | | | | | Implement proper front door loading for vpe 6.1. Signed-off-by: Lang Yu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP FW TYPE for VPELang Yu2023-08-311-0/+6
| | | | | | | Add PSP FW TYPE for Video Processing Engine. Signed-off-by: Lang Yu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add bootloader status checkLijo Lazar2023-08-301-0/+11
| | | | | | | | | | Add a function to wait till bootloader has reached steady state. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Asad Kamal <[email protected]> Tested-by: Asad Kamal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: init TA microcode for SRIOV VF when MP0 IP is 13.0.6Zhigang Luo2023-08-071-0/+1
| | | | | | | | Init TA ucode for SRIOV. Signed-off-by: Zhigang Luo <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Fix style issues in amdgpu_psp.cPraful Swarnakar2023-08-071-12/+16
| | | | | | | | | | | | | | | Fixes the following to align to linux coding style: WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments should align the * on each line Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Guchun Chen <[email protected]> Signed-off-by: Praful Swarnakar <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Reviewed-by: Srinivasan Shanmugam <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP 14.0.0 supportLi Ma2023-07-271-0/+1
| | | | | | | Uses same driver interface as 13.0. Signed-off-by: Li Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd: Fix an error handling mistake in psp_sw_init()Mario Limonciello2023-07-211-3/+3
| | | | | | | | | | | If the second call to amdgpu_bo_create_kernel() fails, the memory allocated from the first call should be cleared. If the third call fails, the memory from the second call should be cleared. Fixes: b95b5391684b ("drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init") Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: use psp_execute_load_ip_fw insteadLang Yu2023-07-121-13/+0
| | | | | | | | | Replace the old ones with psp_execute_load_ip_fw. Suggested-by: Lijo Lazar <[email protected]> Signed-off-by: Lang Yu <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: rename psp_execute_non_psp_fw_load and make it globalLang Yu2023-07-121-6/+6
| | | | | | | | | This will make this function more general, and then serve other IPs. Suggested-by: Lijo Lazar <[email protected]> Signed-off-by: Lang Yu <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd: Detect IFWI or PD upgrade support in psp_early_init()Mario Limonciello2023-07-071-20/+25
| | | | | | | | | | Rather than evaluating the IP version for visibility, evaluate it at the same time as the IP is initialized. Suggested-by: Lijo Lazar <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>