Sunil Khatri
40356542c3
drm/amdgpu: add protype for print ip state
...
Add the protoype for print ip state to be used
to print the registers in devcoredump during
a gpu reset.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-04-26 17:22:39 -04:00
Sunil Khatri
e21d253bd7
drm/amdgpu: add prototype for ip dump
...
Add the prototype to dump ip registers
for all ips of different asics and set
them to NULL for now. Based on the
requirement add a function pointer for
each of them.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-04-26 17:22:39 -04:00
Saleemkhan Jamadar
6a7cbbc267
drm/amdgpu/vcn: enable vcn1 fw load for VCN 4_0_6
...
v1 - update the fw header for each vcn instance (Veera)
VCN1 has different FW binary in VCN v4_0_6.
Add changes to load the VCN1 fw binary
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com >
Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-03-20 13:12:57 -04:00
Hawking Zhang
f2176d7063
drm/amdgpu: Add UVD_VCPU_INT_EN2 to dpg sram
...
Add RAS sepcifc programming to dpg sram.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-10-20 15:11:27 -04:00
Samir Dhume
dd12b858c2
drm/amdgpu/vcn: Skip vcn power-gating change for sriov
...
CG/PG is handled on the host side.
Signed-off-by: Samir Dhume <samir.dhume@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-08-16 11:33:59 -04:00
Samir Dhume
d117fd2964
drm/amdgpu/vcn: sriov support for vcn_v4_0_3
...
initialization table handshake with mmsch
Signed-off-by: Samir Dhume <samir.dhume@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-08-15 18:08:28 -04:00
Samir Dhume
a31c114bcf
drm/amdgpu/vcn: mmsch_v4_0_3 requires doorbell on 32 byte boundary
...
Align on 32 byte boundary.
Signed-off-by: Samir Dhume <samir.dhume@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-08-15 18:08:27 -04:00
Ruan Jinjie
3b780089fd
drm/amdgpu: Remove a lot of unnecessary ternary operators
...
There are many ternary operators, the true or false judgement
of which is unnecessary in C language semantics.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-08-09 09:39:56 -04:00
Lang Yu
1ddcdb7cb6
drm/amdgpu: use psp_execute_load_ip_fw instead
...
Replace the old ones with psp_execute_load_ip_fw.
Suggested-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Lang Yu <Lang.Yu@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-07-12 11:12:09 -04:00
Jiapeng Chong
1fbc69b8f5
drm/amdgpu/vcn: Modify mismatched function name
...
No functional modification involved.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:374: warning: expecting prototype for vcn_v4_0_mc_resume_dpg_mode(). Prototype was for vcn_v4_0_3_mc_resume_dpg_mode() instead.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:631: warning: expecting prototype for vcn_v4_0_enable_clock_gating(). Prototype was for vcn_v4_0_3_enable_clock_gating() instead.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=5284
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 10:54:37 -04:00
Alex Deucher
0ce50b2efe
drm/amdgpu/vcn4: fix endian conversion
...
sq.is_enabled is a byte so there is no need to endian swap it.
Acked-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 10:37:59 -04:00
Hawking Zhang
85f23b0a8c
drm/amdgpu: Re-enable VCN RAS if DPG is enabled
...
VCN RAS enablement sequence needs to be added in
DPG HW init sequence.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:58:22 -04:00
Hawking Zhang
c3f05ab8c4
drm/amdgpu: Initialize vcn v4_0_3 ras function
...
Initialize vcn v4_0_3 ras function
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:58:20 -04:00
Hawking Zhang
6d39fa3fc8
drm/amdgpu: Add reset_ras_error_count for vcn v4_0_3
...
Add reset_ras_error_count callback for vcn v4_0_3.
It will be used to reset vcn ras error count.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:58:17 -04:00
Hawking Zhang
5e1e227fb7
drm/amdgpu: Add query_ras_error_count for vcn v4_0_3
...
Add query_ras_error_count callback for vcn v4_0_3.
It will be used to query and log vcn error count.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:58:15 -04:00
Sonny Jiang
96e693ad78
drm/amdgpu: Add a read after write DB_CTRL for vcn_v4_0_3
...
To make sure VCN DB_CTRL is delivered before doorbell write.
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:56:26 -04:00
James Zhu
358e6c3830
drm/amdgpu: use physical AID index for ring name
...
Use physical AID index for VCN/JPEG ring name instead of
logical AID index.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:56:13 -04:00
James Zhu
d3e53452b0
drm/amdgpu/vcn: use dummy register selects AID for VCN_RAM ucode
...
Use dummy register 0xDEADBEEF selects AID for PSP VCN_RAM ucode.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:56:10 -04:00
Lijo Lazar
fd91d38b52
drm/amdgpu: Use logical ids for VCN/JPEG v4.0.3
...
Address VCN/JPEG instances using logical ids. Whenever register access is
required, get the physical instance using GET_INST.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:56:06 -04:00
Sonny Jiang
48d19834ea
drm/amdgpu: Load vcn_v4_0_3 ucode during early_init
...
VCN loading ucode is moved to early_init with using 'amdgpu_ucode_*'
helpers.
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Sonny Jiang <sonjiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:55:56 -04:00
James Zhu
f471de2586
drm/amdgpu: vcn_v4_0_3 load vcn fw once for all AIDs
...
Signed-off-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:51:48 -04:00
James Zhu
da044aaeb3
drm/amdgpu: add unified queue support on vcn_v4_0_3
...
Add unified queue support on vcn_v4_0_3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:51:27 -04:00
James Zhu
2d7f1d51c1
drm/amdgpu: add fwlog support on vcn_v4_0_3
...
Add fwlog support on vcn_v4_0_3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:51:24 -04:00
James Zhu
762702ebd3
drm/amdgpu/vcn: add vcn multiple AIDs support
...
add vcn multiple AIDs support.
v2: squash in FW setting fix (Alex)
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:46:07 -04:00
James Zhu
7229bd6fe0
drm/amdgpu/vcn: update clock gate setting for VCN 4.0.3
...
Update clock gate setting.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:46:05 -04:00
James Zhu
cf1f3737c2
drm/amdgpu/vcn: update amdgpu_fw_shared to amdgpu_vcn4_fw_shared
...
Use amdgpu_vcn4_fw_shared for vcn 4.0.3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:45:05 -04:00
James Zhu
7f0af02ab3
drm/amdgpu/vcn: remove unused code
...
Remove unused code.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:45:02 -04:00
James Zhu
429a111851
drm/amdgpu/vcn: update ucode setup
...
Use common amdgpu_vcn_setup_ucode for ucode setup.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:45:00 -04:00
James Zhu
53054e9a77
drm/amdgpu/vcn: update new doorbell map
...
New doorbell map is used for VCN 4.0.3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:44:57 -04:00
James Zhu
d244a4167a
drm/amdgpu/vcn: use vcn4 irqsrc header for VCN 4.0.3
...
Use vcn4 irqsrc header for VCN 4.0.3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:44:45 -04:00
James Zhu
ae972ed5e0
drm/amdgpu: fix vcn doorbell range setting
...
Should use vcn_ring0_1 instead of doorbell index to
set nbio doorbell range.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:42:02 -04:00
James Zhu
c21d446ba7
drm/amdgpu/vcn: enable vcn doorbell for vcn4.0.3
...
Enable vcn doorbell for vcn4.0.3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:41:57 -04:00
James Zhu
b889ef4ac9
drm/amdgpu/vcn: add vcn support for VCN4_0_3
...
Add vcn support for VCN4_0_3.
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2023-06-09 09:41:27 -04:00