aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/amdgpu: start autoload till RLCG fw for navi12Xiaojie Yuan2019-08-021-1/+2
| | | | | | | | rlc save restore list is not ready yet for navi12 Signed-off-by: Xiaojie Yuan <[email protected]> Reviewed-by: Jack Xiao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp11: add psp support for navi12Xiaojie Yuan2019-08-021-0/+1
| | | | | | | | Same as other navi asics. Signed-off-by: Xiaojie Yuan <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: extend PSP FW loading support to 8 SDMA instancesJohn Clements2019-08-021-1/+26
| | | | | | | | | Arcturus has 8 instances of SDMA. Update host to PSP interface to handle it. Signed-off-by: John Clements <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: update PSP CMD fail response status printJohn Clements2019-08-021-2/+2
| | | | | | | | Print the response in hex with the apprpriate mask. Signed-off-by: John Clements <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add PSP SW init support for ArcturusJohn Clements2019-08-021-0/+1
| | | | | | | | Add arcturus cases to psp init sewquence. Signed-off-by: John Clements <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: enable gfxoff code path for navi14Jack Xiao2019-07-181-3/+1
| | | | | | | | | Based on navi10 gfxoff logic, enable the related code path for navi14. Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: start rlc autoload after psp received rlcg for navi14Xiaojie Yuan2019-07-181-1/+3
| | | | | | | | Update for navi14. Signed-off-by: Xiaojie Yuan <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: add psp support for navi14 (v3)Xiaojie Yuan2019-07-181-0/+1
| | | | | | | | | | | Same as navi10. v2: squash in logic fix (Colin Ian King) v3: squash in logic simplification (Alex) Signed-off-by: Xiaojie Yuan <[email protected]> Reviewed-by: Snow Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: check kdb_bin_size to exclude kdb loading sequenceHawking Zhang2019-07-161-1/+1
| | | | | | | | | | The legacy navi10 sos binary will not carry on kdb image. the kdb_start_addr is actually the start address of sys_drv image and shouldn't be sent to psp bootloader. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: John Clements <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: support key database loading for navi10Hawking Zhang2019-07-121-0/+9
| | | | | | | | | | | 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/psp: add a mutex to protect access to the psp ringAlex Deucher2019-07-091-2/+14
| | | | | | | | 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]>
* Merge branch 'drm-next' into drm-next-5.3Alex Deucher2019-06-251-1/+1
|\ | | | | | | | | | | Backmerge drm-next and fix up conflicts due to drmP.h removal. Signed-off-by: Alex Deucher <[email protected]>
| * Merge tag 'drm-misc-next-2019-06-14' of ↵Daniel Vetter2019-06-141-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.3: UAPI Changes: Cross-subsystem Changes: - Add code to signal all dma-fences when freed with pending signals. - Annotate reservation object access in CONFIG_DEBUG_MUTEXES Core Changes: - Assorted documentation fixes. - Use irqsave/restore spinlock to add crc entry. - Move code around to drm_client, for internal modeset clients. - Make drm_crtc.h and drm_debugfs.h self-contained. - Remove drm_fb_helper_connector. - Add bootsplash to todo. - Fix lock ordering in pan_display_legacy. - Support pinning buffers to current location in gem-vram. - Remove the now unused locking functions from gem-vram. - Remove the now unused kmap-object argument from vram helpers. - Stop checking return value of debugfs_create. - Add atomic encoder enable/disable helpers. - pass drm_atomic_state to atomic connector check. - Add atomic support for bridge enable/disable. - Add self refresh helpers to core. Driver Changes: - Add extra delay to make MTP SDM845 work. - Small fixes to virtio, vkms, sii902x, sii9234, ast, mcde, analogix, rockchip. - Add zpos and ?BGR8888 support to meson. - More removals of drm_os_linux and drmP headers for amd, radeon, sti, r128, r128, savage, sis. - Allow synopsis to unwedge the i2c hdmi bus. - Add orientation quirks for GPD panels. - Edid cleanups and fixing handling for edid < 1.2. - Add runtime pm to stm. - Handle s/r in dw-hdmi. - Add hooks for power on/off to dsi for stm. - Remove virtio dirty tracking code, done in drm core. - Rework BO handling in ast and mgag200. Tiny conflict in drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c, needed #include <linux/slab.h> to make it compile. Signed-off-by: Daniel Vetter <[email protected]> From: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| | * drm/amd: drop use of drmP.h in amdgpu/amdgpu*Sam Ravnborg2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop use of drmP.h in all files named amdgpu* in drm/amd/amdgpu/ Fix fallout. Signed-off-by: Sam Ravnborg <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Cc: "Christian König" <[email protected]> Cc: "David (ChunMing) Zhou" <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* | | drm/amdgpu/psp: add new psp interface for vcn updating sramJack Xiao2019-06-211-0/+13
| | | | | | | | | | | | | | | | | | | | | 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/amdgpu/psp: convert ucode id to psp ucode idJack Xiao2019-06-211-0/+6
| | | | | | | | | | | | | | | | | | | | | Convert ucode id to the corresponding psp ucode id. Signed-off-by: Jack Xiao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | | drm/amdgpu: load smc ucode at first with psp while rlc auto load is supportedHuang Rui2019-06-211-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch loades smc ucode at first with psp while rlc auto load is supported on navi10. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | | drm/amdgpu/psp: skip mec jt when autoload is enabledHawking Zhang2019-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When autoload is enabled, there is no need to load mec jt, RLC will handle it automatically 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: initialize autoload_supported flag in psp_sw_initHawking Zhang2019-06-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RLC autoload is supported since from 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: perform tmr_init and asd_init after loading sysdrv/sosHawking Zhang2019-06-211-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since from navi10, the tmr_size should be decided by psp sos according to toc header. Driver should issue LOAD_TOC to psp sos to get the tmr_size needed. The allocation of tmr_size then should be done only when sos/sysdrv loading completed Accordingly, asd_init also move to psp_hw_start after sos fw loading to make calling sequence consistent. Signed-off-by: Hawking Zhang <[email protected]> Acked-by: Alex Deucher <[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/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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: add support to load TOC to pspHawking Zhang2019-06-211-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the new load TOC command. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Le Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | | drm/amdgpu: Add psp 11.0 support for navi10.Tao Zhou2019-06-211-0/+1
|/ / | | | | | | | | | | | | | | | | Add psp 11.0 code for navi10. psp 11.0 is not enabled for now. Will enable it when psp 11.0 firmware is available. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | Merge branch 'drm-next-5.3' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2019-05-311-0/+28
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next New stuff for 5.3: - Add new thermal sensors for vega asics - Various RAS fixes - Add sysfs interface for memory interface utilization - Use HMM rather than mmu notifier for user pages - Expose xgmi topology via kfd - SR-IOV fixes - Fixes for manual driver reload - Add unique identifier for vega asics - Clean up user fence handling with UVD/VCE/VCN blocks - Convert DC to use core bpc attribute rather than a custom one - Add GWS support for KFD - Vega powerplay improvements - Add CRC support for DCE 12 - SR-IOV support for new security policy - Various cleanups From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/amdgpu: implement PSP cmd GFX_CMD_ID_PROG_REGTrigger Huang2019-05-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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: skip fw pri bo alloc for SRIOVYintian Tao2019-05-201-7/+10
|/ | | | | | | | | | | | | | PSP fw primary buffer is not used under SRIOV. Under SRIOV, VBIOS or hypervisor driver will load psp sos and psp sysdrv. Therefore, we don't need to allocate memory for it. v2: remove superfluous check for amdgpu_bo_free_kernel(). Signed-off-by: Yintian Tao <[email protected]> Signed-off-by: Monk Liu <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: move psp version specific function pointers to early_initAlex Deucher2019-05-091-9/+10
| | | | | | | | | | In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time. Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
* drm/amdgpu: Adjust TMR address alignment as per HW requirementshaoyunl2019-04-031-3/+3
| | | | | | | | | According to HW engineer, they prefer the TMR address be "naturally aligned", e.g. the start address must be an integer divide of TME size. Signed-off-by: shaoyunl <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: defer cmd/fence/fw buffers destroy on hw_init failureEvan Quan2019-03-281-19/+12
| | | | | | | | | As the cleanup jobs performed in pre_fini may still need these buffers. NULL pointer dereference will be triggered without them. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add more debug friendly promptsEvan Quan2019-03-281-10/+28
| | | | | | | | | Large piece of codes share one error prompt. That is not friendly for debugging. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: Fix NULL pointer when ta is missingxinhui pan2019-03-191-9/+15
| | | | | | | | Ta is optional, so check if ta firmware is loaded or not. Signed-off-by: xinhui pan <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu: add psp cmd submit timeoutxinhui pan2019-03-191-1/+5
| | | | | | 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/+214
| | | | | | | | | | | | 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]>
* Merge v5.0-rc7 into drm-nextDave Airlie2019-02-181-2/+7
|\ | | | | | | | | | | Backmerging for nouveau and imx that needed some fixes for next pulls. Signed-off-by: Dave Airlie <[email protected]>
| * drm/amdgpu/psp11: TA firmware is optional (v3)Alex Deucher2019-02-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | Don't warn or fail if it's missing. v2: handle xgmi case more gracefully. v3: handle older kernels properly Reviewed-by: Hawking Zhang <[email protected]> Tested-by: James Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amdgpu: check PSP support before adding the ip blockEvan Quan2019-01-251-24/+0
| | | | | | | | | | | | | | | | So that we do not need to check this in every internal function. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amdgpu/psp: ignore psp response statusAaron Liu2019-01-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, psp response status is not 0 even there is no problem while the command is submitted. Some version of PSP FW doesn't write 0 to that field. So here we would like to only print a warning instead of an error during psp initialization to avoid breaking hw_init and it doesn't return -EINVAL. Signed-off-by: Aaron Liu <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Xiangliang Yu<[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Reviewed-by: Paul Menzel <[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-1/+93
| | | | | | | | | | | | | | | | | | 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: psp_ring_destroy cause psp->km_ring.ring_mem NULLwentalou2019-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | psp_ring_destroy inside psp_load_fw cause psp->km_ring.ring_mem NULL. Call Trace occurred when psp_cmd_submit. should be psp_ring_stop instead. Reviewed-by: Xiangliang Yu <[email protected]> Signed-off-by: Wentao Lou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amdgpu/psp: Fix can't detect psp INVOKE command failedXiangliang Yu2019-01-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | There isn't ucode when executing INVOKE command, so current code can't check the failure of INVOKE command. Remove the ucode check. Signed-off-by: Xiangliang Yu <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* | drm/amdgpu/psp: Fix to get wrong xgmi session idXiangliang Yu2019-01-141-0/+3
|/ | | | | | | | | | | | Driver get session id after loading TA FW and the session id is used by driver instances to communicate with TA. PF and VF have different session id. xGMI session id should get from response buffer, correct it. Signed-off-by: Xiangliang Yu <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: Correct and refine the vmr support. (v2)Emily Deng2018-12-141-8/+0
| | | | | | | | | | 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: Destroy psp ring when doing gpu resetXiangliang Yu2018-12-071-1/+3
| | | | | | | | | | PSP ring need to be destroy before starting reinit for vf. This patche move it from hypervisor driver into guest. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: Frank Min <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* drm/amdgpu/psp: Add support VMR ring for VFXiangliang Yu2018-12-071-3/+15
| | | | | | | | | | | 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: initialize xgmi session (v2)Hawking Zhang2018-11-061-0/+69
| | | | | | | | | | | | | | | Setup and tear down xgmi as part of psp. v2: - make psp_xgmi_terminate static - squash in: drm/amdgpu: only issue xgmi cmd when it is enabled drm/amdgpu/psp: terminate xgmi ta in suspend and hw_fini phase 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 helper function to invoke xgmi ta per ta cmd_idHawking Zhang2018-11-061-0/+36
| | | | | | | | | 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 helper function to load/unload xgmi taHawking Zhang2018-11-061-0/+98
| | | | | | | | | Add helper functions for the psp xgmi ta. 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: init/de-init xgmi ta microcodeHawking Zhang2018-11-061-0/+2
| | | | | | | | Add ucode handling for psp xgmi ta firmware. 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-7/+11
| | | | | | | | | | | 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: Remove amdgpu_ucode_fini_boRex Zhu2018-10-101-2/+0
| | | | | | | | The variable clean is unnecessary. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>