Skip to content

Commit 6f4cb84

Browse files
fxkamdalexdeucher
authored andcommitted
drm/amdkfd: Fix DQM asserts on Hawaii
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: ROCm/ROCm#1624 Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Kent Russell <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent dc5d4af commit 6f4cb84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,14 +1004,17 @@ static void uninitialize(struct device_queue_manager *dqm)
10041004

10051005
static int start_nocpsch(struct device_queue_manager *dqm)
10061006
{
1007+
int r = 0;
1008+
10071009
pr_info("SW scheduler is used");
10081010
init_interrupts(dqm);
10091011

10101012
if (dqm->dev->adev->asic_type == CHIP_HAWAII)
1011-
return pm_init(&dqm->packet_mgr, dqm);
1012-
dqm->sched_running = true;
1013+
r = pm_init(&dqm->packet_mgr, dqm);
1014+
if (!r)
1015+
dqm->sched_running = true;
10131016

1014-
return 0;
1017+
return r;
10151018
}
10161019

10171020
static int stop_nocpsch(struct device_queue_manager *dqm)

0 commit comments

Comments
 (0)