From: sashiko-bot@kernel.org
To: "Nickolay Goppen" <setotau@mainlining.org>
Cc: robh@kernel.org, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RFC 2/2] drivers: gpu: drm: panel: Add BOE NT51021 driver
Date: Sat, 29 Aug 2026 20:19:31 +0000 [thread overview]
Message-ID: <20260829201932.1BFEB1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260829-qcom-novatek-nt51021-panels-v1-2-cc1ca61bd261@mainlining.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The panel initialization sequence lacks the DCS 'Set Display On' (0x29) command.
- [Medium] Missing reset assertion and stabilization delay during panel preparation.
--
commit 864f3dccc86bc8a97845ebafd73a7df32e9d6b9e
Author: Nickolay Goppen <setotau@mainlining.org>
drivers: gpu: drm: panel: Add BOE NT51021 driver
This commit adds support for the BOE NT51021-based 8-inch and 10-inch DSI
video mode panels used in Xiaomi Mi Pad 4 tablets. It includes panel
initialization sequences and content-adaptive brightness control.
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt51021.c b/drivers/gpu/drm/panel/panel-novatek-nt51021.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt51021.c
[ ... ]
> +static void nt51021_boe_reset(struct boe_nt51021_desc *ctx)
> +{
> + gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> + usleep_range(10000, 11000);
> +}
[Severity: Medium]
Does the panel require an explicit reset assertion pulse before de-asserting
the reset line? The current code only de-asserts the reset line here. Without
an explicit assertion pulse and delay prior to de-assertion, the hardware
might not be guaranteed a valid minimum reset pulse width once power is stable.
[ ... ]
> +static int nt51021_boe_8_init(struct boe_nt51021_desc *ctx)
> +{
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
[ ... ]
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> + mipi_dsi_usleep_range(&dsi_ctx, 5000, 6000);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x8f, 0x00);
> + mipi_dsi_usleep_range(&dsi_ctx, 1000, 2000);
> +
> + nt51021_cabc_on(&dsi_ctx);
> +
> + return dsi_ctx.accum_err;
> +}
[Severity: Medium]
Does this initialization sequence miss a DCS "Set Display On" command?
The panel is awakened from sleep mode via mipi_dsi_dcs_exit_sleep_mode_multi(),
but it is never explicitly instructed to turn on the display output here in
nt51021_boe_8_init(). This could cause the panel to remain blank on some DSI
hosts.
[ ... ]
> +static int nt51021_boe_10wu_init(struct boe_nt51021_desc *ctx)
> +{
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
[ ... ]
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> + mipi_dsi_usleep_range(&dsi_ctx, 5000, 6000);
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x8f, 0x00);
> + mipi_dsi_usleep_range(&dsi_ctx, 1000, 2000);
> +
> + nt51021_cabc_on(&dsi_ctx);
> + mipi_dsi_usleep_range(&dsi_ctx, 1000, 2000);
> +
> + return dsi_ctx.accum_err;
> +}
[Severity: Medium]
Similarly to nt51021_boe_8_init(), the 10-inch variant initialization path
also appears to omit the mipi_dsi_dcs_set_display_on_multi() command.
> +static int nt51021_boe_off(struct boe_nt51021_desc *ctx)
> +{
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> + nt51021_cabc_off(&dsi_ctx);
> +
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x8f, 0xa5);
> + mipi_dsi_msleep(&dsi_ctx, 20);
> + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
[Severity: Medium]
The power-off sequence explicitly turns the display off using
mipi_dsi_dcs_set_display_off_multi(). Should there be a matching turn-on
command in the initialization sequences to ensure the display activates
correctly across power cycles?
[ ... ]
> +static int nt51021_boe_prepare(struct drm_panel *panel)
> +{
> + struct boe_nt51021_desc *ctx = to_boe_panel(panel);
> + struct device *dev = &ctx->dsi->dev;
> + int ret;
> +
> + ret = regulator_bulk_enable(ARRAY_SIZE(nt51021_boe_supplies), ctx->supplies);
> + if (ret < 0) {
> + dev_err(dev, "Failed to enable regulators: %d\n", ret);
> + return ret;
> + }
> + nt51021_boe_reset(ctx);
[Severity: Medium]
Does the panel require a stabilization delay after enabling the regulators
and before de-asserting the reset line? The current code immediately calls
nt51021_boe_reset(ctx). Without a delay, the reset logic might execute
before the regulators have fully ramped up, potentially leading to unstable
hardware initialization.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260829-qcom-novatek-nt51021-panels-v1-0-cc1ca61bd261@mainlining.org?part=2
next prev parent reply other threads:[~2026-08-29 20:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 20:09 [PATCH RFC 0/2] Novatek NT51021 DSI panel IC driver Nickolay Goppen
2026-08-29 20:09 ` [PATCH RFC 1/2] dt-bindings: display: panel: Add bindings for Novatek NT51021 Nickolay Goppen
2026-08-29 20:14 ` sashiko-bot
2026-08-29 20:18 ` Nickolay Goppen
2026-08-30 12:59 ` Neil Armstrong
2026-08-29 20:09 ` [PATCH RFC 2/2] drivers: gpu: drm: panel: Add BOE NT51021 driver Nickolay Goppen
2026-08-29 20:19 ` sashiko-bot [this message]
2026-08-29 20:27 ` Nickolay Goppen
2026-08-29 20:32 ` Nickolay Goppen
2026-08-29 20:35 ` Nickolay Goppen
2026-08-30 12:58 ` Neil Armstrong
2026-09-07 8:35 ` Uwe Kleine-König
2026-09-07 6:01 ` [PATCH RFC 0/2] Novatek NT51021 DSI panel IC driver Ryan Brue
2026-09-07 6:42 ` Nickolay Goppen
2026-09-07 23:27 ` Ryan Brue
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=20260829201932.1BFEB1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=setotau@mainlining.org \
/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.