]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdkfd: fix missed queue reset on queue destroy
authorJonathan Kim <Jonathan.Kim@amd.com>
Thu, 22 Aug 2024 14:44:39 +0000 (10:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Sep 2024 21:55:05 +0000 (17:55 -0400)
commit101025e94b537e8b5426c73a985b26fc95c199cb
tree5b1f45d7a4225b5c929c8113dc163ea57eda6f07
parent01be2b62c0f3c66832472ed3e48e61d631094606
drm/amdkfd: fix missed queue reset on queue destroy

If a queue is being destroyed but causes a HWS hang on removal, the KFD
may issue an unnecessary gpu reset if the destroyed queue can be fixed
by a queue reset.

This is because the queue has been removed from the KFD's queue list
prior to the preemption action on destroy so the reset call will fail to
match the HQD PQ reset information against the KFD's queue record to do
the actual reset.

To fix this, deactivate the queue prior to preemption since it's being
destroyed anyways and remove the queue from the KFD's queue list after
preemption.

Signed-off-by: Jonathan Kim <jonathan.kim@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_device_queue_manager.c