]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: rework ring reset backup and reemit v9
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Jan 2026 03:01:15 +0000 (22:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Feb 2026 19:33:11 +0000 (14:33 -0500)
commita17ef941212bf26e9985ec31486a9606420d8257
treec5303b066efcf4659942067e6f85c84210e0de31
parentb43effe1887aa5b5ce43ccdfc3b05b3a4bdc5d96
drm/amdgpu: rework ring reset backup and reemit v9

Store the start wptr and ib size in the IB fence. On queue
reset, save the ring contents of all IBs.

For reemit, reemit the entire IB state for non-guilty contexts.
For guilty contexts, replace the IB submission with nops, but reemit
the rest.  Split the reemit per fence and when we reemit, update the
wptr with the new values from reemit.  This allows us to reemit jobs
repeatedly as the wptrs get properly updated each time.

v2: further simplify the logic
v3: reemit vm state, not just vm fence
v4: just nop the IB and possibly the VM portion of the submission
v5: simplify the vm fence check
v6: split the vm and ib fences
v7: fix commit message
v8: use wptr rather than count_dw to calculate offsets
v9: fix missing documenation update spotted by the kernel test robot

Reviewed-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h