Unverified Commit 6526402b authored by Maíra Canal's avatar Maíra Canal Committed by Stephen Boyd
Browse files

clk: bcm: rpi: Maximize V3D clock



Although minimizing the clock rate is the best for most scenarios, as
stated in commit 4d85abb0 ("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: default avatarMaíra Canal <mcanal@igalia.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 919d6924
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;