<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/devfreq, branch v5.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-12-23T01:42:58Z</updated>
<entry>
<title>PM / devfreq: tegra: Add COMMON_CLK dependency</title>
<updated>2019-12-23T01:42:58Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-12-12T01:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5fdb0684b5b0f41402161f068d3d84bf6ed1c3f4'/>
<id>urn:sha1:5fdb0684b5b0f41402161f068d3d84bf6ed1c3f4</id>
<content type='text'>
Compile-testing this driver fails if CONFIG_COMMON_CLK is not set:

drivers/devfreq/tegra30-devfreq.o: In function `tegra_devfreq_target':
tegra30-devfreq.c:(.text+0x164): undefined reference to `clk_set_min_rate'

Fixes: 35f8dbc72721 ("PM / devfreq: tegra: Enable COMPILE_TEST for the driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Drop explicit selection of PM_OPP</title>
<updated>2019-12-23T01:42:58Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-11-11T18:16:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=996fa477d118a11e63f77fbb393173560e5a655d'/>
<id>urn:sha1:996fa477d118a11e63f77fbb393173560e5a655d</id>
<content type='text'>
CONFIG_PM_OPP is already selected by CONFIG_PM_DEVFREQ
since commit b9c69e043266 ("PM / devfreq: Add dependency on PM_OPP").
This means that individual drivers shouldn't "select PM_OPP" explicitly.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
[cw00.choi: Edit the patch title]
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Use PM QoS for sysfs min/max_freq</title>
<updated>2019-12-09T03:19:16Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-12-05T10:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27dbc542f651ed09de910f274b32634904103774'/>
<id>urn:sha1:27dbc542f651ed09de910f274b32634904103774</id>
<content type='text'>
Switch the handling of min_freq and max_freq from sysfs to use the
dev_pm_qos_request interface.

Since PM QoS handles frequencies as kHz this change reduces the
precision of min_freq and max_freq. This shouldn't introduce problems
because frequencies which are not an integer number of kHz are likely
not an integer number of Hz either.

Try to ensure compatibility by rounding min values down and rounding
max values up.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Tested-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
[cw00.choi: Return -EAGAIN instead of -EINVAL if dev_pm_qos is inactive]
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Add PM QoS support</title>
<updated>2019-12-09T03:19:16Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-12-05T10:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05d7ae15cfb18f9ce55eef85bb6bcd62d31acc57'/>
<id>urn:sha1:05d7ae15cfb18f9ce55eef85bb6bcd62d31acc57</id>
<content type='text'>
Register notifiers with the PM QoS framework in order to respond to
requests for DEV_PM_QOS_MIN_FREQUENCY and DEV_PM_QOS_MAX_FREQUENCY.

No notifiers are added by this patch but PM QoS constraints can be
imposed externally (for example from other devices).

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Tested-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Don't fail devfreq_dev_release if not in list</title>
<updated>2019-12-09T03:19:16Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-11-13T23:21:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42a6b25e67df6ee6675e8d1eaf18065bd73328ba'/>
<id>urn:sha1:42a6b25e67df6ee6675e8d1eaf18065bd73328ba</id>
<content type='text'>
Right now devfreq_dev_release will print a warning and abort the rest of
the cleanup if the devfreq instance is not part of the global
devfreq_list. But this is a valid scenario, for example it can happen if
the governor can't be found or on any other init error that happens
after device_register.

Initialize devfreq-&gt;node to an empty list head in devfreq_add_device so
that list_del becomes a safe noop inside devfreq_dev_release and we can
continue the rest of the cleanup.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Introduce get_freq_range helper</title>
<updated>2019-12-09T03:19:16Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-10-31T21:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46cecc0bf095bbffdf58618a1b4a5f9c9f073bf8'/>
<id>urn:sha1:46cecc0bf095bbffdf58618a1b4a5f9c9f073bf8</id>
<content type='text'>
Moving handling of min/max freq to a single function and call it from
update_devfreq and for printing min/max freq values in sysfs.

This changes the behavior of out-of-range min_freq/max_freq: clamping
is now done at evaluation time. This means that if an out-of-range
constraint is imposed by sysfs and it later becomes valid then it will
be enforced.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Set scaling_max_freq to max on OPP notifier error</title>
<updated>2019-12-09T03:19:15Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-10-31T21:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7cc792d00049c874010b398a27c3cc7bc8fef34'/>
<id>urn:sha1:e7cc792d00049c874010b398a27c3cc7bc8fef34</id>
<content type='text'>
The devfreq_notifier_call functions will update scaling_min_freq and
scaling_max_freq when the OPP table is updated.

If fetching the maximum frequency fails then scaling_max_freq remains
set to zero which is confusing. Set to ULONG_MAX instead so we don't
need special handling for this case in other places.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix devfreq_notifier_call returning errno</title>
<updated>2019-12-09T03:19:15Z</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-10-31T21:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e876e710ede23f670494331e062d643928e4142a'/>
<id>urn:sha1:e876e710ede23f670494331e062d643928e4142a</id>
<content type='text'>
Notifier callbacks shouldn't return negative errno but one of the
NOTIFY_OK/DONE/BAD values.

The OPP core will ignore return values from notifiers but returning a
value that matches NOTIFY_STOP_MASK will stop the notification chain.

Fix by always returning NOTIFY_OK.

Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Add missing locking while setting suspend_freq</title>
<updated>2019-11-29T11:50:34Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2019-11-12T10:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1e047ace8cef6d143f38c7d769753f133becbe6'/>
<id>urn:sha1:e1e047ace8cef6d143f38c7d769753f133becbe6</id>
<content type='text'>
Commit 2abb0d5268ae ("PM / devfreq: Lock devfreq in trans_stat_show")
revealed a missing locking while calling devfreq_update_status() function
during suspend/resume cycle.

Code analysis revealed that devfreq_set_target() function was called
without needed locks held for setting device specific suspend_freq if such
has been defined. This patch fixes that by adding the needed locking, what
fixes following kernel warning on Exynos4412-based OdroidU3 board during
system suspend:

PM: suspend entry (deep)
Filesystems sync: 0.002 seconds
Freezing user space processes ... (elapsed 0.001 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
------------[ cut here ]------------
WARNING: CPU: 2 PID: 1385 at drivers/devfreq/devfreq.c:204 devfreq_update_status+0xc0/0x188
Modules linked in:
CPU: 2 PID: 1385 Comm: rtcwake Not tainted 5.4.0-rc6-next-20191111 #6848
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[&lt;c0112588&gt;] (unwind_backtrace) from [&lt;c010e070&gt;] (show_stack+0x10/0x14)
[&lt;c010e070&gt;] (show_stack) from [&lt;c0afb010&gt;] (dump_stack+0xb4/0xe0)
[&lt;c0afb010&gt;] (dump_stack) from [&lt;c01272e0&gt;] (__warn+0xf4/0x10c)
[&lt;c01272e0&gt;] (__warn) from [&lt;c01273a8&gt;] (warn_slowpath_fmt+0xb0/0xb8)
[&lt;c01273a8&gt;] (warn_slowpath_fmt) from [&lt;c07d105c&gt;] (devfreq_update_status+0xc0/0x188)
[&lt;c07d105c&gt;] (devfreq_update_status) from [&lt;c07d2d70&gt;] (devfreq_set_target+0xb0/0x15c)
[&lt;c07d2d70&gt;] (devfreq_set_target) from [&lt;c07d3598&gt;] (devfreq_suspend+0x2c/0x64)
[&lt;c07d3598&gt;] (devfreq_suspend) from [&lt;c05de0b0&gt;] (dpm_suspend+0xa4/0x57c)
[&lt;c05de0b0&gt;] (dpm_suspend) from [&lt;c05def74&gt;] (dpm_suspend_start+0x98/0xa0)
[&lt;c05def74&gt;] (dpm_suspend_start) from [&lt;c0195b58&gt;] (suspend_devices_and_enter+0xec/0xc74)
[&lt;c0195b58&gt;] (suspend_devices_and_enter) from [&lt;c0196a20&gt;] (pm_suspend+0x340/0x410)
[&lt;c0196a20&gt;] (pm_suspend) from [&lt;c019480c&gt;] (state_store+0x6c/0xc8)
[&lt;c019480c&gt;] (state_store) from [&lt;c033fc50&gt;] (kernfs_fop_write+0x10c/0x228)
[&lt;c033fc50&gt;] (kernfs_fop_write) from [&lt;c02a6d3c&gt;] (__vfs_write+0x30/0x1d0)
[&lt;c02a6d3c&gt;] (__vfs_write) from [&lt;c02a9afc&gt;] (vfs_write+0xa4/0x180)
[&lt;c02a9afc&gt;] (vfs_write) from [&lt;c02a9d58&gt;] (ksys_write+0x60/0xd8)
[&lt;c02a9d58&gt;] (ksys_write) from [&lt;c0101000&gt;] (ret_fast_syscall+0x0/0x28)
Exception stack(0xed3d7fa8 to 0xed3d7ff0)
...
irq event stamp: 9667
hardirqs last  enabled at (9679): [&lt;c0b1e7c4&gt;] _raw_spin_unlock_irq+0x20/0x58
hardirqs last disabled at (9698): [&lt;c0b16a20&gt;] __schedule+0xd8/0x818
softirqs last  enabled at (9694): [&lt;c01026fc&gt;] __do_softirq+0x4fc/0x5fc
softirqs last disabled at (9719): [&lt;c012fe68&gt;] irq_exit+0x16c/0x170
---[ end trace 41ac5b57d046bdbc ]---
------------[ cut here ]------------

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: tegra30: Tune up MCCPU boost-down coefficient</title>
<updated>2019-11-06T03:04:01Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2019-11-04T21:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fee22854c0273569836de2039d9c432ea4df2cfc'/>
<id>urn:sha1:fee22854c0273569836de2039d9c432ea4df2cfc</id>
<content type='text'>
MCCPU boosts up very aggressively by 800% and boosts down very mildly by
10%. This doesn't work well when system is idling because the very slow
de-boosting results in lots of consecutive-down interrupts, in result
memory stays clocked high and CPU doesn't enter deepest idling state
instead of keeping memory at lowest freq and having CPU cluster turned
off. A more faster de-boosting fixes the case of idling system and doesn't
affect the case of an active system.

Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
</feed>
