On Fri, Feb 21, 2025 at 06:08:52PM +0000, Lancelot SIX wrote:
It is possible for some waves in a workgroup to finish their save sequence before the group leader has had time to capture the workgroup barrier state. When this happens, having those waves exit do impact the barrier state. As a consequence, the state captured by the group leader is invalid, and is eventually incorrectly restored.
This patch proposes to have all waves in a workgroup wait for each other at the end of their save sequence (just before calling s_endpgm_saved).
This is a cherry-pick. The cwsr_trap_handler.h part of the original part was valid and applied cleanly. The part of the patch that applied to cwsr_trap_handler_gfx12.asm did not apply cleanly since 80ae55e6115ef "drm/amdkfd: Move gfx12 trap handler to separate file" is not part of this branch. Instead, I ported the change to cwsr_trap_handler_gfx10.asm, and guarded it with "ASIC_FAMILY >= CHIP_GFX12".
Signed-off-by: Lancelot SIX lancelot.six@amd.com Reviewed-by: Jay Cornwall jay.cornwall@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.12.x (cherry picked from commit d584198a6fe4c51f4aa88ad72f258f8961a0f11c) Signed-off-by: Lancelot SIX lancelot.six@amd.com
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 3 ++- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
What stable branch is this to be applied to?
thanks,
greg k-h