Commit c5eed6dd authored by K Prateek Nayak's avatar K Prateek Nayak Committed by Mario Limonciello (AMD)
Browse files

cpufreq/amd-pstate: Allow writes to dynamic_epp when state isn't modified



Writing the current "dynamic_epp" state to sysfs fails with -EINVAL even
though the desired result was achieved. Allow writes to "dynamic_epp"
that does not modify the state.

Fixes: e30ca6dd ("cpufreq/amd-pstate: Add dynamic energy performance preference")
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarK Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20260508051748.10484-4-kprateek.nayak@amd.com


Signed-off-by: default avatarMario Limonciello (AMD) <superm1@kernel.org>
parent 87d2a8de
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1832,8 +1832,9 @@ static ssize_t dynamic_epp_store(struct device *a, struct device_attribute *b,
		return -EINVAL;
	}

	/* Nothing to do */
	if (dynamic_epp == enabled)
		return -EINVAL;
		return count;

	/* reinitialize with desired dynamic EPP value */
	dynamic_epp = enabled;