Skip to content

Commit

Permalink
drm/amdkfd: Fix DQM asserts on Hawaii
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Felix Kuehling authored and Alex Deucher committed Jan 11, 2022
1 parent dc5d4af commit 6f4cb84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f4cb84

Please sign in to comment.