Sunil Khatri
2239aaa204
drm/amdgpu: add vcn_v2_0 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v2_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:36 -04:00
Sunil Khatri
ef9f3b5fd9
drm/amdgpu: add print support for vcn_v1_0 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v1_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:31 -04:00
Sunil Khatri
837cc7f1bf
drm/amdgpu: add vcn_v1_0 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v1_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:25 -04:00
Sunil Khatri
439c3b124e
drm/amdgpu: add print support for vcn_v4_0_5 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v4_0_5.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:19 -04:00
Sunil Khatri
3a50a51d04
drm/amdgpu: add print support for vcn_v4_0 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v4_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:12 -04:00
Sunil Khatri
dc57edda81
drm/amdgpu: add print support for vcn_v4_0_3 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v4_0_3.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:26:06 -04:00
Sunil Khatri
46553db49c
drm/amdgpu: add vcn_v4_0_5 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v4_0_5.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:59 -04:00
Sunil Khatri
9d87dac3f9
drm/amdgpu: add vcn_v4_0 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v4_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:53 -04:00
Sunil Khatri
8962915044
drm/amdgpu: add vcn_v4_0_3 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v4_0_3.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:30 -04:00
Sunil Khatri
f3c958ab85
drm/amdgpu: add print support for vcn_v5_0 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v5_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:12 -04:00
Alex Deucher
32aada4d0a
drm/amdgpu/mes12: add API for user queue reset
...
Add API for resetting user queues.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:09 -04:00
Alex Deucher
d4f1fde734
drm/amdgpu/mes11: add API for user queue reset
...
Add API for resetting user queues.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:06 -04:00
Alex Deucher
5b7a59de48
drm/amdgpu/mes: add API for user queue reset
...
Add API for resetting user queues.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:25:02 -04:00
Alex Deucher
478efcb90b
drm/amdgpu/gfx11: export gfx_v11_0_request_gfx_index_mutex()
...
It will be used by the queue reset code.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:56 -04:00
Alex Deucher
76acba7b7f
drm/amdgpu/gfx11: add a mutex for the gfx semaphore
...
This will be used in more places in the future so
add a mutex.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:33 -04:00
Alex Deucher
b5be054c58
drm/amdgpu/gfx11: enter safe mode before touching CP_INT_CNTL
...
Need to enter safe mode before touching GC MMIO.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:23 -04:00
Alex Deucher
d479158f65
drm/amdgpu/gfx7: add ring reset callback for gfx
...
Add ring reset callback for gfx.
v2: fix operator precedence (kernel test robot)
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:18 -04:00
Alex Deucher
4af8071b65
drm/amdgpu/gfx8: add ring reset callback for gfx
...
Add ring reset callback for gfx.
v2: fix operator precedence (kernel test robot)
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:09 -04:00
Sunil Khatri
f685b38455
drm/amdgpu: add vcn_v5_0 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v5_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:24:04 -04:00
Sunil Khatri
6d88c0f94a
drm/amdgpu: add print support for vcn_v3_0 ip dump
...
Add support for logging the registers in devcoredump
buffer for vcn_v3_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:23:59 -04:00
Sunil Khatri
ab10f77487
drm/amdgpu: add vcn_v3_0 ip dump support
...
Add support of vcn ip dump in the devcoredump
for vcn_v3_0.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:23:53 -04:00
Sunil Khatri
27a74c125d
drm/amdgpu: add vcn ip dump ptr in vcn global struct
...
Add pointer to the vcn ip dump in the vcn global structure
to be accessible for all vcn version via global adev.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:23:45 -04:00
Zhang Zekun
20588d5afc
drm/amd: Remove unused declarations
...
amdgpu_gart_table_vram_pin() and amdgpu_gart_table_vram_unpin() has
been removed since commit 575e55ee4f ("drm/amdgpu: recover gart table
at resume") remain the declarations untouched in the header files.
Besides, amdgpu_dm_display_resume() has also beed removed since
commit a80aa93de1 ("drm/amd/display: Unify dm resume sequence into a
single call"). So, let's remove this unused declarations.
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:23:16 -04:00
Yang Wang
89ec85d16e
drm/amdgpu: fixing rlc firmware loading failure issue
...
Skip rlc firmware validation to ignore firmware header size mismatch issues.
This restores the workaround added in
commit 849e133c97 ("drm/amdgpu: Fix the null pointer when load rlc firmware")
Fixes: 3af2c80ae2 ("drm/amdgpu: refine gfx10 firmware loading")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3551
Signed-off-by: Yang Wang <kevinyang.wang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:19:16 -04:00
Sunil Khatri
0f2c243dbf
drm/amdgpu: remove ME0 registers from mi300 dump
...
Remove ME0 registers from MI300 gfx_9_4_3 ipdump
MI300 does not have gfx ME and hence those register
are just empty one and could be dropped.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:54 -04:00
Alex Deucher
3ec2ad7c34
drm/amdgpu/gfx9: use rlc safe mode for soft recovery
...
Protect the MMIO access with safe mode.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:51 -04:00
Alex Deucher
d082e5cde4
drm/amdgpu/gfx9.4.3: use rlc safe mode for soft recovery
...
Protect the MMIO access with safe mode.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:46 -04:00
Alex Deucher
a48f31fb78
drm/amdgpu/gfx9.4.3: use proper rlc safe mode helpers
...
Rather than open coding it for the queue reset.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:44 -04:00
Alex Deucher
27ef61f961
drm/amdgpu/gfx9: use proper rlc safe mode helpers
...
Rather than open coding it for the queue reset.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:41 -04:00
Alex Deucher
c4f503551f
drm/amdgpu/gfx9: add ring reset callback for gfx
...
Add ring reset callback for gfx.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:38 -04:00
Alex Deucher
31ef969301
drm/amdgpu/gfx9: per queue reset only on bare metal
...
It's not supported under SR-IOV at the moment.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:35 -04:00
Jiadong Zhu
4dc4422f11
drm/amdgpu/gfx9.4.3: implement reset_hw_queue for gfx9.4.3
...
Using mmio to do queue reset. Enter safe mode
before writing mmio registers.
v2: set register instance offset according to xcc id.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:30 -04:00
Jiadong Zhu
2e9bbdd7b7
drm/amdgpu/gfx9: implement reset_hw_queue for gfx9
...
Using mmio to do queue reset. Enter safe mode
when writing registers.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:27 -04:00
Jiadong Zhu
186020c166
drm/amdgpu/gfx: add a new kiq_pm4_funcs callback for reset_hw_queue
...
Add reset_hw_queue in kiq_pm4_funcs callbacks.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:25 -04:00
Jiadong Zhu
4c953e53cc
drm/amdgpu/gfx_9.4.3: wait for reset done before remap
...
There is a racing condition that cp firmware modifies
MQD in reset sequence after driver updates it for
remapping. We have to wait till CP_HQD_ACTIVE becoming
false then remap the queue.
v2: fix KIQ locking (Alex)
v3: fix KIQ locking harder
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:22 -04:00
Jiadong Zhu
6f38589e17
drm/amdgpu/gfx9.4.3: remap queue after reset successfully
...
Kiq command unmap_queues only does the dequeueing action.
We have to map the queue back with clean mqd.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:19 -04:00
Alex Deucher
5d0112f777
drm/amdgpu/gfx9.4.3: add ring reset callback
...
Add ring reset callback for compute.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:14 -04:00
Jiadong Zhu
fdbd69486b
drm/amdgpu/gfx9: wait for reset done before remap
...
There is a racing condition that cp firmware modifies
MQD in reset sequence after driver updates it for
remapping. We have to wait till CP_HQD_ACTIVE becoming
false then remap the queue.
v2: fix KIQ locking (Alex)
v3: fix KIQ locking harder
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:06 -04:00
Jiadong Zhu
b5e1a3874f
drm/amdgpu/gfx9: remap queue after reset successfully
...
Kiq command unmap_queues only does the dequeueing action.
We have to map the queue back with clean mqd.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:03 -04:00
Alex Deucher
5fb4d2a771
drm/amdgpu/gfx9: add ring reset callback
...
Add ring reset callback for compute.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:18:00 -04:00
Prike Liang
fb0a5834a3
drm/amdgpu: increase the reset counter for the queue reset
...
Update the reset counter for the amdgpu_cs_query_reset_state()
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Prike Liang <Prike.Liang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:56 -04:00
Alex Deucher
15789fa0f0
drm/amdgpu: add per ring reset support (v5)
...
If a specific job is hung, try and reset just the
ring associated with the job.
v2: move to amdgpu_job.c
v3: fix drm_sched_stop() handling when ring reset fails
v4: drop unnecessary amdgpu_fence_driver_clear_job_fences() and
drm_sched_increase_karma()
v5: rework sched_stop handling
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:52 -04:00
Alex Deucher
57a372f676
drm/amdgpu: add new ring reset callback
...
Use this to reset just a single ring.
Acked-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:40 -04:00
Soham Dandapat
406792dc2a
drm/amdgpu: Return earlier in amdgpu_sw_ring_ib_end if mcbp is off
...
As we don't trigger preemption is sw ring muxer when mcbp is
disabled,so return earlier in amdgpu_sw_ring_ib_end function
if mcbp is disabled ,not required to call amdgpu_ring_mux_end_ib
Signed-off-by: Soham Dandapat <sdandapa@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:31 -04:00
Sunil Khatri
37ee145623
drm/amdgpu: add cp queue registers print for gfx9_4_3
...
Add gfx9_4_3 print support of CP queue registers
for all queues to be used by devcoredump.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:26 -04:00
Sunil Khatri
f9e491c863
drm/amdgpu: add cp queue registers for gfx9_4_3 ipdump
...
Add gfx9 support of CP queue registers for all queues
to be used by devcoredump.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2024-08-16 14:17:14 -04:00
Thomas Zimmermann
ddda6542c8
drm/amdgpu: Use backlight power constants
...
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: "Christian König" <christian.koenig@amd.com >
Cc: Xinhui Pan <Xinhui.Pan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240731122311.1143153-2-tzimmermann@suse.de
2024-08-16 09:27:15 +02:00
Kenneth Feng
23acd1f344
drm/amd/amdgpu: add HDP_SD support on gc 12.0.0/1
...
add HDP_SD support on gc 12.0.0/1
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Yang Wang <kevinyang.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
(cherry picked from commit 61cffacb3a )
2024-08-13 13:20:43 -04:00
Yinjie Yao
507a2286c0
drm/amdgpu: Update kmd_fw_shared for VCN5
...
kmd_fw_shared changed in VCN5
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
(cherry picked from commit aa02486fb1 )
2024-08-13 13:20:36 -04:00
David (Ming Qiang) Wu
470516c292
drm/amd/amdgpu: command submission parser for JPEG
...
Add JPEG IB command parser to ensure registers
in the command are within the JPEG IP block.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
(cherry picked from commit a7f670d5d8 )
Cc: stable@vger.kernel.org
2024-08-13 13:17:36 -04:00