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>
Tue, 13 Jun 2023 20:57:44 +0000 (16:57 -0400)
commit87af86ae89963c227a3beb4d914f3dc7959a690e
tree97a7f043ff5c2c012617bfa600babad810bb7781
parent94034b306ddde4a4a9c1a597ae7f61f04b710dc7
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>
Cc: stable@vger.kernel.org # 6.3.x
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