Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e745c3c9 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon/ci: use different smc command for pcie dpm



Use unforce levels rather than enable mask instruction.
This is the preferred method.

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f281d0a3
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -3773,7 +3773,7 @@ static int ci_upload_dpm_level_enable_mask(struct radeon_device *rdev)
				return -EINVAL;
		}
	}

#if 0
	if (!pi->pcie_dpm_key_disabled) {
		if (pi->dpm_level_enable_mask.pcie_dpm_enable_mask) {
			result = ci_send_msg_to_smc_with_parameter(rdev,
@@ -3783,7 +3783,7 @@ static int ci_upload_dpm_level_enable_mask(struct radeon_device *rdev)
				return -EINVAL;
		}
	}

#endif
	return 0;
}

@@ -4247,6 +4247,14 @@ int ci_dpm_force_performance_level(struct radeon_device *rdev,
			}
		}
	} else if (level == RADEON_DPM_FORCED_LEVEL_AUTO) {
		if (!pi->pcie_dpm_key_disabled) {
			PPSMC_Result smc_result;

			smc_result = ci_send_msg_to_smc(rdev,
							PPSMC_MSG_PCIeDPM_UnForceLevel);
			if (smc_result != PPSMC_Result_OK)
				return -EINVAL;
		}
		ret = ci_upload_dpm_level_enable_mask(rdev);
		if (ret)
			return ret;