drm/amdkfd: refine the poison data consumption handling
authorDennis Li <Dennis.Li@amd.com>
Tue, 11 May 2021 07:35:49 +0000 (15:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:29:44 +0000 (22:29 -0400)
commite2b1f9f52bb630a076039064aa4cb7f55f3e5a14
treee068e4a7c3ff8c5ea7dc9a03d8c73ca7186cd281
parent2bb5b5f688cbbd5030629905d3ed8032ab46e79f
drm/amdkfd: refine the poison data consumption handling

The user applications maybe register the KFD_EVENT_TYPE_HW_EXCEPTION and
KFD_EVENT_TYPE_MEMORY events, driver could notify them when poison data
consumed. Beside that, some applications maybe register SIGBUS signal
hander. These applications will handle poison data by themselves, exit
or re-create context to re-dispatch works.

Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h