From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abelvesa@kernel.org>,
Fabio Estevam <festevam@gmail.com>, Marek Vasut <marex@denx.de>,
Michael Turquette <mturquette@baylibre.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>, Ying Liu <victor.liu@nxp.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-clk@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Abel Vesa <abel.vesa@linaro.org>,
Herve Codina <herve.codina@bootlin.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Ian Ray <ian.ray@ge.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: [PATCH 4/5] clk: Add flag to prevent frequency changes when walking subtrees
Date: Tue, 10 Dec 2024 14:44:19 -0800 [thread overview]
Message-ID: <fd2b473bc7c3c70ae0e85b2a6315d9e8.sboyd@kernel.org> (raw)
In-Reply-To: <20241121-ge-ian-debug-imx8-clk-tree-v1-4-0f1b722588fe@bootlin.com>
Quoting Miquel Raynal (2024-11-21 09:41:14)
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index adfc5bfb93b5a65b6f58c52ca2c432d651f7dd7d..94d93470479e77769e63e97462b176261103b552 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1927,7 +1927,6 @@ long clk_get_accuracy(struct clk *clk)
> }
> EXPORT_SYMBOL_GPL(clk_get_accuracy);
>
> -__maybe_unused
> static unsigned long clk_determine(struct clk_core *core, unsigned long rate)
> {
> struct clk_rate_request req = {};
Please add functions in the same patch that uses them. It is hard to
review this patch when half the context is in another patch.
> @@ -2272,7 +2271,13 @@ static void clk_calc_subtree(struct clk_core *core)
> {
> struct clk_core *child;
>
> - core->new_rate = clk_recalc(core, core->parent->new_rate);
> + if (core->flags & CLK_NO_RATE_CHANGE_DURING_PROPAGATION) {
> + core->new_rate = clk_determine(core, core->rate);
> + if (!core->new_rate)
> + core->new_rate = clk_recalc(core, core->parent->new_rate);
> + } else {
> + core->new_rate = clk_recalc(core, core->parent->new_rate);
> + }
>
> hlist_for_each_entry(child, &core->children, child_node)
> clk_calc_subtree(child);
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 200135e0f6d00d48b10e843259333b9733c97f38..baef0b442ac1d36ee935cbcaaaa4e2d95fe7654c 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -38,6 +38,8 @@
> #define CLK_OPS_PARENT_ENABLE BIT(12)
> /* duty cycle call may be forwarded to the parent clock */
> #define CLK_DUTY_CYCLE_PARENT BIT(13)
> +/* do not passively change this clock rate during subtree rate propagation */
> +#define CLK_NO_RATE_CHANGE_DURING_PROPAGATION BIT(14)
Why doesn't rate locking work?
next prev parent reply other threads:[~2024-12-10 22:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 17:41 [PATCH 0/5] clk: Fix simple video pipelines on i.MX8 Miquel Raynal
2024-11-21 17:41 ` [PATCH 1/5] clk: imx: clk-imx8mp: Allow LDB serializer clock reconfigure parent rate Miquel Raynal
2024-11-21 17:41 ` [PATCH 2/5] clk: Add a helper to determine a clock rate Miquel Raynal
2024-11-21 17:41 ` [PATCH 3/5] clk: Split clk_calc_subtree() Miquel Raynal
2024-11-21 17:41 ` [PATCH 4/5] clk: Add flag to prevent frequency changes when walking subtrees Miquel Raynal
2024-12-10 22:44 ` Stephen Boyd [this message]
2024-12-23 18:38 ` Miquel Raynal
2024-12-31 1:09 ` Stephen Boyd
2024-12-17 12:47 ` Maxime Ripard
2024-12-23 18:43 ` Miquel Raynal
2024-12-31 1:22 ` Stephen Boyd
2025-01-06 14:36 ` Maxime Ripard
2025-01-10 15:40 ` Miquel Raynal
2025-01-10 15:38 ` Miquel Raynal
2024-11-21 17:41 ` [PATCH 5/5] clk: imx: imx8mp: Prevent media clocks to be incompatibly changed Miquel Raynal
2024-11-22 6:01 ` [PATCH 0/5] clk: Fix simple video pipelines on i.MX8 Liu Ying
2024-11-22 9:54 ` Miquel Raynal
2024-11-26 6:49 ` Liu Ying
2024-11-26 11:03 ` Miquel Raynal
2024-11-27 7:24 ` Liu Ying
2024-12-17 12:54 ` Maxime Ripard
2024-12-23 18:59 ` Miquel Raynal
2025-01-06 14:45 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd2b473bc7c3c70ae0e85b2a6315d9e8.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=herve.codina@bootlin.com \
--cc=ian.ray@ge.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=marex@denx.de \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=victor.liu@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome