drm/amdgpu: Modify indirect buffer packages for resubmission
authorJiadong Zhu <Jiadong.Zhu@amd.com>
Thu, 25 May 2023 08:52:55 +0000 (16:52 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:44:15 +0000 (12:44 -0400)
commit8ff865be93e642d0ad66ca7369f42fbe36dc6a90
treec6de1533439c2197223301112f6071d32add4e08
parentf2bcc0c7db0c004f0184675e7862648e8aa197f9
drm/amdgpu: Modify indirect buffer packages for resubmission

When the preempted IB frame resubmitted to cp, we need to modify the frame
data including:
1. set PRE_RESUME 1 in CONTEXT_CONTROL.
2. use meta data(DE and CE) read from CSA in WRITE_DATA.

Add functions to save the location the first time IBs emitted and callback
to patch the package when resubmission happens.

Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h