From: Philippe Simons <simons.philippe@gmail.com>
To: Andre Przywara <andre.przywara@arm.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-pm@vger.kernel.org
Subject: Re: [PATCH 0/5] arm64: sunxi: h616: Enable Mali GPU
Date: Sun, 2 Mar 2025 23:44:10 +0100 [thread overview]
Message-ID: <01775d74-d72e-4a93-8a02-c13f7365d385@gmail.com> (raw)
In-Reply-To: <20250221005802.11001-1-andre.przywara@arm.com>
Tested this on a RG35XX-H (H700),
launching glmark2-es2-drm completely hangs the board.
No kernel oops or error messages.
Philippe
On 21/02/2025 01:57, Andre Przywara wrote:
> The Allwinner H616/H618/H313/H700 SoCs contain a Mali G32 MP2 GPU. This
> IP is from the Bifrost family and is already supported by the panfrost
> driver, so enabling support for 3D graphics on this SoC is rather
> straight-forward.
> However Allwinner added some bits in the PRCM block, that control the
> power domain for the GPU - on top of its power *supply*.
>
> This series enables the Mali GPU on those SoCs, by first introducing a
> power domain driver for that SoC (patch 1/5: DT binding, patch 2/5:
> the actual driver). For the Mali GPU to work we literally need to flip a
> single bit (the BSP does this in the bootloader), and this full featured
> power domain driver is admittedly a bit over the top for that purpose.
> However it seems to be the right thing to do architecturally, and while
> at it I added the other power domains (for analogue, PLLs, and the
> management core), even though we won't use them in Linux and they would
> be always on. I have a simpler version of the driver which just covers
> this single bit controlling the GPU, please let me know if you prefer
> that.
> Please also note that this supersedes an RFC patch I sent a year ago,
> which included this power domain in the R-CCU driver:
> https://lore.kernel.org/linux-sunxi/20240225160616.15001-1-andre.przywara@arm.com/T/#u
>
> The rest of the patches enable the Mali GPU on the DT side: patch 3/5
> adds the compatible string to the Mali DT binding, while patch 4/5 adds
> the purely SoC specific DT nodes, for both the power domain and the Mali
> GPU. The final patch 5/5 then enables the GPU on all existing H616-family
> boards.
>
> There seems to be an existing problem with powering up the GPU, after it
> has been turned off by the kernel. Chances are this is a problem with the
> proper power-up (or power-down) sequence, where clock gates, reset lines
> and the power domain must be asserted in a specific order.
> A workaround used so far downstream is to keep the power domain enabled,
> by ignoring the power-off request. Observing any assumed "proper" sequence
> is a bit more tricky, since there is no Allwinner specific glue driver
> or anything, so things would need be changed in the generic panfrost
> code, where they have the potential of breaking other Mali users.
> I would be interested in hearing opinions about this.
>
> Cheers,
> Andre
>
> Andre Przywara (5):
> dt-bindings: power: Add Allwinner H6/H616 PRCM PPU
> pmdomain: sunxi: add H6 PRCM PPU driver
> dt-bindings: gpu: mali-bifrost: Add Allwinner H616 compatible
> arm64: dts: allwinner: h616: Add Mali GPU node
> arm64: dts: allwinner: h616: enable Mali GPU for all boards
>
> .../bindings/gpu/arm,mali-bifrost.yaml | 1 +
> .../power/allwinner,sun50i-h6-prcm-ppu.yaml | 42 ++++
> .../dts/allwinner/sun50i-h313-tanix-tx1.dts | 5 +
> .../sun50i-h616-bigtreetech-cb1.dtsi | 5 +
> .../allwinner/sun50i-h616-orangepi-zero.dtsi | 4 +
> .../allwinner/sun50i-h616-orangepi-zero2.dts | 4 +
> .../dts/allwinner/sun50i-h616-x96-mate.dts | 5 +
> .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 21 ++
> .../sun50i-h618-longan-module-3h.dtsi | 5 +
> .../allwinner/sun50i-h618-orangepi-zero2w.dts | 5 +
> .../allwinner/sun50i-h618-orangepi-zero3.dts | 4 +
> .../sun50i-h618-transpeed-8k618-t.dts | 5 +
> .../sun50i-h618-yuzukihd-chameleon.dts | 5 +
> .../sun50i-h700-anbernic-rg35xx-2024.dts | 5 +
> drivers/pmdomain/sunxi/Kconfig | 10 +
> drivers/pmdomain/sunxi/Makefile | 1 +
> drivers/pmdomain/sunxi/sun50i-h6-prcm-ppu.c | 191 ++++++++++++++++++
> 17 files changed, 318 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/allwinner,sun50i-h6-prcm-ppu.yaml
> create mode 100644 drivers/pmdomain/sunxi/sun50i-h6-prcm-ppu.c
>
prev parent reply other threads:[~2025-03-02 22:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 0:57 [PATCH 0/5] arm64: sunxi: h616: Enable Mali GPU Andre Przywara
2025-02-21 0:57 ` [PATCH 1/5] dt-bindings: power: Add Allwinner H6/H616 PRCM PPU Andre Przywara
2025-02-21 23:43 ` Rob Herring (Arm)
2025-02-21 0:57 ` [PATCH 2/5] pmdomain: sunxi: add H6 PRCM PPU driver Andre Przywara
2025-02-21 18:10 ` Jernej Škrabec
2025-04-16 15:00 ` Andre Przywara
2025-02-27 22:43 ` Ulf Hansson
2025-04-16 15:01 ` Andre Przywara
2025-02-21 0:58 ` [PATCH 3/5] dt-bindings: gpu: mali-bifrost: Add Allwinner H616 compatible Andre Przywara
2025-02-21 18:11 ` Jernej Škrabec
2025-02-21 23:44 ` Rob Herring (Arm)
2025-02-21 0:58 ` [PATCH 4/5] arm64: dts: allwinner: h616: Add Mali GPU node Andre Przywara
2025-02-21 18:14 ` Jernej Škrabec
2025-02-21 0:58 ` [PATCH 5/5] arm64: dts: allwinner: h616: enable Mali GPU for all boards Andre Przywara
2025-02-21 18:15 ` Jernej Škrabec
2025-03-02 22:44 ` Philippe Simons [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01775d74-d72e-4a93-8a02-c13f7365d385@gmail.com \
--to=simons.philippe@gmail.com \
--cc=airlied@gmail.com \
--cc=andre.przywara@arm.com \
--cc=boris.brezillon@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
--cc=ulf.hansson@linaro.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox