public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Power Management for Raspberry Pi V3D GPU
@ 2025-07-31 21:06 Maíra Canal
  2025-07-31 21:06 ` [PATCH v2 1/5] clk: bcm: rpi: Add missing logs if firmware fails Maíra Canal
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Maíra Canal @ 2025-07-31 21:06 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Nicolas Saenz Julienne,
	Florian Fainelli, Stefan Wahren, Maxime Ripard, Melissa Wen,
	Iago Toral Quiroga, Dom Cobley, Dave Stevenson, Philipp Zabel
  Cc: linux-clk, linux-rpi-kernel, linux-arm-kernel, dri-devel,
	Broadcom internal kernel review list, kernel-dev,
	Maíra Canal

This series introduces Runtime PM for Raspberry Pi's GPU, V3D.
Currently, the GPU clock stays up during the whole operation, even if
the GPU is idle. By introducing Runtime PM, we can now turn off the
clock completely during idle. For example, with this series, when
checking `vcgencmd measure_clock v3d` in the Raspberry Pi 5, we get:

(idle)

$ vcgencmd measure_clock v3d
frequency(0)=0

(running glmark2)

$ vcgencmd measure_clock v3d
frequency(0)=960016128

To implement PM for V3D, it was needed to add a prepare and unprepare
hook to RPi's firmware clocks. Currently, they don't turn on and off,
nor lower the clock rate. Therefore, PATCH 2/5 addresses this issue in
clk/bcm/clk-raspberrypi.c.

Apart from the first patch, the last three patches are related to PM
enablement in the V3D driver.

To ease testing in Raspberry Pi 4 and 5, I prepared a downstream branch
backporting this series to rpi-6.12.y [1].

[1] https://github.com/mairacanal/linux-rpi/tree/v3d/downstream/power-management-v2

Best Regards,
- Maíra

---
v1 -> v2: https://lore.kernel.org/r/20250728-v3d-power-management-v1-0-780f922b1048@igalia.com

- [1/5] NEW PATCH: "clk: bcm: rpi: Add missing logs if firmware fails" (Stefan Wahren)
- [2/5] Remove the "Fixes:" tag (Stefan Wahren)
- [2/5] dev_err_ratelimited() instead of dev_err() (Stefan Wahren)
- [2/5] Instead of logging the clock ID, use clk_hw_get_name(hw) to log the name (Stefan Wahren)
- [2/5] Add a newline character at the end of the log message (Stefan Wahren)
- [2/5] Use CLK_IS_CRITICAL for all clocks that can't be disabled (Maxime Ripard)
- [3/5] NEW PATCH: "clk: bcm: rpi: Maximize V3D clock"
- [4/5] Use devm_reset_control_get_optional_exclusive() (Philipp Zabel)
- [4/5] Make sure that resource are cleaned in the inverse order of allocation (Philipp Zabel)

---
Maíra Canal (4):
      clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing
      clk: bcm: rpi: Maximize V3D clock
      drm/v3d: Allocate all resources before enabling the clock
      drm/v3d: Introduce Runtime Power Management

Stefan Wahren (1):
      clk: bcm: rpi: Add missing logs if firmware fails

 drivers/clk/bcm/clk-raspberrypi.c |  72 ++++++++++++++++-
 drivers/gpu/drm/v3d/Makefile      |   3 +-
 drivers/gpu/drm/v3d/v3d_debugfs.c |  23 +++++-
 drivers/gpu/drm/v3d/v3d_drv.c     | 160 ++++++++++++++++++--------------------
 drivers/gpu/drm/v3d/v3d_drv.h     |  21 ++++-
 drivers/gpu/drm/v3d/v3d_gem.c     |  18 ++++-
 drivers/gpu/drm/v3d/v3d_irq.c     |  15 ++--
 drivers/gpu/drm/v3d/v3d_mmu.c     |  12 ++-
 drivers/gpu/drm/v3d/v3d_power.c   |  79 +++++++++++++++++++
 drivers/gpu/drm/v3d/v3d_submit.c  |  19 ++++-
 10 files changed, 311 insertions(+), 111 deletions(-)
---
base-commit: 518867b09394217d13f6e05f704450bd9d2c8eeb
change-id: 20250728-v3d-power-management-eebb2024dc96



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-10-02 14:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 21:06 [PATCH v2 0/5] Power Management for Raspberry Pi V3D GPU Maíra Canal
2025-07-31 21:06 ` [PATCH v2 1/5] clk: bcm: rpi: Add missing logs if firmware fails Maíra Canal
2025-09-21 16:25   ` Stephen Boyd
2025-07-31 21:06 ` [PATCH v2 2/5] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing Maíra Canal
2025-08-18 10:51   ` Stefan Wahren
2025-09-21 16:25   ` Stephen Boyd
2025-09-25  7:57   ` Marek Szyprowski
2025-09-25 16:48     ` Stefan Wahren
2025-09-26  7:27       ` Marek Szyprowski
2025-09-26 10:36         ` Stefan Wahren
2025-10-01 20:50           ` Melissa Wen
2025-10-02  6:59             ` Marek Szyprowski
2025-10-02 14:52             ` Stefan Wahren
2025-07-31 21:06 ` [PATCH v2 3/5] clk: bcm: rpi: Maximize V3D clock Maíra Canal
2025-09-21 16:25   ` Stephen Boyd
2025-07-31 21:06 ` [PATCH v2 4/5] drm/v3d: Allocate all resources before enabling the clock Maíra Canal
2025-08-01  6:53   ` Philipp Zabel
2025-07-31 21:06 ` [PATCH v2 5/5] drm/v3d: Introduce Runtime Power Management Maíra Canal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox