Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
"Make the amd-pstate cpufreq driver take all of the possible
combinations of the 'old' and 'new' status values correctly while
changing the operation mode via sysfs (Wyes Karny)"

* tag 'pm-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
amd-pstate: Fix amd_pstate mode switch

+8 -10
+8 -10
drivers/cpufreq/amd-pstate.c
··· 840 840 841 841 switch(mode_idx) { 842 842 case AMD_PSTATE_DISABLE: 843 - if (!current_pstate_driver) 844 - return -EINVAL; 845 - if (cppc_state == AMD_PSTATE_ACTIVE) 846 - return -EBUSY; 847 - cpufreq_unregister_driver(current_pstate_driver); 848 - amd_pstate_driver_cleanup(); 843 + if (current_pstate_driver) { 844 + cpufreq_unregister_driver(current_pstate_driver); 845 + amd_pstate_driver_cleanup(); 846 + } 849 847 break; 850 848 case AMD_PSTATE_PASSIVE: 851 849 if (current_pstate_driver) { 852 850 if (current_pstate_driver == &amd_pstate_driver) 853 851 return 0; 854 852 cpufreq_unregister_driver(current_pstate_driver); 855 - cppc_state = AMD_PSTATE_PASSIVE; 856 - current_pstate_driver = &amd_pstate_driver; 857 853 } 858 854 855 + current_pstate_driver = &amd_pstate_driver; 856 + cppc_state = AMD_PSTATE_PASSIVE; 859 857 ret = cpufreq_register_driver(current_pstate_driver); 860 858 break; 861 859 case AMD_PSTATE_ACTIVE: ··· 861 863 if (current_pstate_driver == &amd_pstate_epp_driver) 862 864 return 0; 863 865 cpufreq_unregister_driver(current_pstate_driver); 864 - current_pstate_driver = &amd_pstate_epp_driver; 865 - cppc_state = AMD_PSTATE_ACTIVE; 866 866 } 867 867 868 + current_pstate_driver = &amd_pstate_epp_driver; 869 + cppc_state = AMD_PSTATE_ACTIVE; 868 870 ret = cpufreq_register_driver(current_pstate_driver); 869 871 break; 870 872 default: