diff mbox series

[31/37] clk: bcm: rpi: Allow cpufreq driver to also adjust gpu clocks

Message ID 20241023-drm-vc4-2712-support-v1-31-1cc2d5594907@raspberrypi.com (mailing list archive)
State New, archived
Headers show
Series drm/vc4: Add support for BCM2712 / Pi5 display hardware | expand

Commit Message

Dave Stevenson Oct. 23, 2024, 4:50 p.m. UTC
From: Dom Cobley <popcornmix@gmail.com>

For performance/power it is beneficial to adjust gpu clocks with arm clock.
This is how the downstream cpufreq driver works

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/clk/bcm/clk-raspberrypi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxime Ripard Oct. 24, 2024, 2:40 p.m. UTC | #1
On Wed, Oct 23, 2024 at 05:50:28PM +0100, Dave Stevenson wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> For performance/power it is beneficial to adjust gpu clocks with arm clock.
> This is how the downstream cpufreq driver works
> 
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
>  drivers/clk/bcm/clk-raspberrypi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
> index 6d5ee1cddded..274176a938c6 100644
> --- a/drivers/clk/bcm/clk-raspberrypi.c
> +++ b/drivers/clk/bcm/clk-raspberrypi.c
> @@ -156,7 +156,7 @@ static int raspberrypi_clock_property(struct rpi_firmware *firmware,
>  	struct raspberrypi_firmware_prop msg = {
>  		.id = cpu_to_le32(data->id),
>  		.val = cpu_to_le32(*val),
> -		.disable_turbo = cpu_to_le32(1),
> +		.disable_turbo = cpu_to_le32(0),

I guess we can simply remove that line?

Maxime
Stephen Boyd Nov. 21, 2024, 10:48 p.m. UTC | #2
Quoting Dave Stevenson (2024-10-23 09:50:28)
> From: Dom Cobley <popcornmix@gmail.com>
> 
> For performance/power it is beneficial to adjust gpu clocks with arm clock.
> This is how the downstream cpufreq driver works
> 
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---

With Maxime's suggestion:

Acked-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 6d5ee1cddded..274176a938c6 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -156,7 +156,7 @@  static int raspberrypi_clock_property(struct rpi_firmware *firmware,
 	struct raspberrypi_firmware_prop msg = {
 		.id = cpu_to_le32(data->id),
 		.val = cpu_to_le32(*val),
-		.disable_turbo = cpu_to_le32(1),
+		.disable_turbo = cpu_to_le32(0),
 	};
 	int ret;