Skip to contentSkip to conversation

drm/amd/powerplay: fix sw SMU wrong UVD/VCE powergate setting

PATCH In review Evan Quan 2 participants 2 messages May 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: fix sw SMU wrong UVD/VCE powergate setting

The UVD/VCE bits are set wrongly. This causes the UVD/VCE clocks are not brought back correctly on needed.

Change-Id I6eda67ea3be45fd5f422cdb78356915bf06ff41e
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +6 -6
index 0eea93c8dff7..a3a7afca7516 100644
@@ -1814,24 +1814,24 @@ static int smu_v11_0_update_od8_settings(struct smu_context *smu,
 
 static int smu_v11_0_dpm_set_uvd_enable(struct smu_context *smu, bool enable)
 {
-	if (!smu_feature_is_supported(smu, FEATURE_DPM_VCE_BIT))
+	if (!smu_feature_is_supported(smu, FEATURE_DPM_UVD_BIT))
 		return 0;
 
-	if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_VCE_BIT))
+	if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_UVD_BIT))
 		return 0;
 
-	return smu_feature_set_enabled(smu, FEATURE_DPM_VCE_BIT, enable);
+	return smu_feature_set_enabled(smu, FEATURE_DPM_UVD_BIT, enable);
 }
 
 static int smu_v11_0_dpm_set_vce_enable(struct smu_context *smu, bool enable)
 {
-	if (!smu_feature_is_supported(smu, FEATURE_DPM_UVD_BIT))
+	if (!smu_feature_is_supported(smu, FEATURE_DPM_VCE_BIT))
 		return 0;
 
-	if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_UVD_BIT))
+	if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_VCE_BIT))
 		return 0;
 
-	return smu_feature_set_enabled(smu, FEATURE_DPM_UVD_BIT, enable);
+	return smu_feature_set_enabled(smu, FEATURE_DPM_VCE_BIT, enable);
 }
 
 static int smu_v11_0_get_current_rpm(struct smu_context *smu,
Signature · 6 lines
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Feifei Xu
#2 lore raw

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Friday, May 17, 2019 1:45 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/powerplay: fix sw SMU wrong UVD/VCE powergate setting

[CAUTION: External Email]

The UVD/VCE bits are set wrongly. This causes the UVD/VCE clocks are not brought back correctly on needed.

Change-Id I6eda67ea3be45fd5f422cdb78356915bf06ff41e
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +8 -7
index 0eea93c8dff7..a3a7afca7516 100644
@@ -1814,24 +1814,24 @@ static int smu_v11_0_update_od8_settings(struct smu_context *smu,
 
 static int smu_v11_0_dpm_set_uvd_enable(struct smu_context *smu, bool enable)  {
-       if (!smu_feature_is_supported(smu, FEATURE_DPM_VCE_BIT))
+       if (!smu_feature_is_supported(smu, FEATURE_DPM_UVD_BIT))
                return 0;
 
-       if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_VCE_BIT))
+       if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_UVD_BIT))
                return 0;
 
-       return smu_feature_set_enabled(smu, FEATURE_DPM_VCE_BIT, enable);
+       return smu_feature_set_enabled(smu, FEATURE_DPM_UVD_BIT, 
+ enable);
 }
 
 static int smu_v11_0_dpm_set_vce_enable(struct smu_context *smu, bool enable)  {
-       if (!smu_feature_is_supported(smu, FEATURE_DPM_UVD_BIT))
+       if (!smu_feature_is_supported(smu, FEATURE_DPM_VCE_BIT))
                return 0;
 
-       if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_UVD_BIT))
+       if (enable == smu_feature_is_enabled(smu, FEATURE_DPM_VCE_BIT))
                return 0;
 
-       return smu_feature_set_enabled(smu, FEATURE_DPM_UVD_BIT, enable);
+       return smu_feature_set_enabled(smu, FEATURE_DPM_VCE_BIT, 
+ enable);
 }
 
 static int smu_v11_0_get_current_rpm(struct smu_context *smu,
--

2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx