linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Fix RK3588 GPU domain
@ 2024-10-22 15:41 Sebastian Reichel
  2024-10-22 15:41 ` [PATCH v3 1/7] regulator: Add (devm_)of_regulator_get() Sebastian Reichel
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Sebastian Reichel @ 2024-10-22 15:41 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Ulf Hansson, Mark Brown
  Cc: Liam Girdwood, Elaine Zhang, Adrián Martínez Larumbe,
	Boris Brezillon, Chen-Yu Tsai, devicetree, linux-rockchip,
	linux-kernel, linux-pm, Sebastian Reichel, kernel

Hi,

I got a report, that the Linux kernel crashes on Rock 5B when the panthor
driver is loaded late after booting. The crash starts with the following
shortened error print:

rockchip-pm-domain fd8d8000.power-management:power-controller: failed to set domain 'gpu', val=0
rockchip-pm-domain fd8d8000.power-management:power-controller: failed to get ack on domain 'gpu', val=0xa9fff
SError Interrupt on CPU4, code 0x00000000be000411 -- SError

This series first does some cleanups in the Rockchip power domain
driver and changes the driver, so that it no longer tries to continue
when it fails to enable a domain. This gets rid of the SError interrupt
and long backtraces. But the kernel still hangs when it fails to enable
a power domain. I have not done further analysis to check if that can
be avoided.

Last but not least this provides a fix for the GPU power domain failing
to get enabled - after some testing from my side it seems to require the
GPU voltage supply to be enabled.

This series is now based on the pull request from Mark Brown:
https://lore.kernel.org/linux-pm/ZvsVfQ1fuSVZpF6A@finisterre.sirena.org.uk/

I added one more patch, which adds devm_of_regulator_get without the
_optional suffix, since that is more sensible for the Rockchip usecase.
Longer explanation can be seen in patch 6, which adds the handling to
the Rockchip driver. My merge suggestion would be that Mark adds the
regulator patch on top of the immutable branch and creates a new pull
request.

The last patch, which updates the RK3588 board files only covers the
boards from 6.12-rc1. Any board missing the update will behave as before,
so it is perfectly fine not to update all DT files at once.

Changes since PATCHv2:
 * https://lore.kernel.org/linux-rockchip/20240919091834.83572-1-sebastian.reichel@collabora.com/
 * Rebase to 6.12-rc1 + devm_of_regulator_get_optional branch (Ulf Hansson, Chen-Yu Tsai)
  - Introduce devm_of_regulator_get()
  - Add code to only request regulators for domains needing them
 * Mention other platforms in the DT binding patch (Rob Murphy)
 * Update more RK3588 DT files (Jonas Karlman)

Changes since PATCHv1:
 * https://lore.kernel.org/all/20240910180530.47194-1-sebastian.reichel@collabora.com/
 * Collect Reviewed-by/Acked-by/Tested-by
 * swap first and second patch to avoid introducing and directly removing a mutex_unlock
 * fix spelling of indentation
 * fix double empty line after rockchip_pd_regulator_disable()

Greetings,

-- Sebastian

Sebastian Reichel (7):
  regulator: Add (devm_)of_regulator_get()
  pmdomain: rockchip: cleanup mutex handling in rockchip_pd_power
  pmdomain: rockchip: forward rockchip_do_pmu_set_power_domain errors
  pmdomain: rockchip: reduce indentation in rockchip_pd_power
  dt-bindings: power: rockchip: add regulator support
  pmdomain: rockchip: add regulator support
  arm64: dts: rockchip: Add GPU power domain regulator dependency for
    RK3588

 .../power/rockchip,power-controller.yaml      |   3 +
 .../boot/dts/rockchip/rk3588-armsom-sige7.dts |   4 +
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi |   2 +-
 .../boot/dts/rockchip/rk3588-coolpi-cm5.dtsi  |   4 +
 .../rockchip/rk3588-edgeble-neu6a-common.dtsi |   4 +
 .../boot/dts/rockchip/rk3588-evb1-v10.dts     |   4 +
 .../boot/dts/rockchip/rk3588-fet3588-c.dtsi   |   4 +
 .../rockchip/rk3588-friendlyelec-cm3588.dtsi  |   4 +
 .../arm64/boot/dts/rockchip/rk3588-jaguar.dts |   4 +
 .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi   |   4 +
 .../boot/dts/rockchip/rk3588-ok3588-c.dts     |   4 +
 .../dts/rockchip/rk3588-orangepi-5-plus.dts   |   4 +
 .../boot/dts/rockchip/rk3588-quartzpro64.dts  |   4 +
 .../boot/dts/rockchip/rk3588-rock-5-itx.dts   |   4 +
 .../boot/dts/rockchip/rk3588-rock-5b.dts      |   4 +
 .../arm64/boot/dts/rockchip/rk3588-tiger.dtsi |   4 +
 .../boot/dts/rockchip/rk3588-toybrick-x0.dts  |   4 +
 .../boot/dts/rockchip/rk3588-turing-rk1.dtsi  |   4 +
 .../boot/dts/rockchip/rk3588s-coolpi-4b.dts   |   4 +
 .../dts/rockchip/rk3588s-gameforce-ace.dts    |   4 +
 .../dts/rockchip/rk3588s-indiedroid-nova.dts  |   4 +
 .../dts/rockchip/rk3588s-khadas-edge2.dts     |   4 +
 .../boot/dts/rockchip/rk3588s-nanopi-r6s.dts  |   4 +
 .../boot/dts/rockchip/rk3588s-odroid-m2.dts   |   4 +
 .../boot/dts/rockchip/rk3588s-orangepi-5.dts  |   4 +
 .../boot/dts/rockchip/rk3588s-rock-5a.dts     |   4 +
 drivers/pmdomain/rockchip/pm-domains.c        | 190 +++++++++++-------
 drivers/regulator/devres.c                    |  17 ++
 drivers/regulator/of_regulator.c              |  21 ++
 include/linux/regulator/consumer.h            |   6 +
 30 files changed, 266 insertions(+), 69 deletions(-)

-- 
2.45.2


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

end of thread, other threads:[~2024-11-01 21:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 15:41 [PATCH v3 0/7] Fix RK3588 GPU domain Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 1/7] regulator: Add (devm_)of_regulator_get() Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 2/7] pmdomain: rockchip: cleanup mutex handling in rockchip_pd_power Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 3/7] pmdomain: rockchip: forward rockchip_do_pmu_set_power_domain errors Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 4/7] pmdomain: rockchip: reduce indentation in rockchip_pd_power Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 5/7] dt-bindings: power: rockchip: add regulator support Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 6/7] pmdomain: " Sebastian Reichel
2024-10-22 15:41 ` [PATCH v3 7/7] arm64: dts: rockchip: Add GPU power domain regulator dependency for RK3588 Sebastian Reichel
2024-10-25  8:49   ` Heiko Stübner
2024-10-23 10:05 ` [PATCH v3 0/7] Fix RK3588 GPU domain Ulf Hansson
2024-11-01 11:56   ` Ulf Hansson
2024-11-01 14:36     ` Mark Brown
2024-11-01 14:41       ` Chen-Yu Tsai
2024-11-01 19:04         ` Sebastian Reichel
2024-11-01 19:22           ` Mark Brown
2024-11-01 21:35             ` Sebastian Reichel
2024-10-25  9:19 ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).