From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: robh@kernel.org, dri-devel@lists.freedesktop.org,
conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 08/21] drm/panel: himax-hx8394: set prepare_prev_first
Date: Fri, 14 Aug 2026 00:18:47 +0000 [thread overview]
Message-ID: <20260814001852.45AFA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260413-waveshare-dsi-touch-v3-8-3aeb53022c32@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Incorrectly setting `prepare_prev_first = true` reverses the power-on sequence, causing the DSI host to drive the PHY (LP-11) before the panel is powered on, risking hardware latch-up.
--
--- Patch [8]: [PATCH v3 08/21] drm/panel: himax-hx8394: set prepare_prev_first ---
commit c09b3f2141b3b76647c1bce815022a8389dcf60f
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drm/panel: himax-hx8394: set prepare_prev_first
This commit sets the prepare_prev_first flag for the Himax hx8394 panel.
The flag reverses the pre_enable and prepare ordering in the DRM bridge
chain so the DSI host powers on before the panel.
> Sending DSI commands from the prepare() callback requires DSI link to be
> up at that point.
Is this description accurate? Looking at panel-himax-hx8394.c, the DSI
commands are actually sent in the enable callback, not prepare():
drivers/gpu/drm/panel/panel-himax-hx8394.c:hx8394_enable() {
...
ctx->desc->init_sequence(&dsi_ctx);
...
}
During enable, the DSI host is already fully powered on and initialized,
rendering prepare_prev_first unnecessary.
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> index c4d3e09a228da..d64f3521eb15b 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
> @@ -792,6 +792,8 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
> if (ret)
> return ret;
>
> + ctx->panel.prepare_prev_first = true;
> +
[Severity: High]
Does setting this flag reverse the power-on sequence, causing the DSI host
to drive the PHY (LP-11) before the panel is powered on?
Because of this flag, panel power-on executes after the host has already
driven the DSI lanes. For example, in hx8394_prepare():
drivers/gpu/drm/panel/panel-himax-hx8394.c:hx8394_prepare() {
...
ret = regulator_enable(ctx->vcc);
...
}
This executes after the host is initialized, which is a hardware sequencing
violation. Could this lead to current leakage, potential hardware latch-up,
or PHY initialization timeouts on strict DSI hosts?
> drm_panel_add(&ctx->panel);
>
> ret = mipi_dsi_attach(dsi);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260413-waveshare-dsi-touch-v3-0-3aeb53022c32@oss.qualcomm.com?part=8
next prev parent reply other threads:[~2026-08-14 0:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 14:05 [PATCH v3 00/21] drm/panel: support Waveshare DSI TOUCH kits Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 01/21] dt-bindings: display/panel: himax,hx83102: describe Waveshare panel Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 02/21] dt-bindings: display/panel: himax,hx8394: " Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 03/21] dt-bindings: display/panel: jadard,jd9365da-h3: " Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 04/21] dt-bindings: display/panel: ilitek,ili9881c: " Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 05/21] dt-bindings: dipslay/panel: describe panels using Focaltech OTA7290B Dmitry Baryshkov
2026-04-14 6:46 ` Krzysztof Kozlowski
2026-04-13 14:05 ` [PATCH v3 06/21] drm/of: add helper to count data-lanes on a remote endpoint Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 07/21] drm/panel: himax-hx83102: support Waveshare 12.3" DSI panel Dmitry Baryshkov
2026-04-14 12:57 ` Neil Armstrong
2026-04-23 21:26 ` Linus Walleij
2026-04-13 14:05 ` [PATCH v3 08/21] drm/panel: himax-hx8394: set prepare_prev_first Dmitry Baryshkov
2026-08-14 0:18 ` sashiko-bot [this message]
2026-04-13 14:05 ` [PATCH v3 09/21] drm/panel: himax-hx8394: simplify hx8394_enable() Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 10/21] drm/panel: himax-hx8394: support Waveshare DSI panels Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 11/21] drm/panel: jadard-jd9365da-h3: use drm_connector_helper_get_modes_fixed Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 12/21] drm/panel: jadard-jd9365da-h3: support variable DSI configuration Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 13/21] drm/panel: jadard-jd9365da-h3: set prepare_prev_first Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 14/21] drm/panel: jadard-jd9365da-h3: support Waveshare round DSI panels Dmitry Baryshkov
2026-04-14 12:58 ` Neil Armstrong
2026-04-23 21:26 ` Linus Walleij
2026-04-13 14:05 ` [PATCH v3 15/21] drm/panel: jadard-jd9365da-h3: support Waveshare WXGA " Dmitry Baryshkov
2026-04-14 12:58 ` Neil Armstrong
2026-04-23 21:26 ` Linus Walleij
2026-04-13 14:05 ` [PATCH v3 16/21] drm/panel: jadard-jd9365da-h3: support Waveshare 720p " Dmitry Baryshkov
2026-04-14 12:59 ` Neil Armstrong
2026-04-23 21:27 ` Linus Walleij
2026-04-13 14:05 ` [PATCH v3 17/21] drm/panel: ilitek-ili9881c: support Waveshare 7.0" DSI panel Dmitry Baryshkov
2026-04-23 21:24 ` Linus Walleij
2026-04-13 14:05 ` [PATCH v3 18/21] drm/panel: add devm_drm_panel_add() helper Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 19/21] drm/panel: add driver for Waveshare 8.8" DSI TOUCH-A panel Dmitry Baryshkov
2026-04-13 14:05 ` [PATCH v3 20/21] dt-bindings: gpio: describe Waveshare GPIO controller Dmitry Baryshkov
2026-04-13 15:39 ` Conor Dooley
2026-04-13 14:05 ` [PATCH v3 21/21] gpio: add GPIO controller found on Waveshare DSI TOUCH panels Dmitry Baryshkov
2026-04-17 23:11 ` (subset) [PATCH v3 00/21] drm/panel: support Waveshare DSI TOUCH kits Dmitry Baryshkov
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=20260814001852.45AFA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox