]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Use SQC when TCP would fail in gfx9 context save.
authorJay Cornwall <jay.cornwall@amd.com>
Tue, 23 Jul 2019 19:40:07 +0000 (14:40 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Jul 2019 04:19:47 +0000 (23:19 -0500)
commit45db537bd68ea8195e4ebacf616cec9a3a83a8e1
tree49b43c919204ba2c8cc5fd5a73f8ed7cdaea6438
parent436634f6033b8b9b8cc2b3d5938eba1da933c86c
drm/amdkfd: Use SQC when TCP would fail in gfx9 context save.

When a wavefront raises TRAPSTS.XNACK_ERROR with STATUS.ALLOW_REPLAY=0
subsequent memory instructions have undefined behavior. In practice
SQC stores continue to work but TCP stores do not.

Context save is permitted to fail after XNACK error because the
wavefront will be halted and subsequently terminated. However the
debugger has an interest in retrieving the wavefront VGPR/LDS state.

Detect the out-of-spec case and use SQC stores during context save
in place of TCP stores.

Signed-off-by: Jay Cornwall <jay.cornwall@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_gfx9.asm