drm/amdkfd: Ignore bogus signals from MEC efficiently
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 7 Apr 2022 22:53:56 +0000 (18:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Apr 2022 21:05:48 +0000 (17:05 -0400)
commitc3eb12dff0f9c6aa7f2916edaaec5545af5f379f
tree376bc95f81f7f8101425ce59142ac96ba0533b2e
parentb3ef3205bc5e5d5a91f7ef53306686967c76492b
drm/amdkfd: Ignore bogus signals from MEC efficiently

MEC firmware sometimes sends signal interrupts without a valid context ID
on end of pipe events that don't intend to signal any HSA signals.
This triggers the slow path in kfd_signal_event_interrupt that scans the
entire event page for signaled events. Detect these signals in the top
half interrupt handler to stop processing them as early as possible.

Because we now always treat event ID 0 as invalid, reserve that ID during
process initialization.

v2: Update firmware version checks to support more GPUs

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@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
drivers/gpu/drm/amd/amdkfd/kfd_process.c