clk: bcm: rpi: Maximize V3D clock

Although minimizing the clock rate is the best for most scenarios, as
stated in commit 4d85abb0fb ("clk: bcm: rpi: Enable minimize for all
firmware clocks"), when it comes to the GPU, it's ideal to have the
maximum rate allowed.

Add an option to maximize a firmware clock's rate when the clock is
enabled and set this option for V3D.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Maíra Canal 2025-07-31 18:06:19 -03:00 committed by Stephen Boyd
parent 919d6924ae
commit 6526402b9b
No known key found for this signature in database
GPG key ID: AD028897C6E49525

View file

@ -68,6 +68,7 @@ struct raspberrypi_clk_variant {
char *clkdev;
unsigned long min_rate;
bool minimize;
bool maximize;
u32 flags;
};
@ -135,7 +136,7 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
},
[RPI_FIRMWARE_V3D_CLK_ID] = {
.export = true,
.minimize = true,
.maximize = true,
},
[RPI_FIRMWARE_PIXEL_CLK_ID] = {
.export = true,
@ -386,6 +387,9 @@ static struct clk_hw *raspberrypi_clk_register(struct raspberrypi_clk *rpi,
}
}
if (variant->maximize)
variant->min_rate = max_rate;
if (variant->min_rate) {
unsigned long rate;