From: Sterling-Ash <liangbaihui@linux.spacemit.com>
To: Frank Binns <frank.binns@imgtec.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev
Subject: [PATCH v3 2/2] drm/imagination: allow probe when no power-domains are described
Date: Tue, 28 Jul 2026 09:05:13 +0800 [thread overview]
Message-ID: <20260728010513.1627950-3-liangbaihui@linux.spacemit.com> (raw)
In-Reply-To: <20260728010513.1627950-1-liangbaihui@linux.spacemit.com>
pvr_power_domains_init() currently fails probe with -ENOENT when the
device tree node has no "power-domains" property. On some platforms
(e.g. SpacemiT K3) the GPU power domain is brought up by the bootloader
and is not modeled or managed by Linux, so there is legitimately no
power-domains phandle to attach.
Treat a missing "power-domains" property as "nothing to attach" and
continue probing, rather than failing.
Signed-off-by: Sterling-Ash <liangbaihui@linux.spacemit.com>
---
drivers/gpu/drm/imagination/pvr_power.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c
index a71d5b35601e..5751e2d814b0 100644
--- a/drivers/gpu/drm/imagination/pvr_power.c
+++ b/drivers/gpu/drm/imagination/pvr_power.c
@@ -635,6 +635,15 @@ int pvr_power_domains_init(struct pvr_device *pvr_dev)
domain_count = of_count_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells");
+ if (domain_count == -ENOENT) {
+ /*
+ * No "power-domains" property in the device tree: the platform
+ * handles power domains transparently or at the firmware/bootloader level,
+ * so there is no domain to attach. Treat this as non-fatal.
+ */
+ err = 0;
+ goto out;
+ }
if (domain_count < 0) {
err = domain_count;
goto out;
--
2.34.1
prev parent reply other threads:[~2026-07-28 1:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 1:49 [PATCH] " Sterling-Ash
2026-07-24 14:50 ` Alessio Belle
2026-07-27 1:22 ` [PATCH v2 0/2] drm/imagination: support GPU probe without power-domains Sterling-Ash
2026-07-27 1:22 ` [PATCH v2 1/2] dt-bindings: gpu: img,powervr-rogue: add spacemit,k3-gpu Sterling-Ash
2026-07-27 1:22 ` [PATCH v2 2/2] drm/imagination: allow probe when no power-domains are described Sterling-Ash
2026-07-28 1:05 ` [PATCH v3 0/2] drm/imagination: support GPU probe without power-domains Sterling-Ash
2026-07-28 1:05 ` [PATCH v3 1/2] dt-bindings: gpu: img,powervr-rogue: add spacemit,k3-gpu Sterling-Ash
2026-07-28 8:07 ` Krzysztof Kozlowski
2026-07-29 9:22 ` Baihui Liang
2026-07-28 8:09 ` Krzysztof Kozlowski
2026-07-28 1:05 ` Sterling-Ash [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=20260728010513.1627950-3-liangbaihui@linux.spacemit.com \
--to=liangbaihui@linux.spacemit.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
/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
all inboxes | Powered by JetHome®