From: sashiko-bot@kernel.org
To: "Qianhui Xu" <xiaqinghuan@mail.ustc.edu.cn>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/panel: novatek-nt36536: reject enable when prepare failed
Date: Tue, 01 Dec 2026 09:23:07 +0000 [thread overview]
Message-ID: <sashiko-outbox-242969@kernel.org> (raw)
In-Reply-To: <20261201091454.153619-5-xiaqinghuan@mail.ustc.edu.cn>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] drm/panel: novatek_enable() reaches into drm_panel core
panel->prepared state
- [Low] drm/panel: missing Fixes trailer in commit message
--
commit bda58794a2620a7efd289beb14b6a30327dba914
Author: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
> drm/panel: novatek-nt36536: reject enable when prepare failed
>
> drm_panel_prepare() cannot report a failure to its caller, so the enable
> part of the bridge chain still runs with panel->prepared unset. Provide an
> enable() callback that returns -EIO in that case, so the panel is not
> marked as enabled and the backlight stays off.
>
> Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
[Severity: Low]
Should this include a Fixes tag for the commit that introduced the driver?
Fixes: 75a5dbd1f4f7 ("drm/panel: Add Novatek NT36536 panel driver")
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36536.c b/drivers/gpu/drm/panel/panel-novatek-nt36536.c
> index 88a003f5a9441..698e7b85a8a76 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt36536.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36536.c
> @@ -123,6 +123,12 @@ static int novatek_prepare(struct drm_panel *panel)
> return ret;
> }
>
> +static int novatek_enable(struct drm_panel *panel)
> +{
> + /* The bridge enable chain can continue after a failed prepare callback. */
> + return panel->prepared ? 0 : -EIO;
> +}
[Severity: Low]
Should panel->prepared be checked in drm_panel_enable() instead of in a
driver-specific enable() callback?
Commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in
drm_panel") centralized panel->prepared and panel->enabled tracking in
drivers/gpu/drm/drm_panel.c so individual panel drivers do not inspect it,
and drm_panel_funcs.enable is otherwise optional for drivers whose power-on
sequence runs in prepare(). Checking panel->prepared in drm_panel_enable()
before setting panel->enabled and enabling panel->backlight would avoid
reaching into drm_panel core state here and cover all panel drivers without
their own enable step.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201091454.153619-1-xiaqinghuan@mail.ustc.edu.cn?part=4
prev parent reply other threads:[~2026-12-01 9:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:14 [PATCH 0/4] drm/panel: novatek-nt36536: mode additions and lifecycle fixes for CSOT PP8807HB1-1 Qianhui Xu
2026-12-01 9:14 ` [PATCH 1/4] drm/panel: novatek-nt36536: add 40Hz and 24Hz modes " Qianhui Xu
2026-12-01 9:14 ` [PATCH 2/4] drm/panel: novatek-nt36536: finish setup before attaching DSI devices Qianhui Xu
2026-12-01 9:22 ` sashiko-bot
2026-12-01 9:14 ` [PATCH 3/4] drm/panel: novatek-nt36536: power off on any prepare failure Qianhui Xu
2026-12-01 9:20 ` sashiko-bot
2026-12-01 9:14 ` [PATCH 4/4] drm/panel: novatek-nt36536: reject enable when prepare failed Qianhui Xu
2026-12-01 9:23 ` sashiko-bot [this message]
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-242969@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xiaqinghuan@mail.ustc.edu.cn \
/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