From: Maíra Canal <mcanal@igalia.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Nicolas Saenz Julienne <nsaenz@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Stefan Wahren <wahrenst@gmx.net>,
Maxime Ripard <mripard@kernel.org>, Melissa Wen <mwen@igalia.com>,
Iago Toral Quiroga <itoral@igalia.com>,
Chema Casanova <jmcasanova@igalia.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
kernel-dev@igalia.com, Maíra Canal <mcanal@igalia.com>
Subject: [PATCH v5 2/7] clk: bcm: rpi: Add a comment about RPI_FIRMWARE_SET_CLOCK_STATE behavior
Date: Fri, 13 Feb 2026 15:52:55 -0300 [thread overview]
Message-ID: <20260213-v3d-power-management-v5-2-7a8b381eb379@igalia.com> (raw)
In-Reply-To: <20260213-v3d-power-management-v5-0-7a8b381eb379@igalia.com>
On some firmware versions, RPI_FIRMWARE_SET_CLOCK_STATE doesn't
actually power off the clock. Document this behavior so that clock
consumers understand they may need to set the rate to minimum before
disabling for meaningful power savings.
Suggested-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
drivers/clk/bcm/clk-raspberrypi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 9783385d5859836898683209e320fcc928dfdc71..2e63121af0900ac9b4874b666cf6d02baa8be11c 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -308,6 +308,12 @@ static void raspberrypi_fw_unprepare(struct clk_hw *hw)
u32 state = 0;
int ret;
+ /*
+ * On some firmware versions, RPI_FIRMWARE_SET_CLOCK_STATE doesn't
+ * actually power off the clock. To achieve meaningful power consumption
+ * reduction, consumers need to set the clock rate to minimum before
+ * disabling it.
+ */
ret = raspberrypi_clock_property(rpi->firmware, data,
RPI_FIRMWARE_SET_CLOCK_STATE, &state);
if (ret)
--
2.52.0
next prev parent reply other threads:[~2026-02-13 18:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 18:52 [PATCH v5 0/7] Power Management for Raspberry Pi V3D GPU Maíra Canal
2026-02-13 18:52 ` [PATCH v5 1/7] clk: bcm: rpi: Let V3D consumers manage clock rate Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 18:52 ` Maíra Canal [this message]
2026-02-13 21:21 ` Claude review: clk: bcm: rpi: Add a comment about RPI_FIRMWARE_SET_CLOCK_STATE behavior Claude Code Review Bot
2026-02-13 18:52 ` [PATCH v5 3/7] clk: bcm: rpi: Mark PIXEL_CLK and HEVC_CLK as CLK_IGNORE_UNUSED Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 18:52 ` [PATCH v5 4/7] pmdomain: bcm: bcm2835-power: Increase ASB control timeout Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 18:52 ` [PATCH v5 5/7] drm/v3d: Use devm_reset_control_get_optional_exclusive() Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 18:52 ` [PATCH v5 6/7] drm/v3d: Allocate all resources before enabling the clock Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 18:53 ` [PATCH v5 7/7] drm/v3d: Introduce Runtime Power Management Maíra Canal
2026-02-13 21:21 ` Claude review: " Claude Code Review Bot
2026-02-13 21:21 ` Claude review: Power Management for Raspberry Pi V3D GPU Claude Code Review Bot
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=20260213-v3d-power-management-v5-2-7a8b381eb379@igalia.com \
--to=mcanal@igalia.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=florian.fainelli@broadcom.com \
--cc=itoral@igalia.com \
--cc=jmcasanova@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=mwen@igalia.com \
--cc=nsaenz@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=wahrenst@gmx.net \
/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