Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "YİĞİTCAN KAVAKLI" <kavakliyigitcan@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-leds@vger.kernel.org,
	linux-input@vger.kernel.org, conor+dt@kernel.org,
	robh@kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH RFC 04/10] drm/panel: novatek-nt36672a: add Tianma FHD+ video mode panel
Date: Fri, 11 Sep 2026 09:09:56 +0000	[thread overview]
Message-ID: <20260911090957.12C931F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260911-ginkgo-submission-final-v1-4-0e68e63a18d4@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Hardware initialization and teardown sequence reversal
- [Low] Unconditional delay on error path due to bypassing `mipi_dsi_msleep()`
--

commit 3b4bbeb999e6951e81e05057ded69945b990ecb4
Author: YİĞİTCAN KAVAKLI <kavakliyigitcan@gmail.com>

drm/panel: novatek-nt36672a: add Tianma FHD+ video mode panel

This commit adds support for the 1080x2340 Tianma video mode panel with
Novatek NT36672A driver IC. It adds display mode timings, DCS initialization
sequences, and standard DRM panel enable and disable callbacks to coordinate
display commands with the active DSI video stream.

> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
> index 464d9ce47d87d..b69213790441f 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
> @@ -92,18 +92,12 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel)
>  	struct mipi_dsi_multi_context dsi_ctx = { .dsi = pinfo->link };
>  
>  	/* send off cmds */
>  	if (pinfo->desc->send_deinit_cmds)
>  		pinfo->desc->send_deinit_cmds(&dsi_ctx);

[Severity: High]
Does this sequence execute deinitialization commands after the panel is already
turned off? The new disable callback will turn off the display before the
unprepare callback runs, meaning the panel might not be able to process these
deinitialization commands correctly.

[ ... ]
> @@ -146,19 +139,41 @@ static int nt36672a_panel_prepare(struct drm_panel *panel)
>  
>  	mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>  
> -	/* 0x46 = 70 ms delay */
> -	mipi_dsi_msleep(&dsi_ctx, 70);
> -
> -	mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +	/* 80 ms delay as per DCS spec / downstream timing */
> +	msleep(80);

[Severity: Low]
Does this unconditional msleep() cause unnecessary delays on error paths?
Because this replaces mipi_dsi_msleep(), if the preceding DCS commands
fail, dsi_ctx.accum_err is set, but this code will still unconditionally
sleep for 80ms.

>  
>  	/* Send rest of the init cmds */
>  	if (pinfo->desc->send_init_cmds_2)
>  		pinfo->desc->send_init_cmds_2(&dsi_ctx);

[Severity: High]
Will the panel properly handle these secondary initialization commands while 
the display is still off? Since this patch moves the set display on command
into the enable callback, these post-on brightness settings are being sent
before the display is turned on, which might cause initialization failures or
visual artifacts.

[ ... ]
> +static int nt36672a_panel_enable(struct drm_panel *panel)
> +{
> +	struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = pinfo->link };
> +
> +	mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> +	/* Frame settling delay */
> +	msleep(20);

[Severity: Low]
Does this msleep() also need to check for preceding errors? This creates an
unconditional sleep that ignores potential errors from the preceding 
mipi_dsi_dcs_set_display_on_multi() call.

> +
> +	return dsi_ctx.accum_err;
> +}
> +
> +static int nt36672a_panel_disable(struct drm_panel *panel)
> +{
> +	struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = pinfo->link };
> +
> +	mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
> +
> +	/* 120ms delay as per DCS spec */
> +	msleep(120);

[Severity: Low]
Similar to the enable path, is this unconditional sleep intended? It ignores
potential errors from the preceding mipi_dsi_dcs_set_display_off_multi() call,
causing unnecessary delays during teardown failures.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-ginkgo-submission-final-v1-0-0e68e63a18d4@gmail.com?part=4

  reply	other threads:[~2026-09-11  9:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  8:50 [PATCH RFC 00/10] arm64: qcom: sm6125-ginkgo: display, backlight, and touch support YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  8:50 ` [PATCH RFC 01/10] dt-bindings: backlight: add Kinetic KTD3136 YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  8:56   ` sashiko-bot
2026-09-11  8:50 ` [PATCH RFC 02/10] backlight: add Kinetic KTD3136 driver YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  8:59   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 03/10] dt-bindings: display: panel: novatek,nt36672a: add Tianma FHD+ video mode variant YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  8:53   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 04/10] drm/panel: novatek-nt36672a: add Tianma FHD+ video mode panel YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:09   ` sashiko-bot [this message]
2026-09-11  8:51 ` [PATCH RFC 05/10] dt-bindings: input: touchscreen: add Novatek NT36672A SPI touchscreen YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  8:58   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 06/10] Input: novatek-nt36672a-spi: add driver for " YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:02   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 07/10] drm/msm/dpu: describe SM6125 programmable-fetch delayed-start quirk YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:01   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 08/10] drm/msm/dsi: make command and video mode configuration mutually exclusive YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:00   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 09/10] drm/msm/dsi: separate host link enable from video stream enable YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:04   ` sashiko-bot
2026-09-11  8:51 ` [PATCH RFC 10/10] arm64: dts: qcom: sm6125-xiaomi-ginkgo: enable display, backlight and touchscreen YİĞİTCAN KAVAKLI via B4 Relay
2026-09-11  9:04   ` 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=20260911090957.12C931F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kavakliyigitcan@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-leds@vger.kernel.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