summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorPrike Liang <Prike.Liang@amd.com>2026-10-15 15:14:36 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-11-04 12:47:55 -0500
commitb31014971d84ebd589338b68bcb4588f08931538 (patch)
tree2203905940ec46bb59978dff6042922ce935edd8 /tools/lib/python
parenta26ec190925733dd205507493e936e59dbcd2b19 (diff)
drm/amdgpu: stop GPU recovery wait for the JPEG/VCN idle work
The common JPEG and VCN idle workers program power gating and DPG pause, so they must not run while a GPU reset is in progress. Recovery must not wait for them either, since everything the workers depend on then becomes a dependency of GPU recovery. Make the workers take reset_domain->sem for read, so they wait for a running reset instead of touching the hardware. hw_fini/suspend, the hw_init error paths and begin_use, the latter for the IB tests, run from GPU recovery as well, so only skip waiting for the idle work when the reset itself calls them. The reset holds the semaphore for write and would otherwise deadlock on a worker blocked on it. Outside a reset the cancel stays synchronous as before. A device can also be torn down while a peer in its XGMI reset domain is being reset. hw_fini then doesn't wait for the worker either, and is skipped entirely if the peer's reset has already suspended the device. Cancel the idle work synchronously in early_fini, which only runs on teardown and before any hw_fini, so the worker is done before the hardware it touches is torn down. Teardown has drained the rings before early_fini, so nothing queues the work again and hw_fini only cancels it outside teardown, for suspend and GPU reset. The JPEG suspend and sw_fini callbacks no longer cancel it a second time; replace amdgpu_jpeg_suspend(), which only did that, with amdgpu_jpeg_cancel_idle_work() as on the VCN side. Update versions: v1: https://lists.freedesktop.org/archives/amd-gfx/2026-October/155441.html v2: https://lists.freedesktop.org/archives/amd-gfx/2026-October/156119.html v3: https://lists.freedesktop.org/archives/amd-gfx/2026-November/156456.html Signed-off-by: Prike Liang <Prike.Liang@amd.com> Cc: Leo Liu <leo.liu@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 945ef007af8cb720ee58bc5a19def034a7c8dd15)
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions