aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorEvan Quan2020-03-20 14:09:21 -0400
committerAlex Deucher2020-03-25 17:00:11 -0400
commit66c2f5db1fbdc987d23149082720bcbe46f41aa2 (patch)
tree57fe1a47d83c7fbea782f00ee94d4fab6ce198aa /drivers/gpu/drm
parentfa34520c953b57a3ace3cfb3bfa3b3f1c8e0d414 (diff)
drm/amdgpu/swSMU: correct the bootup power source for Navi1X (v2)
PMFW may boots those ASICs with DC mode. Need to set it back to AC mode. v2: split from Evan's original patch (Alex) Bug: https://gitlab.freedesktop.org/drm/amd/issues/1043 Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amdgpu_smu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index f6d4b0ef46ad..2cfb911ab370 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -1154,6 +1154,21 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
}
}
}
+
+ if (adev->asic_type >= CHIP_NAVI10 &&
+ adev->asic_type <= CHIP_NAVI12) {
+ /*
+ * For Navi1X, manually switch it to AC mode as PMFW
+ * may boot it with DC mode.
+ * TODO: should check whether we are indeed under AC
+ * mode before doing this.
+ */
+ ret = smu_set_power_source(smu, SMU_POWER_SOURCE_AC);
+ if (ret) {
+ pr_err("Failed to switch to AC mode!\n");
+ return ret;
+ }
+ }
}
if (adev->asic_type != CHIP_ARCTURUS) {
ret = smu_notify_display_change(smu);