Skip to content

Commit c5eed6d

Browse files
kudureranganathsuperm1
authored andcommitted
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: e30ca6d ("cpufreq/amd-pstate: Add dynamic energy performance preference") Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Link: https://lore.kernel.org/r/20260508051748.10484-4-kprateek.nayak@amd.com Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
1 parent 87d2a8d commit c5eed6d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,9 @@ static ssize_t dynamic_epp_store(struct device *a, struct device_attribute *b,
18321832
return -EINVAL;
18331833
}
18341834

1835+
/* Nothing to do */
18351836
if (dynamic_epp == enabled)
1836-
return -EINVAL;
1837+
return count;
18371838

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

0 commit comments

Comments
 (0)