Skip to content

Commit f214b7b

Browse files
jcornwallAMDalexdeucher
authored andcommitted
drm/amdkfd: Block per-queue reset when halt_if_hws_hang=1
The purpose of halt_if_hws_hang is to preserve GPU state for driver debugging when queue preemption fails. Issuing per-queue reset may kill wavefronts which caused the preemption failure. Signed-off-by: Jay Cornwall <jay.cornwall@amd.com> Reviewed-by: Jonathan Kim <Jonathan.Kim@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org # 6.12.x
1 parent 64179a1 commit f214b7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,9 +2325,9 @@ static int unmap_queues_cpsch(struct device_queue_manager *dqm,
23252325
*/
23262326
mqd_mgr = dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ];
23272327
if (mqd_mgr->check_preemption_failed(mqd_mgr, dqm->packet_mgr.priv_queue->queue->mqd)) {
2328+
while (halt_if_hws_hang)
2329+
schedule();
23282330
if (reset_queues_on_hws_hang(dqm)) {
2329-
while (halt_if_hws_hang)
2330-
schedule();
23312331
dqm->is_hws_hang = true;
23322332
kfd_hws_hang(dqm);
23332333
retval = -ETIME;

0 commit comments

Comments
 (0)