Commit 236b156f authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: apply no power source workaround if dc reported by gpio

If dc reported by gpio is supported, the power source switching will
be performed by pmfw automatically. Thus the power source setting
workaround for Navi1x will be not needed.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 71f9404f
...@@ -1013,16 +1013,18 @@ static int smu_smc_hw_setup(struct smu_context *smu) ...@@ -1013,16 +1013,18 @@ static int smu_smc_hw_setup(struct smu_context *smu)
return ret; return ret;
} }
/* if (!smu->dc_controlled_by_gpio) {
* For Navi1X, manually switch it to AC mode as PMFW /*
* may boot it with DC mode. * For Navi1X, manually switch it to AC mode as PMFW
*/ * may boot it with DC mode.
ret = smu_set_power_source(smu, */
adev->pm.ac_power ? SMU_POWER_SOURCE_AC : ret = smu_set_power_source(smu,
SMU_POWER_SOURCE_DC); adev->pm.ac_power ? SMU_POWER_SOURCE_AC :
if (ret) { SMU_POWER_SOURCE_DC);
dev_err(adev->dev, "Failed to switch to %s mode!\n", adev->pm.ac_power ? "AC" : "DC"); if (ret) {
return ret; dev_err(adev->dev, "Failed to switch to %s mode!\n", adev->pm.ac_power ? "AC" : "DC");
return ret;
}
} }
ret = smu_notify_display_change(smu); ret = smu_notify_display_change(smu);
......
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