mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions
@ 2026-04-17  6:18 Avinal Kumar
  2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
  2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
  0 siblings, 2 replies; 9+ messages in thread
From: Avinal Kumar @ 2026-04-17  6:18 UTC (permalink / raw)
  To: dri-devel, linux-kernel, neil.armstrong, dianders
  Cc: lumag, maarten.lankhorst, mripard, tzimmermann, airlied, simona

Changes from v4:
    - simplified code after removing redundant error printout
    - there was a branch mismatch on my local and that resulted in a
    typo, it was fixed in v3 but I had my v2 changes open and I
    mistook it as 'serial' rather than 'several'. Apologies, fixed it now :)
    - updated commit body 

Avinal Kumar (2):
  drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
  drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped
    functions

 drivers/gpu/drm/drm_mipi_dsi.c                | 28 +++++++++++++++++++
 .../drm/panel/panel-panasonic-vvx10f034n00.c  | 24 ++++++++--------
 include/drm/drm_mipi_dsi.h                    |  1 +
 3 files changed, 42 insertions(+), 11 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
  2026-04-17  6:18 [PATCH v5 0/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
@ 2026-04-17  6:18 ` Avinal Kumar
  2026-04-17 14:20   ` Doug Anderson
                     ` (2 more replies)
  2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
  1 sibling, 3 replies; 9+ messages in thread
From: Avinal Kumar @ 2026-04-17  6:18 UTC (permalink / raw)
  To: dri-devel, linux-kernel, neil.armstrong, dianders
  Cc: lumag, maarten.lankhorst, mripard, tzimmermann, airlied, simona

Add mipi_dsi_shutdown_peripheral_multi function and mark
mipi_dsi_shutdown_peripheral function 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 0390e14d3157..3ac1dd5ad640 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 convenient to make several 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 2ab651a36115..b429acde4f71 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -393,6 +393,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
-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions
  2026-04-17  6:18 [PATCH v5 0/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
  2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
@ 2026-04-17  6:18 ` Avinal Kumar
  2026-04-17 14:19   ` Doug Anderson
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Avinal Kumar @ 2026-04-17  6:18 UTC (permalink / raw)
  To: dri-devel, linux-kernel, neil.armstrong, dianders
  Cc: lumag, maarten.lankhorst, mripard, tzimmermann, airlied, simona

Change the panasonic-vvx10f034n00 panel to multi
style functions for improved error handling and
remove redundant error printout.

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
---
 .../drm/panel/panel-panasonic-vvx10f034n00.c  | 24 ++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
index 3c3308fc55df..d21d93a0700e 100644
--- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
+++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
@@ -44,14 +44,23 @@ static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
 
 static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
 {
-	return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
+	struct mipi_dsi_multi_context dsi_ctx = {
+		.dsi = wuxga_nt->dsi
+	};
+
+	mipi_dsi_turn_on_peripheral_multi(&dsi_ctx);
+	return dsi_ctx.accum_err;
 }
 
 static int wuxga_nt_panel_disable(struct drm_panel *panel)
 {
 	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
+	struct mipi_dsi_multi_context dsi_ctx = {
+		.dsi = wuxga_nt->dsi
+	};
 
-	return mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
+	mipi_dsi_shutdown_peripheral_multi(&dsi_ctx);
+	return dsi_ctx.accum_err;
 }
 
 static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
@@ -94,15 +103,8 @@ static int wuxga_nt_panel_prepare(struct drm_panel *panel)
 	msleep(250);
 
 	ret = wuxga_nt_panel_on(wuxga_nt);
-	if (ret < 0) {
-		dev_err(panel->dev, "failed to set panel on: %d\n", ret);
-		goto poweroff;
-	}
-
-	return 0;
-
-poweroff:
-	regulator_disable(wuxga_nt->supply);
+	if (ret < 0)
+		regulator_disable(wuxga_nt->supply);
 
 	return ret;
 }
-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions
  2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
@ 2026-04-17 14:19   ` Doug Anderson
  2026-04-19  0:33   ` Dmitry Baryshkov
  2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2026-04-17 14:19 UTC (permalink / raw)
  To: Avinal Kumar
  Cc: dri-devel, linux-kernel, neil.armstrong, lumag,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

Hi,

On Thu, Apr 16, 2026 at 11:19 PM Avinal Kumar <avinal.xlvii@gmail.com> wrote:
>
> Change the panasonic-vvx10f034n00 panel to multi
> style functions for improved error handling and
> remove redundant error printout.
>
> Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
> ---
>  .../drm/panel/panel-panasonic-vvx10f034n00.c  | 24 ++++++++++---------
>  1 file changed, 13 insertions(+), 11 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

If no other comments, I'll plan to apply to drm-misc-next in about a week.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
  2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
@ 2026-04-17 14:20   ` Doug Anderson
  2026-04-17 20:43   ` neil.armstrong
  2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2026-04-17 14:20 UTC (permalink / raw)
  To: Avinal Kumar
  Cc: dri-devel, linux-kernel, neil.armstrong, lumag,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

Hi,

On Thu, Apr 16, 2026 at 11:19 PM Avinal Kumar <avinal.xlvii@gmail.com> wrote:
>
> Add mipi_dsi_shutdown_peripheral_multi function and mark
> mipi_dsi_shutdown_peripheral function 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(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

If no other comments, I'll plan to apply to drm-misc-next in about a week.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
  2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
  2026-04-17 14:20   ` Doug Anderson
@ 2026-04-17 20:43   ` neil.armstrong
  2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: neil.armstrong @ 2026-04-17 20:43 UTC (permalink / raw)
  To: Avinal Kumar, dri-devel, linux-kernel, dianders
  Cc: lumag, maarten.lankhorst, mripard, tzimmermann, airlied, simona

On 4/17/26 08:18, Avinal Kumar wrote:
> Add mipi_dsi_shutdown_peripheral_multi function and mark
> mipi_dsi_shutdown_peripheral function 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 0390e14d3157..3ac1dd5ad640 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 convenient to make several 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 2ab651a36115..b429acde4f71 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -393,6 +393,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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions
  2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
  2026-04-17 14:19   ` Doug Anderson
@ 2026-04-19  0:33   ` Dmitry Baryshkov
  2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2026-04-19  0:33 UTC (permalink / raw)
  To: Avinal Kumar
  Cc: dri-devel, linux-kernel, neil.armstrong, dianders, lumag,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

On Fri, Apr 17, 2026 at 11:48:42AM +0530, Avinal Kumar wrote:
> Change the panasonic-vvx10f034n00 panel to multi
> style functions for improved error handling and
> remove redundant error printout.
> 
> Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
> ---
>  .../drm/panel/panel-panasonic-vvx10f034n00.c  | 24 ++++++++++---------
>  1 file changed, 13 insertions(+), 11 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
  2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
  2026-04-17 14:20   ` Doug Anderson
  2026-04-17 20:43   ` neil.armstrong
@ 2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2026-04-24 17:17 UTC (permalink / raw)
  To: Avinal Kumar
  Cc: dri-devel, linux-kernel, neil.armstrong, lumag,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

Hi,

On Thu, Apr 16, 2026 at 11:19 PM Avinal Kumar <avinal.xlvii@gmail.com> wrote:
>
> Add mipi_dsi_shutdown_peripheral_multi function and mark
> mipi_dsi_shutdown_peripheral function 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(+)

Pushed to drm-misc-next:

[1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi
      commit: ac7e1a9819d6ada9a9800d6d26256e5258711b99

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions
  2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
  2026-04-17 14:19   ` Doug Anderson
  2026-04-19  0:33   ` Dmitry Baryshkov
@ 2026-04-24 17:17   ` Doug Anderson
  2 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2026-04-24 17:17 UTC (permalink / raw)
  To: Avinal Kumar
  Cc: dri-devel, linux-kernel, neil.armstrong, lumag,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

Hi,

On Thu, Apr 16, 2026 at 11:19 PM Avinal Kumar <avinal.xlvii@gmail.com> wrote:
>
> Change the panasonic-vvx10f034n00 panel to multi
> style functions for improved error handling and
> remove redundant error printout.
>
> Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
> ---
>  .../drm/panel/panel-panasonic-vvx10f034n00.c  | 24 ++++++++++---------
>  1 file changed, 13 insertions(+), 11 deletions(-)

Pushed to drm-misc-next:

[2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi
wrapped functions
      commit: 03af6c3afc4893988ceed54531f5dde4bebd6024

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-24 17:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17  6:18 [PATCH v5 0/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
2026-04-17  6:18 ` [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Avinal Kumar
2026-04-17 14:20   ` Doug Anderson
2026-04-17 20:43   ` neil.armstrong
2026-04-24 17:17   ` Doug Anderson
2026-04-17  6:18 ` [PATCH v5 2/2] drm/panel: panasonic-vvx10f034n00: transition to mipi_dsi wrapped functions Avinal Kumar
2026-04-17 14:19   ` Doug Anderson
2026-04-19  0:33   ` Dmitry Baryshkov
2026-04-24 17:17   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox