Alex Deucher
a2e4b418c6
drm/amdgpu/psp: declare navi1x ta firmware
...
So that it gets included in the initrd. At the moment
this is optional firmware that contains support for HDCP.
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-14 10:18:58 -05:00
John Clements
097dc53ee9
drm/amdgpu: added function to wait for PSP BL availability
...
reduced duplicate code
increased wait time for PSP BL readiness
Signed-off-by: John Clements <john.clements@amd.com >
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-01-07 11:58:50 -05:00
Bhawanpreet Lakha
a7f4ba7a6c
drm/amd/display: Load TA firmware for navi10/12/14
...
load the ta firmware for navi10/12/14.
This is already being done for raven/picasso and
is needed for supporting hdcp on navi
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-12-02 17:39:13 -05:00
Hawking Zhang
5bdd0b72d6
drm/amdgpu: switch to common helper func for psp cmd submission
...
Drop all the IP specific cmd_submit callback function
and use the common helper instead
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: John Clements <john.clements@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-11-19 12:09:13 -05:00
Hawking Zhang
13a390a6f9
drm/amdgpu: add psp funcs for ring write pointer read/write
...
The ring write pointer regsiter update is the only part that
is IP specific ones in psp_cmd_submit function.
Add two callbacks for wptr read/write so that we unify the
psp_cmd_submit function for all the ASICs.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: John Clements <john.clements@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-11-19 12:08:58 -05:00
Xiaojie Yuan
73469970a9
drm/amdgpu/psp11: fix typo in comment
...
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-25 16:50:07 -04:00
Xiaojie Yuan
d7e7f1ea25
drm/amdgpu/psp11: wait for sOS ready for ring creation
...
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-25 16:50:07 -04:00
Tianci.Yin
367039bfb6
drm/amdgpu/psp: add psp memory training implementation(v3)
...
add memory training implementation code to save resume time.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com >
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-17 16:31:54 -04:00
Tianci.Yin
a7d4c920f8
drm/amdgpu: introduce psp_v11_0_is_sos_alive interface(v2)
...
introduce psp_v11_0_is_sos_alive func for common use.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com >
Signed-off-by: Tianci.Yin <tianci.yin@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-17 16:31:19 -04:00
Alex Deucher
e8186eeccb
drm/amdgpu/psp: flush HDP write fifo after submitting cmds to the psp
...
We need to make sure the fifo is flushed before we ask the psp to
process the commands.
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-10-03 09:10:59 -05:00
Jack Zhang
51c0f58e9f
drm/amdgpu/sriov: add ring_stop before ring_create in psp v11 code
...
psp v11 code missed ring stop in ring create function(VMR)
while psp v3.1 code had the code. This will cause VM destroy1
fail and psp ring create fail.
For SIOV-VF, ring_stop should not be deleted in ring_create
function.
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-09-16 10:11:28 -05:00
John Clements
4fb60b02fb
drm/amdgpu: enable TA load support in Arcturus
...
Add support for loading XGMI/RAS FW
Signed-off-by: John Clements <john.clements@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-09-13 17:49:02 -05:00
Xiaojie Yuan
50e275e880
drm/amdgpu: remove redundant argument for psp_funcs::cmd_submit callback
...
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-21 22:16:37 -05:00
Xiaojie Yuan
739cdbd6a2
drm/amdgpu/psp11: add psp support for navi12
...
Same as other navi asics.
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:30:41 -05:00
John Clements
dc0d962297
drm/amdgpu: add PSP KDB loading support for Arcturus
...
Add support for the arcturus specific psp metadata to the
amdgpu firmware and properly parse it when loading it.
Signed-off-by: John Clements <john.clements@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:30:39 -05:00
John Clements
f36d9ab95f
drm/amdgpu: add PSP SW init support for Arcturus
...
Add arcturus cases to psp init sewquence.
Signed-off-by: John Clements <john.clements@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-08-02 10:30:39 -05:00
Xiaojie Yuan
8687b47e3a
drm/amdgpu: declare asd firmware for navi14
...
So the dependency gets properly tracked.
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Snow Zhang <snow.zhang@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:00 -05:00
Xiaojie Yuan
e470d287c3
drm/amdgpu: skip to load ta firmware for navi14
...
Not relevant on navi14.
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:18:00 -05:00
Xiaojie Yuan
82522b2d7f
drm/amdgpu/psp: add psp support for navi14 (v3)
...
Same as navi10.
v2: squash in logic fix (Colin Ian King)
v3: squash in logic simplification (Alex)
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Snow Zhang <Snow.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-18 14:17:59 -05:00
Hawking Zhang
4298935924
drm/amdgpu: support key database loading for navi10
...
Starting from navi10, driver should send Key Database Load command
to bootloader before loading sys_drv and sos
Signed-off-by: John Clements <John.Clements@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-12 08:00:10 -05:00
Hawking Zhang
3840fe256a
drm/amdgpu: switch to macro for psp bootloader command
...
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 <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-12 08:00:10 -05:00
Alex Deucher
173da95d93
drm/amdgpu/psp11: simplify the ucode register logic
...
Split it between navi10 and newer and everything before
navi10.
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-08 14:01:30 -05:00
Alex Deucher
d7929c1e13
Merge branch 'drm-next' into drm-next-5.3
...
Backmerge drm-next and fix up conflicts due to drmP.h removal.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-25 08:42:25 -05:00
Hawking Zhang
a954f3ffc7
drm/amdgpu/psp11: skip ta firmware for navi10
...
Not used on Navi10.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:50 -05:00
Hawking Zhang
a698faf862
drm/amdgpu: declare navi10 asd firmware
...
So the dependencies are properly handled.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:50 -05:00
Hawking Zhang
5160709d45
drm/amdgpu/psp: switch to use sos_offset_bytes member as sys_bin_size
...
Navi10 will have toc built-in sos binary so that using header.ucode_size_bytes
minus sos_size_bytes actually is not sys_bin_size.
Using sos_offset_bytes works for both vega20 (psp_firmware_header_v1_0) and
navi10 (psp_firmware_header_v1_1)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:50 -05:00
Hawking Zhang
1a5b4cca29
drm/amdgpu/psp: start rlc autoload after psp recieved all gfx firmware
...
RLC handles firmware loading for gfx to support vddgfx feature.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Le Ma <Le.Ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:50 -05:00
Hawking Zhang
37e919180c
drm/amdgpu/psp: print out psp v11 ucode hdr in drm debug mode
...
Print the psp header data if requested.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Le Ma <Le.Ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:49 -05:00
Hawking Zhang
93d8f2221b
drm/amdgpu/psp: support init psp sos microcode with build-in toc
...
psp_firmware_header_v1_1 is used for psp sos with build-in toc
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Le Ma <Le.Ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:49 -05:00
Tao Zhou
bc290fe552
drm/amdgpu: Add psp 11.0 support for navi10.
...
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 <Tao.Zhou1@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:46:49 -05:00
Sam Ravnborg
f867723b41
drm/amd: drop use of drmP.h in amdgpu.h
...
Delete the unused drmP.h from amdgpu.h.
Fix fallout in various files.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-5-sam@ravnborg.org
2019-06-10 22:59:53 +02:00
shaoyunl
b0960c3592
drm/amdgpu: Always enable memory sharing within same XGMI hive
...
XGMI Memory sharing will be disbaled by default for security reason after
boot up, it depends on driver to enable the memory sharing
Signed-off-by: shaoyunl <shaoyun.liu@amd.com >
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-04-10 13:53:27 -05:00
xinhui pan
3ea8fb8c80
drm/amdgpu: add psp v11 ras callback
...
Add trigger_error and cure_posion.
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: xinhui pan <xinhui.pan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-03-19 15:36:50 -05:00
xinhui pan
c6eec90219
drm/amdgpu: add ta ras fw info (v2)
...
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 <xinhui.pan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-03-19 15:36:50 -05:00
Christian König
b849aaa41c
drm/amdgpu: also reroute VMC and UMD to IH ring 1 on Vega 20
...
Same patch we alredy did for Vega10. Just re-route page faults to a separate
ring to avoid drowning in interrupts.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-03-19 15:04:04 -05:00
Dave Airlie
c06de56121
Merge v5.0-rc7 into drm-next
...
Backmerging for nouveau and imx that needed some fixes for next pulls.
Signed-off-by: Dave Airlie <airlied@redhat.com >
2019-02-18 13:27:15 +10:00
Alex Deucher
1d69511e49
drm/amdgpu/psp11: TA firmware is optional (v3)
...
Don't warn or fail if it's missing.
v2: handle xgmi case more gracefully.
v3: handle older kernels properly
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-02-13 09:44:05 -05:00
Hawking Zhang
be4630d962
drm/amdgpu/psp: make get_fw_type and prep_cmd_buf to be common interfaces
...
get_fw_type and prep_cmd_buf should be common interface
instead of IP specific ones
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-01-14 15:04:51 -05:00
Evan Quan
06d6370e7b
drm/amdgpu: add Vega20 PSP ASD firmware loading
...
Add PSP ASD firmware loading on Vega20. Not sure why
this was missing before.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2018-12-21 15:26:49 -05:00
Evan Quan
379c237e39
drm/amdgpu: correct the return value for error case
...
It should not return 0 for error case as '0' is actually
a special value for index.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-12-18 17:39:18 -05:00
Emily Deng
e27a73d130
drm/amdgpu/psp: Correct and refine the vmr support. (v2)
...
Currently driver only psp v11 support vmr.
v2: squash in unused variable removal (Alex)
Signed-off-by: Emily Deng <Emily.Deng@amd.com >
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-12-14 12:04:39 -05:00
Xiangliang Yu
5ec996dfb6
drm/amdgpu/psp: Add support VMR ring for VF
...
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 <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-12-07 17:53:46 -05:00
Xiangliang Yu
d63cda5bfc
drm/amdgpu/psp: Get psp fw version through reading register
...
If PSP FW is running already, driver will not load PSP FW again and skip
it. So psp fw version is not correct if reading it from FW binary file,
need to get right version from register.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-12-07 17:53:46 -05:00
Andrey Grodzovsky
38cd8a280d
drm/amdgpu/psp: Update waiting in psp mode1 reset.
...
No point in use mdelay unless running from interrupt context (which we are not)
This is busy wait which will block the CPU for the entirety of the wait time.
Also, reduce wait time to 500ms as it is done in refernce code because
1s might cause PSP FW TO issues during XGMI hive reset.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-12-03 11:15:00 -05:00
Hawking Zhang
bb8310cc22
drm/amdgpu/psp: add set_topology_info function
...
set_topology_info is used for driver to set current topology info
to xgmi ta
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-06 14:02:46 -05:00
Hawking Zhang
ec1a975e0b
drm/amdgpu/psp: add get_topology_info function
...
get_topology_info function is used for driver to query topology_info
for current device from xgmi ta
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-06 14:02:45 -05:00
Hawking Zhang
4b93151f57
drm/amdgpu/psp: add get_hive_id function
...
get_hive_id is used for driver to query hive_id for current device
from xgmi ta
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-06 14:02:44 -05:00
Hawking Zhang
dd3c45d306
drm/amdgpu/psp: add get_node_id function
...
get_node_id function is used for driver to get node_id
for current device from xgmi ta
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-06 14:02:43 -05:00
Hawking Zhang
51e7177f36
drm/amdgpu/psp: init/de-init xgmi ta microcode
...
Add ucode handling for psp xgmi ta firmware.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-06 14:02:40 -05:00
John Clements
548f2ecc33
drm/amdgpu: Revised PSP comments
...
Revised comments in PSP SOS/Sysdriver loading sequence
Signed-off-by: John Clements <clements.jm@gmail.com >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-11-05 14:21:00 -05:00