Re: [PATCH v13 06/35] clk: tegra: Support runtime PM and power domain

From
Dmitry Osipenko <digetx@gmail.com>
Date
2021-10-01 19:50:13
Also in
dri-devel, linux-clk, linux-devicetree, linux-mmc, linux-pwm, linux-staging, linux-tegra, linux-usb, lkml
Reply to
Ulf Hansson, 2021-10-01
01.10.2021 15:32, Ulf Hansson пишет:
quoted
+static int tegra_clock_sync_pd_state(struct tegra_clk_device *clk_dev)
+{
+       unsigned long rate;
+       int ret = 0;
+
+       mutex_lock(&clk_dev->lock);
+
+       if (!pm_runtime_status_suspended(clk_dev->dev)) {
+               rate = clk_hw_get_rate(clk_dev->hw);
+               ret = tegra_clock_set_pd_state(clk_dev, rate);
Don't we need to sync the performance state even when the device is
runtime suspended?

Perhaps the clock, via a child-clock for example, can get
prepared/enabled (hence its device gets runtime resumed) before there
is a clock rate update for it. Then there is no performance state set
for it, right? Or maybe that isn't a problem?
Good catch! Older versions of this patch had a special handling for clk
enable/disable. I just forgot to update this function, it's now not a
problem to change performance state of a suspended device and it
actually needs to be done. I'll correct it, thanks!
Thread (83 messages) 83 messages, 4 authors, last reply 2021-10-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help