Skip to content

Commit

Permalink
drm/amd/powerplay: enable SW SMU reset functionality
Browse files Browse the repository at this point in the history
Move SMU irq handler register to sw_init as that's totally
software related. Otherwise, it will prevent SMU reset working.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Evan Quan authored and Alex Deucher committed Jul 31, 2019
1 parent 479156f commit f0bc1ee
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,12 @@ static int smu_sw_init(void *handle)
return ret;
}

ret = smu_register_irq_handler(smu);
if (ret) {
pr_err("Failed to register smc irq handler!\n");
return ret;
}

return 0;
}

Expand All @@ -733,6 +739,9 @@ static int smu_sw_fini(void *handle)
struct smu_context *smu = &adev->smu;
int ret;

kfree(smu->irq_source);
smu->irq_source = NULL;

ret = smu_smc_table_sw_fini(smu);
if (ret) {
pr_err("Failed to sw fini smc table!\n");
Expand Down Expand Up @@ -1089,10 +1098,6 @@ static int smu_hw_init(void *handle)
if (ret)
goto failed;

ret = smu_register_irq_handler(smu);
if (ret)
goto failed;

if (!smu->pm_enabled)
adev->pm.dpm_enabled = false;
else
Expand Down Expand Up @@ -1122,9 +1127,6 @@ static int smu_hw_fini(void *handle)
kfree(table_context->overdrive_table);
table_context->overdrive_table = NULL;

kfree(smu->irq_source);
smu->irq_source = NULL;

ret = smu_fini_fb_allocations(smu);
if (ret)
return ret;
Expand Down

0 comments on commit f0bc1ee

Please sign in to comment.