]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/amdkfd: Evict all queues even HWS remove queue failed
authorYifan Zha <Yifan.Zha@amd.com>
Wed, 5 Mar 2025 05:14:55 +0000 (13:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:24 +0000 (12:54 -0700)
commitc5c5e76aea80cce1d58004ac36456d7c33fca921
tree56fd41975f91f29211cd083b95a2f681bd0fa61c
parent72235808eabea93055b459a63443bd9cd6b08aa4
drm/amd/amdkfd: Evict all queues even HWS remove queue failed

commit 0882ca4eecfe8b0013f339144acf886a0a0de41f upstream.

[Why]
If reset is detected and kfd need to evict working queues, HWS moving queue will be failed.
Then remaining queues are not evicted and in active state.

After reset done, kfd uses HWS to termination remaining activated queues but HWS is resetted.
So remove queue will be failed again.

[How]
Keep removing all queues even if HWS returns failed.
It will not affect cpsch as it checks reset_domain->sem.

v2: If any queue failed, evict queue returns error.
v3: Declare err inside the if-block.

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Yifan Zha <Yifan.Zha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 42c854b8fb0cce512534aa2b7141948e80c6ebb0)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c