From: sashiko-bot@kernel.org
To: "Hsieh Hung-En" <hungen3108@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/panel: raydium-rm68200: Use mipi_dsi_*_multi() functions
Date: Wed, 14 Oct 2026 13:59:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-171393@kernel.org> (raw)
In-Reply-To: <20261014135028.1438841-3-hungen3108@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/panel: resource leak in rm68200_prepare() on error path
--
commit c6e53b42c5c0d14746a1b84a032e5221f6e17711
Author: Hsieh Hung-En <hungen3108@gmail.com>
drm/panel: raydium-rm68200: Use mipi_dsi_*_multi() functions
This patch replaces the deprecated MIPI DSI DCS helpers with their multi
variants in the raydium-rm68200 panel driver. It utilizes mipi_dsi_msleep to
skip delays after failed commands and defers error return to the end of the
prepare sequence.
> diff --git a/drivers/gpu/drm/panel/panel-raydium-rm68200.c b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
> index c535dc931903e..971d075bb0601 100644
> --- a/drivers/gpu/drm/panel/panel-raydium-rm68200.c
> +++ b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
[ ... ]
> @@ -258,6 +256,7 @@ static int rm68200_prepare(struct drm_panel *panel)
> {
> struct rm68200 *ctx = panel_to_rm68200(panel);
> struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
> int ret;
>
> ret = regulator_enable(ctx->supply);
[ ... ]
> rm68200_init_sequence(ctx);
>
> - ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
> - if (ret)
> - return ret;
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>
> - msleep(125);
> + mipi_dsi_msleep(&dsi_ctx, 125);
>
> - ret = mipi_dsi_dcs_set_display_on(dsi);
> - if (ret)
> - return ret;
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>
> - msleep(20);
> + mipi_dsi_msleep(&dsi_ctx, 20);
>
> - return 0;
> + return dsi_ctx.accum_err;
[Severity: Medium]
Does this error path leak the regulator reference and leave the reset GPIO
asserted?
If a DCS command fails during rm68200_prepare(), the function returns
dsi_ctx.accum_err. Because drm_panel_prepare() in the DRM core does not set
panel->prepared = true on failure, subsequent calls to drm_panel_unprepare()
return early without executing rm68200_unprepare().
If that happens, is there anything to disable ctx->supply or reset the
GPIO?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014135028.1438841-1-hungen3108@gmail.com?part=2
next prev parent reply other threads:[~2026-10-14 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 13:50 [PATCH 0/3] drm/panel: Use mipi_dsi_*_multi() in feiyang and rm68200 Hsieh Hung-En
2026-10-14 13:50 ` [PATCH 1/3] drm/panel: feiyang-fy07024di26a30d: Use mipi_dsi_*_multi() functions Hsieh Hung-En
2026-10-14 13:50 ` [PATCH 2/3] drm/panel: raydium-rm68200: " Hsieh Hung-En
2026-10-14 13:59 ` sashiko-bot [this message]
2026-10-14 13:50 ` [PATCH 3/3] drm/panel: raydium-rm68200: Use multi-context helpers for init sequence Hsieh Hung-En
2026-10-14 13:59 ` 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=sashiko-outbox-171393@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hungen3108@gmail.com \
--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.