All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdkfd: Fix DQM asserts on Hawaii
@ 2021-12-08  8:25 Felix Kuehling
  2021-12-08  8:25 ` [PATCH 2/2] drm/amdkfd: Make KFD support on Hawaii experimental Felix Kuehling
  2022-01-11  0:13 ` [PATCH 1/2] drm/amdkfd: Fix DQM asserts on Hawaii Felix Kuehling
  0 siblings, 2 replies; 5+ messages in thread
From: Felix Kuehling @ 2021-12-08  8:25 UTC (permalink / raw)
  To: amd-gfx

start_nocpsch would never set dqm->sched_running on Hawaii due to an
early return statement. This would trigger asserts in other functions
and end up in inconsistent states.

Bug: https://github.com/RadeonOpenCompute/ROCm/issues/1624
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index dd0b952f0173..104b70e61ba0 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1004,14 +1004,17 @@ static void uninitialize(struct device_queue_manager *dqm)
 
 static int start_nocpsch(struct device_queue_manager *dqm)
 {
+	int r = 0;
+
 	pr_info("SW scheduler is used");
 	init_interrupts(dqm);
 	
 	if (dqm->dev->adev->asic_type == CHIP_HAWAII)
-		return pm_init(&dqm->packet_mgr, dqm);
-	dqm->sched_running = true;
+		r = pm_init(&dqm->packet_mgr, dqm);
+	if (!r)
+		dqm->sched_running = true;
 
-	return 0;
+	return r;
 }
 
 static int stop_nocpsch(struct device_queue_manager *dqm)
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-11 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08  8:25 [PATCH 1/2] drm/amdkfd: Fix DQM asserts on Hawaii Felix Kuehling
2021-12-08  8:25 ` [PATCH 2/2] drm/amdkfd: Make KFD support on Hawaii experimental Felix Kuehling
2021-12-08 16:34   ` Russell, Kent
2022-01-11  0:13 ` [PATCH 1/2] drm/amdkfd: Fix DQM asserts on Hawaii Felix Kuehling
2022-01-11 14:41   ` Russell, Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.