From: sashiko-bot@kernel.org
To: "Chris Morgan" <macroalpha82@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH V6 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel
Date: Mon, 08 Jun 2026 18:06:38 +0000 [thread overview]
Message-ID: <20260608180638.A72171F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260608175521.67449-5-macroalpha82@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Requesting `reset_gpio` as `GPIOD_OUT_LOW` in probe backpowers the panel, and missing reset assertion in the `prepare` error path leaves the panel backpowered.
- [Low] The driver calls a non-existent function `devm_drm_panel_add()`, causing a compilation failure.
--
commit 0a4500b372d995ebf665c9896430451a3e287a41
Author: Chris Morgan <macromorgan@hotmail.com>
drm/panel: anbernic-td4310: Add RG Vita Pro panel
The panel used by Anbernic in the RG Vita-Pro is a DSI panel based
on the TD4310 controller IC.
> diff --git a/drivers/gpu/drm/panel/panel-anbernic-td4310.c b/drivers/gpu/drm/panel/panel-anbernic-td4310.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-anbernic-td4310.c
[ ... ]
> +static int panel_anbernic_td4310_prepare(struct drm_panel *panel)
> +{
[ ... ]
> + if (dsi_ctx.accum_err) {
> + ret = dsi_ctx.accum_err;
> + goto err_reset;
> + }
> +
> + return 0;
> +
> +err_reset:
> + gpiod_set_value_cansleep(ctx->enable_gpio, 0);
> +err_enable:
> + regulator_disable(ctx->vdd);
[Severity: High]
The err_reset path disables the VDD regulator without re-asserting the reset
GPIO (setting it to logical 1 / physical LOW). Could this leave the unpowered
panel backpowered through its IO lines if the prepare sequence fails?
> + return ret;
> +}
[ ... ]
> +static int panel_anbernic_td4310_probe(struct mipi_dsi_device *dsi)
> +{
[ ... ]
> + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
> + if (ret < 0)
> + return dev_err_probe(dev, ret, "Failed to get panel orientation\n");
> +
> + ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
[Severity: High]
Assuming the reset GPIO is configured as active-low in the device tree,
requesting it with GPIOD_OUT_LOW sets its logical value to 0, which drives
the physical pin HIGH.
Because the panel's VDD supply is off at probe time, will driving the
reset pin HIGH backpower the panel via its IO protection diodes?
> + if (IS_ERR(ctx->reset_gpio))
> + return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
> + "Cannot get reset gpio\n");
[ ... ]
> + dsi->mode_flags = ctx->panel_info->mode_flags;
> +
> + ret = drm_panel_of_backlight(&ctx->panel);
> + if (ret)
> + return ret;
> +
> + devm_drm_panel_add(dev, &ctx->panel);
[Severity: Low]
Is devm_drm_panel_add() defined in the DRM panel API? It appears only
drm_panel_add() and devm_drm_panel_add_follower() are available, which
might cause an implicit declaration build error here.
> +
> + ret = devm_mipi_dsi_attach(dev, dsi);
> + if (ret < 0)
> + return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> +
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260608175521.67449-1-macroalpha82@gmail.com?part=4
next prev parent reply other threads:[~2026-06-08 18:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 17:55 [PATCH V6 0/6] Add Anbernic RG Vita-Pro Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 17:55 ` [PATCH V6 1/6] dt-bindings: power: supply: sgm41542: document sgm41542 Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 17:55 ` [PATCH V6 2/6] power: supply: sgm41542: Add SG Micro sgm41542 charger Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 18:09 ` sashiko-bot
2026-06-08 21:19 ` Sebastian Reichel
2026-06-08 21:19 ` Sebastian Reichel
2026-06-08 17:55 ` [PATCH V6 3/6] dt-bindings: display: panel: Add Anbernic TD4310 panel Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 17:55 ` [PATCH V6 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 18:06 ` sashiko-bot [this message]
2026-06-08 17:55 ` [PATCH V6 5/6] dt-bindings: arm: rockchip: Add Anbernic RG Vita-Pro Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 17:55 ` [PATCH V6 6/6] arm64: dts: " Chris Morgan
2026-06-08 17:55 ` Chris Morgan
2026-06-08 18:12 ` sashiko-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=20260608180638.A72171F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=macroalpha82@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.