Skip to contentSkip to conversation

drm/amdgpu/swsmu: disable force reprogram HW state in SR-IOV environment

PATCH In review Lin.Cao 2 participants 2 messages Sep 19, 2024

Subsystems (3)
lore
Share & tools
lore

Lin.Cao

author
#0 lore raw

PATCH 1/1 drm/amdgpu/swsmu: disable force reprogram HW state in SR-IOV environment

SRIOV do not need to forece reprogram HW state on init which should be set from host side.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +3 -0
index 4a6b4ad97f06..a67678ee2d3c 100644
@@ -2234,6 +2234,9 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
 	long workload[1];
 	struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);
 
+	if (amdgpu_sriov_vf(adev))
+		force_update = false;
+
 	if (!skip_display_settings) {
 		ret = smu_display_config_changed(smu);
 		if (ret) {
Signature · 1 line
2.45.2
#1 lore raw
Quoted 3 lines · Lin.Cao

SRIOV do not need to forece reprogram HW state on init which should be set from host side.

This function will still get called indirectly if you change the performance level via sysfs for example. This proposed patch avoids the programming at init time, but it can still get called at runtime.

Alex

Quoted 23 lines
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +3 -1
index 4a6b4ad97f06..a67678ee2d3c 100644
@@ -2234,6 +2234,9 @@ static int smu_adjust_power_state_dynamic(struct smu_context *smu,
        long workload[1];
        struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);
 
+       if (amdgpu_sriov_vf(adev))
+               force_update = false;
+
        if (!skip_display_settings) {
                ret = smu_display_config_changed(smu);
                if (ret) {
--

2.45.2