dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Akash Sukhavasi" <akash.sukhavasi@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions
Date: Tue, 28 Jul 2026 01:50:51 +0000	[thread overview]
Message-ID: <20260728015051.97FA71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727-mipi-dsi-tl070wsh30-multi-v2-1-f47b937631d3@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unintended short-circuiting of the panel power-down sequence on error.
--

--- Patch [1]: [PATCH v2] drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions ---
commit dccc547d72f30cdc8106a575cdc689ca0fbc4142
Author: Akash Sukhavasi <akash.sukhavasi@gmail.com>

drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions

This commit converts the tdo-tl070wsh30 panel driver to use the
mipi_dsi_*_multi() API. It also updates unprepare() to disable the
regulator unconditionally and return 0.

Link: https://lore.kernel.org/r/20260725-mipi-dsi-tl070wsh30-multi-v1-1-69160b83982e@gmail.com

> diff --git a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c
> index 13cfe252a838d..cd846e5ab2e7e 100644
> --- a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c
> +++ b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c

[ ... ]

>  static int tdo_tl070wsh30_panel_unprepare(struct drm_panel *panel)
>  {
>  	struct tdo_tl070wsh30_panel *tdo_tl070wsh30 = to_tdo_tl070wsh30_panel(panel);
> -	int err;
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = tdo_tl070wsh30->link };
>  
> -	err = mipi_dsi_dcs_set_display_off(tdo_tl070wsh30->link);
> -	if (err < 0)
> -		dev_err(panel->dev, "failed to set display off: %d\n", err);
> +	mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
>  
> -	usleep_range(10000, 11000);
> +	mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
>  
> -	err = mipi_dsi_dcs_enter_sleep_mode(tdo_tl070wsh30->link);
> -	if (err < 0) {
> -		dev_err(panel->dev, "failed to enter sleep mode: %d\n", err);
> -		return err;
> -	}
> +	mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
>  
> -	usleep_range(10000, 11000);
> +	mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
>  
>  	regulator_disable(tdo_tl070wsh30->supply);

[Severity: Medium]
Does this unintentionally short-circuit the panel power-down sequence on error?

In the original code, if mipi_dsi_dcs_set_display_off fails, the error is
logged but execution continues. This ensures the 10ms delays and the
enter_sleep_mode command are still processed before disabling the regulator.

With the multi API, if mipi_dsi_dcs_set_display_off_multi fails, it sets
dsi_ctx.accum_err. The subsequent mipi_dsi_usleep_range and
mipi_dsi_dcs_enter_sleep_mode_multi calls will check this accumulated error
and skip their execution entirely.

Could this immediate jump to regulator_disable violate the panel's
power-down timing requirements by skipping the mandatory delays?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-mipi-dsi-tl070wsh30-multi-v2-1-f47b937631d3@gmail.com?part=1

  reply	other threads:[~2026-07-28  1:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  1:45 [PATCH v2] drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions Akash Sukhavasi
2026-07-28  1:50 ` sashiko-bot [this message]
2026-07-30  1:55 ` Doug Anderson
2026-07-30  5:28   ` Akash Sukhavasi

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=20260728015051.97FA71F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akash.sukhavasi@gmail.com \
    --cc=dri-devel@lists.freedesktop.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