cpufreq.c (f59cddd8517ab880fb09bf1465b07b337e058b22) | cpufreq.c (a62f68f5ca53ab61cba2f0a410d0add7a6d54a52) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/cpufreq/cpufreq.c 4 * 5 * Copyright (C) 2001 Russell King 6 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 7 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org> 8 * --- 1894 unchanged lines hidden (view full) --- 1903 if (ret) 1904 pr_err("%s: Failed to start governor for policy: %p\n", 1905 __func__, policy); 1906 } 1907 } 1908} 1909 1910/** | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/cpufreq/cpufreq.c 4 * 5 * Copyright (C) 2001 Russell King 6 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 7 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org> 8 * --- 1894 unchanged lines hidden (view full) --- 1903 if (ret) 1904 pr_err("%s: Failed to start governor for policy: %p\n", 1905 __func__, policy); 1906 } 1907 } 1908} 1909 1910/** |
1911 * cpufreq_driver_test_flags - Test cpufreq driver's flags against given ones. 1912 * @flags: Flags to test against the current cpufreq driver's flags. 1913 * 1914 * Assumes that the driver is there, so callers must ensure that this is the 1915 * case. 1916 */ 1917bool cpufreq_driver_test_flags(u16 flags) 1918{ 1919 return !!(cpufreq_driver->flags & flags); 1920} 1921 1922/** |
|
1911 * cpufreq_get_current_driver - return current driver's name 1912 * 1913 * Return the name string of the currently loaded cpufreq driver 1914 * or NULL, if none. 1915 */ 1916const char *cpufreq_get_current_driver(void) 1917{ 1918 if (cpufreq_driver) --- 263 unchanged lines hidden (view full) --- 2182 policy->cpu, target_freq, relation, old_target_freq); 2183 2184 /* 2185 * This might look like a redundant call as we are checking it again 2186 * after finding index. But it is left intentionally for cases where 2187 * exactly same freq is called again and so we can save on few function 2188 * calls. 2189 */ | 1923 * cpufreq_get_current_driver - return current driver's name 1924 * 1925 * Return the name string of the currently loaded cpufreq driver 1926 * or NULL, if none. 1927 */ 1928const char *cpufreq_get_current_driver(void) 1929{ 1930 if (cpufreq_driver) --- 263 unchanged lines hidden (view full) --- 2194 policy->cpu, target_freq, relation, old_target_freq); 2195 2196 /* 2197 * This might look like a redundant call as we are checking it again 2198 * after finding index. But it is left intentionally for cases where 2199 * exactly same freq is called again and so we can save on few function 2200 * calls. 2201 */ |
2190 if (target_freq == policy->cur) | 2202 if (target_freq == policy->cur && 2203 !(cpufreq_driver->flags & CPUFREQ_NEED_UPDATE_LIMITS)) |
2191 return 0; 2192 2193 /* Save last value to restore later on errors */ 2194 policy->restore_freq = policy->cur; 2195 2196 if (cpufreq_driver->target) 2197 return cpufreq_driver->target(policy, target_freq, relation); 2198 --- 644 unchanged lines hidden --- | 2204 return 0; 2205 2206 /* Save last value to restore later on errors */ 2207 policy->restore_freq = policy->cur; 2208 2209 if (cpufreq_driver->target) 2210 return cpufreq_driver->target(policy, target_freq, relation); 2211 --- 644 unchanged lines hidden --- |