OSDN Git Service

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)
commit8c7a5d9e6f141aa48473f15ac271c75688404ba8
tree49b43c919204ba2c8cc5fd5a73f8ed7cdaea6438
parent5f4814deab509e4d0a52e4a0b016d49a75b2cf7c
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