From: Maíra Canal <mcanal@igalia.com>
To: Stefan Wahren <wahrenst@gmx.net>,
Maxime Ripard <mripard@kernel.org>, Melissa Wen <mwen@igalia.com>,
Iago Toral Quiroga <itoral@igalia.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: dri-devel@lists.freedesktop.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
kernel-dev@igalia.com, Philipp Zabel <p.zabel@pengutronix.de>,
Maíra Canal <mcanal@igalia.com>
Subject: [PATCH v8 1/3] drm/v3d: Use devm_reset_control_get_optional_exclusive()
Date: Sat, 28 Mar 2026 15:52:47 -0300 [thread overview]
Message-ID: <20260328-v3d-power-management-v8-1-94336830df5f@igalia.com> (raw)
In-Reply-To: <20260328-v3d-power-management-v8-0-94336830df5f@igalia.com>
Simplify optional reset handling by using the function
devm_reset_control_get_optional_exclusive().
Reviewed-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
drivers/gpu/drm/v3d/v3d_drv.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 4b441afcb602de08bd193d57649121e44ab31f2a..c5e7c778ec7a1a39d81155f7ed2a7ba811b5e3aa 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -401,18 +401,17 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
v3d_perfmon_init(v3d);
- v3d->reset = devm_reset_control_get_exclusive(dev, NULL);
+ v3d->reset = devm_reset_control_get_optional_exclusive(dev, NULL);
if (IS_ERR(v3d->reset)) {
- ret = PTR_ERR(v3d->reset);
+ ret = dev_err_probe(dev, PTR_ERR(v3d->reset),
+ "Failed to get reset control\n");
+ goto clk_disable;
+ }
- if (ret == -EPROBE_DEFER)
- goto clk_disable;
-
- v3d->reset = NULL;
+ if (!v3d->reset) {
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
if (ret) {
- dev_err(dev,
- "Failed to get reset control or bridge regs\n");
+ dev_err(dev, "Failed to get bridge registers\n");
goto clk_disable;
}
}
--
2.53.0
next prev parent reply other threads:[~2026-03-28 18:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 18:52 [PATCH v8 0/3] Power Management for Raspberry Pi V3D GPU Maíra Canal
2026-03-28 18:52 ` Maíra Canal [this message]
2026-03-30 18:43 ` [PATCH v8 1/3] drm/v3d: Use devm_reset_control_get_optional_exclusive() Florian Fainelli
2026-03-31 7:53 ` Claude review: " Claude Code Review Bot
2026-03-28 18:52 ` [PATCH v8 2/3] drm/v3d: Allocate all resources before enabling the clock Maíra Canal
2026-03-30 18:44 ` Florian Fainelli
2026-03-31 7:53 ` Claude review: " Claude Code Review Bot
2026-03-28 18:52 ` [PATCH v8 3/3] drm/v3d: Introduce Runtime Power Management Maíra Canal
2026-03-30 18:46 ` Florian Fainelli
2026-03-31 7:53 ` Claude review: " Claude Code Review Bot
2026-03-31 7:53 ` Claude review: Power Management for Raspberry Pi V3D GPU Claude Code Review Bot
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=20260328-v3d-power-management-v8-1-94336830df5f@igalia.com \
--to=mcanal@igalia.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=itoral@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=p.zabel@pengutronix.de \
--cc=wahrenst@gmx.net \
/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