]> 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)
commit3443b625a42d1c997508f4adb464924d051f7bb5
tree49b43c919204ba2c8cc5fd5a73f8ed7cdaea6438
parent4fe0a869c4b59c4ec5349eafddf15661be10a44a
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