]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: gfx12 context save/restore trap handler fixes
authorJay Cornwall <jay.cornwall@amd.com>
Thu, 23 May 2024 14:00:28 +0000 (09:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 14:57:40 +0000 (10:57 -0400)
commitfda812ebe3d95ed9c7c894b9a2d4bfc2926d46ec
tree0e7fbb929f9f7bd827bb4531f1ae77cb71edfe2c
parent813e7d4cd05e16fa578563e4c4e62f3de4ee34fc
drm/amdkfd: gfx12 context save/restore trap handler fixes

Fix LDS size interpretation: 512 bytes (>= gfx12) vs 256 (< gfx12).

Ensure STATE_PRIV.BARRIER_COMPLETE cannot change after reading or
before writing. Other waves in the threadgroup may cause this field
to assert if they complete the barrier.

Do not overwrite EXCP_FLAG_PRIV.{SAVE_CONTEXT,HOST_TRAP} when
restoring this register. Both of these fields can assert while the
wavefront is running the trap handler.

Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Lancelot Six <lancelot.six@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm