aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/amdgpu: psp HDCP initBhawanpreet Lakha2019-10-031-0/+17
| | | | | | | | | | | | This patch adds -Loading the firmware -The functions and definitions for communication with the firmware v2: Fix formatting Signed-off-by: Bhawanpreet Lakha <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: move TMR to cpu invisible vram regionTianci.Yin2019-08-221-1/+0
| | | | | | | | so that more visible vram can be available for umd. Reviewed-by: Christian König <[email protected]>. Signed-off-by: Tianci.Yin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: remove redundant argument for psp_funcs::cmd_submit callbackXiaojie Yuan2019-08-221-3/+2
| | | | | | Signed-off-by: Xiaojie Yuan <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp_v12_0 for renoir (v2)Aaron Liu2019-08-121-0/+1
| | | | | | | | | | | | | | 1. Add psp ip block 2. Use direct loading type by default and it can also config psp loading type. 3. Bypass sos fw loading and xgmi&ras interface v2: drop TA loading Acked-by: Huang Rui <[email protected]> Signed-off-by: Aaron Liu <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support key database loading for navi10Hawking Zhang2019-07-121-0/+5
| | | | | | | | | | | Starting from navi10, driver should send Key Database Load command to bootloader before loading sys_drv and sos Signed-off-by: John Clements <[email protected]> Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Xiaojie Yuan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: switch to macro for psp bootloader commandHawking Zhang2019-07-121-0/+6
| | | | | | | | | | The command will be sent to psp bootloader from driver to ask psp bootloader to exerise tOS, sys_drv and kdb loading Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Xiaojie Yuan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add a mutex to protect access to the psp ringAlex Deucher2019-07-091-0/+1
| | | | | | | | We need to serialize access to the psp ring if there are multiple callers at runtime. Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add new psp interface for vcn updating sramJack Xiao2019-06-211-0/+3
| | | | | | | PSP leverages the existing fw loading function for vcn updating sram. Signed-off-by: Jack Xiao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amd/amdgpu: add flag to mark whether autoload is supported or notHawking Zhang2019-06-211-0/+2
| | | | | | | | | | rlc autoload is supported since navi10 Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Jack Xiao <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: start rlc autoload after psp recieved all gfx firmwareHawking Zhang2019-06-211-0/+5
| | | | | | | | RLC handles firmware loading for gfx to support vddgfx feature. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: support init psp sos microcode with build-in tocHawking Zhang2019-06-211-1/+1
| | | | | | | | psp_firmware_header_v1_1 is used for psp sos with build-in toc Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add structure to support build-in toc to psp sosHawking Zhang2019-06-211-0/+2
| | | | | | | | | | Table Of Content (TOC) is used by RLC to auto load gc firmwares. PSP need to parse the toc to calculate the tmr size needed and load gc firmwares to tmr for RLC to auto load them finally Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: implement PSP cmd GFX_CMD_ID_PROG_REGTrigger Huang2019-05-241-1/+10
| | | | | | | | | | | | Add implementation to program regs by PSP, currently the following IH registers are supported: IH_RB_CNTL IH_RB_CNTL_RING1 IH_RB_CNTL_RING2 Signed-off-by: Trigger Huang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Implement get num of hops between two xgmi deviceshaoyunl2019-05-241-12/+14
| | | | | | | | KFD need to provide the info for upper level to determine the data path Signed-off-by: shaoyunl <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add amdgpu_ras.c to support ras (v2)xinhui pan2019-03-191-0/+1
| | | | | | | | | | | | | | | | | | add obj management. add feature control. add debugfs infrastructure. add sysfs infrastructure. add IH infrastructure. add recovery infrastructure. It is a framework. Other IPs need call amdgpu_ras_xxx function instead of psp_ras_xxx functions. v2: squash in warning fixes Signed-off-by: xinhui pan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp ras subsystem infrastructure (v2)xinhui pan2019-03-191-0/+16
| | | | | | | | | | | | Add ras fw loading, init, terminate. Add ras cmd submit helper. Add ras feature enable/disable common function. v2: squash in unused variable warning fix Signed-off-by: xinhui pan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp ras callback func and macroxinhui pan2019-03-191-0/+11
| | | | | | | | | Define the driver side interface for ras ta. Acked-by: Hawking Zhang <[email protected]> Signed-off-by: xinhui pan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add ta ras fw info (v2)xinhui pan2019-03-191-0/+4
| | | | | | | | | | | Add ras fw part, xgmi and ras fw are combined together in ta binary. Reading the data from the info is not implemented yet. v2: squash in "drm/amdgpu: fix NULL pointer when ta is missing" Signed-off-by: xinhui pan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: make get_fw_type and prep_cmd_buf to be common interfacesHawking Zhang2019-01-141-3/+0
| | | | | | | | | get_fw_type and prep_cmd_buf should be common interface instead of IP specific ones Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: correct the return value for error caseEvan Quan2018-12-181-6/+6
| | | | | | | | | It should not return 0 for error case as '0' is actually a special value for index. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: Correct and refine the vmr support. (v2)Emily Deng2018-12-141-2/+3
| | | | | | | | | | Currently driver only psp v11 support vmr. v2: squash in unused variable removal (Alex) Signed-off-by: Emily Deng <[email protected]> Reviewed-by: Xiangliang Yu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: Add support VMR ring for VFXiangliang Yu2018-12-071-0/+1
| | | | | | | | | | | PSP only support VMR ring for SRIOV vf since v45 and all commands will be send to VMR ring for executing. VMR ring use C2PMSG 101 ~ 103 instead of C2PMSG 64 ~ 71. Signed-off-by: Xiangliang Yu <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: update topology info structuresHawking Zhang2018-11-061-16/+13
| | | | | | | | | topology info structure needs to match with the one defined in xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add get_node_id functionHawking Zhang2018-11-061-4/+4
| | | | | | | | | | | get_node_id function is used for driver to get node_id for current device from xgmi ta Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add helper function to invoke xgmi ta per ta cmd_idHawking Zhang2018-11-061-0/+3
| | | | | | | | | psp_xgmi_invoke is the helper function to issue ta cmd to firmware Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add structure for xgmi ta and its shared bufferHawking Zhang2018-11-061-1/+17
| | | | | | | | Add data structures for xgmi trusted application. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: avoid hard-code fence value pre submissionHawking Zhang2018-11-051-1/+4
| | | | | | | | | | | Hard-code submission fence is not a sustainable way as there is more and more run-time psp kernel mode submission from driver to fw Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu : Add psp function interfaces for XGMI supportShaoyun Liu2018-09-111-0/+34
| | | | | | | | | Place holder for XGMI support Signed-off-by: Shaoyun Liu <[email protected]> Reviewed-by: Huang Rui <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: Enlarge PSP TMR SIZE from 3M to 4M.Feifei Xu2018-08-271-0/+1
| | | | | | | | Enlarge the PSP TMR SIZE to 4M for dual UVD fw front-door loading. Signed-off-by: Feifei Xu <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add psp 11.0 support for vega20. (v2)Feifei Xu2018-08-271-0/+1
| | | | | | | | | | | | | Add psp 11.0 code for vega20 and enable it. PSP is the security processor for the GPU. It handles firmware loading and GPU resets among other things. v2: whitespace fix, enable support, adjust reg includes (Alex) Signed-off-by: Feifei Xu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: move psp macro into amdgpu_psp headerHuang Rui2018-08-271-12/+17
| | | | | | | | Demangle amdgpu.h. Signed-off-by: Huang Rui <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/soc15: don't abuse IP soft reset for adapter resetAlex Deucher2018-02-191-0/+2
| | | | | | | | | The IP soft reset interface is for per IP reset but it was being abused for adapter reset on soc15 asics. Adjust the interface to make it explicit. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: use a function pointer structureAlex Deucher2018-02-191-17/+24
| | | | | | | | This way we can make all of the IP specific functions static, and we only need a single entry point into the PSP IP modules. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Add GPU reset functionality for Vega10Ken Wang2017-09-261-0/+3
| | | | | | | | | V2 Signed-off-by: Ken Wang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: stop psp ring on suspendEvan Quan2017-09-121-0/+1
| | | | | | | | | | Otherwise, the ring will fail to create on next resume. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: added api for stopping psp ring (v2)Evan Quan2017-09-121-0/+2
| | | | | | | | | | - v2: reuse the ring stop api in ring destory Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: make psp cmd buffer as a reserve memoryHuang Rui2017-07-141-0/+5
| | | | | | | Signed-off-by: Huang Rui <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp v10 ip blockHuang Rui2017-05-241-0/+2
| | | | | | | | | Add the ip block version structure for psp 10.0. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Destroy psp ring in hw_finiTrigger Huang2017-04-281-0/+3
| | | | | | | | | | | | | | | | | | | | Fix issue that PSP initialization will fail if reload amdgpu module. That's because the PSP ring must be destroyed to be ready for the next time PSP initialization. Changes in v2: - Move psp_ring_destroy before all BOs free (suggested by Ray Huang). Changes in v3: - Check firmware load type, if it is not PSP, we should do nothing in fw_fini(), and of course will not destroy PSP ring too (suggested by Ray Huang). Signed-off-by: Trigger Huang <[email protected]> Reviewed-by: Xiangliang Yu <[email protected]> Reviewed-by: Huang Rui <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: split psp ring init functionHuang Rui2017-04-281-0/+3
| | | | | | | | Rework in order to properly support suspend. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: split psp asd functionHuang Rui2017-04-281-1/+4
| | | | | | | | Rework in order to properly support suspend. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: use private memory to store psp firmware dataHuang Rui2017-04-281-1/+0
| | | | | | | | Rework in order to properly support suspend. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp firmware private memoryHuang Rui2017-04-281-0/+6
| | | | | | | | Needed for proper suspend support. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP driver for vega10 (v2)Huang Rui2017-03-301-0/+127
PSP is responsible for firmware loading on SOC-15 asics. v2: fix memory leak (Ken) Acked-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>