Commit f0bc1ee4 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: enable SW SMU reset functionality

Move SMU irq handler register to sw_init as that's totally
software related. Otherwise, it will prevent SMU reset working.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 479156f2
...@@ -724,6 +724,12 @@ static int smu_sw_init(void *handle) ...@@ -724,6 +724,12 @@ static int smu_sw_init(void *handle)
return ret; return ret;
} }
ret = smu_register_irq_handler(smu);
if (ret) {
pr_err("Failed to register smc irq handler!\n");
return ret;
}
return 0; return 0;
} }
...@@ -733,6 +739,9 @@ static int smu_sw_fini(void *handle) ...@@ -733,6 +739,9 @@ static int smu_sw_fini(void *handle)
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
int ret; int ret;
kfree(smu->irq_source);
smu->irq_source = NULL;
ret = smu_smc_table_sw_fini(smu); ret = smu_smc_table_sw_fini(smu);
if (ret) { if (ret) {
pr_err("Failed to sw fini smc table!\n"); pr_err("Failed to sw fini smc table!\n");
...@@ -1089,10 +1098,6 @@ static int smu_hw_init(void *handle) ...@@ -1089,10 +1098,6 @@ static int smu_hw_init(void *handle)
if (ret) if (ret)
goto failed; goto failed;
ret = smu_register_irq_handler(smu);
if (ret)
goto failed;
if (!smu->pm_enabled) if (!smu->pm_enabled)
adev->pm.dpm_enabled = false; adev->pm.dpm_enabled = false;
else else
...@@ -1122,9 +1127,6 @@ static int smu_hw_fini(void *handle) ...@@ -1122,9 +1127,6 @@ static int smu_hw_fini(void *handle)
kfree(table_context->overdrive_table); kfree(table_context->overdrive_table);
table_context->overdrive_table = NULL; table_context->overdrive_table = NULL;
kfree(smu->irq_source);
smu->irq_source = NULL;
ret = smu_fini_fb_allocations(smu); ret = smu_fini_fb_allocations(smu);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment