Skip to contentSkip to conversation

clk: bcm: rpi: Mark VEC clock as CLK_IGNORE_UNUSED

PATCH In review Maíra Canal 3 participants 4 messages Apr 1 – Apr 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: bcm: rpi: Mark VEC clock as CLK_IGNORE_UNUSED

On Raspberry Pi 3B, the VEC clock is used by the VideoCore firmware display driver, which remains active until the vc4 driver loads and sends NOTIFY_DISPLAY_DONE. If this clock is disabled during boot, a bus lockup happens and the firmware becomes unresponsive, causing a complete system lockup.

Mark the VEC clock with CLK_IGNORE_UNUSED so it survives the unused clock disablement and remains available until the vc4 driver takes over display management.

Fixes 672299736af6 ("clk: bcm: rpi: Manage clock rate in prepare/unprepare callbacks")
---
 drivers/clk/bcm/clk-raspberrypi.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/clk/bcm/clk-raspberrypi.c +7 -0
index df2d246eb6ef..f1a99de6de4f 100644
@@ -160,6 +160,13 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
 	[RPI_FIRMWARE_VEC_CLK_ID] = {
 		.export = true,
 		.minimize = true,
+
+		/*
+		 * If this clock is disabled during boot, it causes a bus
+		 * lockup in RPi 3B. Therefore, make sure it's left enabled
+		 * during boot.
+		 */
+		.flags = CLK_IGNORE_UNUSED,
 	},
 	[RPI_FIRMWARE_DISP_CLK_ID] = {
 		.export = true,
Signature · 1 line
2.53.0
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Maíra Canal

On Raspberry Pi 3B, the VEC clock is used by the VideoCore firmware display driver, which remains active until the vc4 driver loads and sends NOTIFY_DISPLAY_DONE. If this clock is disabled during boot, a bus lockup happens and the firmware becomes unresponsive, causing a complete system lockup.

Mark the VEC clock with CLK_IGNORE_UNUSED so it survives the unused clock disablement and remains available until the vc4 driver takes over display management.

#2 lore raw
In reply to Maíra Canal

Hi Stephen,

It would be great to land this patch in the next release together with commit 672299736af6 ("clk: bcm: rpi: Manage clock rate in prepare/ unprepare callbacks"). When possible, could you take a look at it?

Best regards,
- Maíra

Quoted 35 lines · Maíra Canal

On Raspberry Pi 3B, the VEC clock is used by the VideoCore firmware display driver, which remains active until the vc4 driver loads and sends NOTIFY_DISPLAY_DONE. If this clock is disabled during boot, a bus lockup happens and the firmware becomes unresponsive, causing a complete system lockup.

Mark the VEC clock with CLK_IGNORE_UNUSED so it survives the unused clock disablement and remains available until the vc4 driver takes over display management.

Fixes 672299736af6 ("clk: bcm: rpi: Manage clock rate in prepare/unprepare callbacks")
---
  drivers/clk/bcm/clk-raspberrypi.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/clk/bcm/clk-raspberrypi.c +7 -0
index df2d246eb6ef..f1a99de6de4f 100644
@@ -160,6 +160,13 @@ raspberrypi_clk_variants[RPI_FIRMWARE_NUM_CLK_ID] = {
  	[RPI_FIRMWARE_VEC_CLK_ID] = {
  		.export = true,
  		.minimize = true,
+
+		/*
+		 * If this clock is disabled during boot, it causes a bus
+		 * lockup in RPi 3B. Therefore, make sure it's left enabled
+		 * during boot.
+		 */
+		.flags = CLK_IGNORE_UNUSED,
  	},
  	[RPI_FIRMWARE_DISP_CLK_ID] = {
  		.export = true,
Reviewed-by on v1 1/1
#3 lore raw
In reply to Maíra Canal

Am 01.04.26 um 13:13 schrieb Maíra Canal:

Quoted 6 lines

On Raspberry Pi 3B, the VEC clock is used by the VideoCore firmware display driver, which remains active until the vc4 driver loads and sends NOTIFY_DISPLAY_DONE. If this clock is disabled during boot, a bus lockup happens and the firmware becomes unresponsive, causing a complete system lockup.

Quoted 7 lines

Mark the VEC clock with CLK_IGNORE_UNUSED so it survives the unused clock disablement and remains available until the vc4 driver takes over display management.

Fixes 672299736af6 ("clk: bcm: rpi: Manage clock rate in prepare/unprepare callbacks")

FWIW: