summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay
diff options
context:
space:
mode:
authorJiansong Chen <Jiansong.Chen@amd.com>2020-07-07 11:54:06 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-07-15 20:27:34 +0300
commitd51dc6132795e3664274311b9cbe16187b8234d6 (patch)
treedcfc4dc3eea0d10e9b27c3c96b250ef95d9dd1f6 /drivers/gpu/drm/amd/powerplay
parenta6c5308f2a7ad2a79fb6fd60b52367c51434c04a (diff)
downloadlinux-d51dc6132795e3664274311b9cbe16187b8234d6.tar.xz
drm/amd/powerplay: set VCN1 pg only for sienna_cichlid
navy_flounder has one VCN instance, and the work around is to avoid smu reponse error when setting VCN1 pg for the chip. It is preferred VCN0 and VCN1 are separated for the pg setting so better power efficiency can be achieved. Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r--drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
index 468ceed03a49..5faef41b63a3 100644
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -826,6 +826,8 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
{
struct smu_power_context *smu_power = &smu->smu_power;
struct smu_power_gate *power_gate = &smu_power->power_gate;
+ struct amdgpu_device *adev = smu->adev;
+
int ret = 0;
if (enable) {
@@ -834,9 +836,12 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0, NULL);
if (ret)
return ret;
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0x10000, NULL);
- if (ret)
- return ret;
+ if (adev->asic_type == CHIP_SIENNA_CICHLID) {
+ ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn,
+ 0x10000, NULL);
+ if (ret)
+ return ret;
+ }
}
power_gate->vcn_gated = false;
} else {
@@ -844,9 +849,12 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0, NULL);
if (ret)
return ret;
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0x10000, NULL);
- if (ret)
- return ret;
+ if (adev->asic_type == CHIP_SIENNA_CICHLID) {
+ ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn,
+ 0x10000, NULL);
+ if (ret)
+ return ret;
+ }
}
power_gate->vcn_gated = true;
}