Skip to content

Commit d51dc61

Browse files
Jiansong Chenalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a6c5308 commit d51dc61

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,8 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
826826
{
827827
struct smu_power_context *smu_power = &smu->smu_power;
828828
struct smu_power_gate *power_gate = &smu_power->power_gate;
829+
struct amdgpu_device *adev = smu->adev;
830+
829831
int ret = 0;
830832

831833
if (enable) {
@@ -834,19 +836,25 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
834836
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0, NULL);
835837
if (ret)
836838
return ret;
837-
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0x10000, NULL);
838-
if (ret)
839-
return ret;
839+
if (adev->asic_type == CHIP_SIENNA_CICHLID) {
840+
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn,
841+
0x10000, NULL);
842+
if (ret)
843+
return ret;
844+
}
840845
}
841846
power_gate->vcn_gated = false;
842847
} else {
843848
if (smu_feature_is_enabled(smu, SMU_FEATURE_MM_DPM_PG_BIT)) {
844849
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0, NULL);
845850
if (ret)
846851
return ret;
847-
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0x10000, NULL);
848-
if (ret)
849-
return ret;
852+
if (adev->asic_type == CHIP_SIENNA_CICHLID) {
853+
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn,
854+
0x10000, NULL);
855+
if (ret)
856+
return ret;
857+
}
850858
}
851859
power_gate->vcn_gated = true;
852860
}

0 commit comments

Comments
 (0)