mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Avinal Kumar <avinal.xlvii@gmail.com>, dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	simona@ffwll.ch
Subject: Re: [PATCH v2 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
Date: Tue, 13 Jan 2026 09:48:55 +0100	[thread overview]
Message-ID: <8647ce72-7fce-48b4-be88-099ebc865423@linaro.org> (raw)
In-Reply-To: <20260109155203.34886-1-avinal.xlvii@gmail.com>

On 1/9/26 16:52, Avinal Kumar wrote:
> Add mipi_dsi_shutdown_peripheral_multi function and mark
> mipi_dsi_shutdown_peripheral fucntion as deprecated.
> 
> Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
> ---
>   drivers/gpu/drm/drm_mipi_dsi.c | 28 ++++++++++++++++++++++++++++
>   include/drm/drm_mipi_dsi.h     |  1 +
>   2 files changed, 29 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index a712e177b350..2fed50172a44 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -587,6 +587,9 @@ EXPORT_SYMBOL(mipi_dsi_create_packet);
>    * mipi_dsi_shutdown_peripheral() - sends a Shutdown Peripheral command
>    * @dsi: DSI peripheral device
>    *
> + * This function is deprecated. Use mipi_dsi_shutdown_peripheral_multi()
> + * instead.
> + *
>    * Return: 0 on success or a negative error code on failure.
>    */
>   int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi)
> @@ -1980,6 +1983,31 @@ void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_dsi_multi_context *ctx,
>   }
>   EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline_multi);
>   
> +/**
> + * mipi_dsi_shutdown_peripheral_multi() - sends a Shutdown Peripheral command
> + * @ctx: Context for multiple DSI transactions
> + *
> + * Like mipi_dsi_shutdown_peripheral() but deals with errors in a way that
> + * makes it convienient to make seeral calls in a row.
> + */
> +void mipi_dsi_shutdown_peripheral_multi(struct mipi_dsi_multi_context *ctx)
> +{
> +	struct mipi_dsi_device *dsi = ctx->dsi;
> +	struct device *dev = &dsi->dev;
> +	int ret;
> +
> +	if (ctx->accum_err)
> +		return;
> +
> +	ret = mipi_dsi_shutdown_peripheral(dsi);
> +	if (ret < 0) {
> +		ctx->accum_err = ret;
> +		dev_err(dev, "Failed to shutdown peripheral: %d\n",
> +			ctx->accum_err);
> +	}
> +}
> +EXPORT_SYMBOL(mipi_dsi_shutdown_peripheral_multi);
> +
>   static int mipi_dsi_drv_probe(struct device *dev)
>   {
>   	struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 3aba7b380c8d..19ccdf5eeb5f 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -389,6 +389,7 @@ void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx,
>   void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_dsi_multi_context *ctx,
>   					  u16 scanline);
>   void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx);
> +void mipi_dsi_shutdown_peripheral_multi(struct mipi_dsi_multi_context *ctx);
>   
>   /**
>    * mipi_dsi_generic_write_seq_multi - transmit data using a generic write packet

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

  parent reply	other threads:[~2026-01-13  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 15:52 Avinal Kumar
2026-01-09 15:52 ` [PATCH v2 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
2026-01-13  8:49   ` neil.armstrong
2026-01-13  8:48 ` neil.armstrong [this message]
2026-01-13  8:57 ` [PATCH v2 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi neil.armstrong

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=8647ce72-7fce-48b4-be88-099ebc865423@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=avinal.xlvii@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®