All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
@ 2026-05-28 10:16 akemnade
  2026-05-28 14:44 ` Ivaylo Dimitrov
  0 siblings, 1 reply; 7+ messages in thread
From: akemnade @ 2026-05-28 10:16 UTC (permalink / raw)
  To: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren
  Cc: Linux-OMAP, Marek Vasut, H. Nikolaus Schaller, dri-devel,
	linux-kernel, Tomi Valkeinen, Andreas Kemnade

From: Andreas Kemnade <andreas@kemnade.info>

Some chips need configuration commands to be sent first, before they can
send data. TC358762 for example needs PPI_LPTXTIMECNT configured
and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to
configure such chips, do not send bta sync during writes if no acks are
requested. Instead just wait for the packet to be sent to avoid FIFO
overflows. There might be more to do about acks, but there seem to be
virtually no users of that flag.

This came to light when fiddling with the Epson Moverio BT-200 display
which consists of 2 TC358762 bridges with SPI funneled through
to the unknown display chip. With that patch the bridge can be accessed,
Reading back registers works, when the above-mentioned registers are set.

Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested.

Fixes: e70965386353e ("drm/omap: dsi: simplify write function")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
This was not tested on any command mode display, which IMHO should be
done.  So droid4 folks: please give it a try
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 27fe7bca9e2cf..98362b0157023 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -2194,6 +2194,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel)
 static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
 			       const struct mipi_dsi_msg *msg)
 {
+	DECLARE_COMPLETION_ONSTACK(completion);
 	struct dsi_data *dsi = to_dsi_data(dssdev);
 	int r;
 
@@ -2205,17 +2206,30 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
 	if (r < 0)
 		return r;
 
-	/*
-	 * TODO: we do not always have to do the BTA sync, for example
-	 * we can improve performance by setting the update window
-	 * information without sending BTA sync between the commands.
-	 * In that case we can return early.
-	 */
+	/* wait for IRQ for long packet transmission confirmation */
+	r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler,
+			&completion, DSI_VC_IRQ_PACKET_SENT);
+	if (r)
+		return r;
 
-	r = dsi_vc_send_bta_sync(dssdev, vc);
-	if (r) {
-		DSSERR("bta sync failed\n");
+	if (wait_for_completion_timeout(&completion,
+			msecs_to_jiffies(500)) == 0)
+		r = -EIO;
+
+	dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler,
+			      &completion, DSI_VC_IRQ_PACKET_SENT);
+
+	if (r)
 		return r;
+
+	/* TODO: find out if more needs to be done for MIPI_DIS_MSG_REQ_ACK */
+
+	if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
+		r = dsi_vc_send_bta_sync(dssdev, vc);
+		if (r) {
+			DSSERR("bta sync failed\n");
+			return r;
+		}
 	}
 
 	/* RX_FIFO_NOT_EMPTY */

---
base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
change-id: 20260528-vm-upstr-c8e7634ebf56

Best regards,
--  
Andreas Kemnade <akemnade@kernel.org>


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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 10:16 [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes akemnade
@ 2026-05-28 14:44 ` Ivaylo Dimitrov
  2026-05-28 17:02   ` Andreas Kemnade
  0 siblings, 1 reply; 7+ messages in thread
From: Ivaylo Dimitrov @ 2026-05-28 14:44 UTC (permalink / raw)
  To: akemnade, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren
  Cc: Linux-OMAP, Marek Vasut, H. Nikolaus Schaller, dri-devel,
	linux-kernel, Tomi Valkeinen, Andreas Kemnade

Applied against 6.18.31, no dice :)

[   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on 
minor 0
[   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
dispc_component_ops [omapdrm])
[   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
dsi_vc_flush_receive_data [omapdrm])
[   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
dsi_vc_flush_receive_data [omapdrm])
[   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
dsi_vc_flush_receive_data [omapdrm])
[   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops 
dsi_vc_flush_receive_data [omapdrm])
[   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops 
dsi_vc_flush_receive_data [omapdrm])
[   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
[   12.311981] [drm] Enabling DMM ywrap scrolling
[   12.770385] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
[   22.901306] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   22.901306] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
wait timed out
[   33.131256] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   33.131378] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
commit wait timed out
[   43.371307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   43.371398] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
commit wait timed out
[   43.631408] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
[   43.692504] omapdrm omapdrm.0: [drm] fb0: omapdrmdrmfb frame buffer 
device
[   54.251342] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   54.251464] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
wait timed out
[   64.491302] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   64.491424] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
commit wait timed out
[   74.731323] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   74.731445] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
commit wait timed out
[   74.991363] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
[   85.621307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   85.621398] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
wait timed out
[   95.851287] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[   95.851379] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
commit wait timed out
[  106.101257] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[  106.101440] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
commit wait timed out
[  106.371459] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
[  106.961334] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
[  141.301269] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[  141.301269] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
wait timed out
[  151.531280] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
[  151.531402] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
commit wait timed out


On 28.05.26 г. 13:16 ч., akemnade@kernel.org wrote:
> From: Andreas Kemnade <andreas@kemnade.info>
> 
> Some chips need configuration commands to be sent first, before they can
> send data. TC358762 for example needs PPI_LPTXTIMECNT configured
> and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to
> configure such chips, do not send bta sync during writes if no acks are
> requested. Instead just wait for the packet to be sent to avoid FIFO
> overflows. There might be more to do about acks, but there seem to be
> virtually no users of that flag.
> 
> This came to light when fiddling with the Epson Moverio BT-200 display
> which consists of 2 TC358762 bridges with SPI funneled through
> to the unknown display chip. With that patch the bridge can be accessed,
> Reading back registers works, when the above-mentioned registers are set.
> 
> Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested.
> 
> Fixes: e70965386353e ("drm/omap: dsi: simplify write function")
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> This was not tested on any command mode display, which IMHO should be
> done.  So droid4 folks: please give it a try
> ---
>   drivers/gpu/drm/omapdrm/dss/dsi.c | 32 +++++++++++++++++++++++---------
>   1 file changed, 23 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 27fe7bca9e2cf..98362b0157023 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -2194,6 +2194,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel)
>   static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>   			       const struct mipi_dsi_msg *msg)
>   {
> +	DECLARE_COMPLETION_ONSTACK(completion);
>   	struct dsi_data *dsi = to_dsi_data(dssdev);
>   	int r;
>   
> @@ -2205,17 +2206,30 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>   	if (r < 0)
>   		return r;
>   
> -	/*
> -	 * TODO: we do not always have to do the BTA sync, for example
> -	 * we can improve performance by setting the update window
> -	 * information without sending BTA sync between the commands.
> -	 * In that case we can return early.
> -	 */
> +	/* wait for IRQ for long packet transmission confirmation */
> +	r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler,
> +			&completion, DSI_VC_IRQ_PACKET_SENT);
> +	if (r)
> +		return r;
>   
> -	r = dsi_vc_send_bta_sync(dssdev, vc);
> -	if (r) {
> -		DSSERR("bta sync failed\n");
> +	if (wait_for_completion_timeout(&completion,
> +			msecs_to_jiffies(500)) == 0)
> +		r = -EIO;
> +
> +	dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler,
> +			      &completion, DSI_VC_IRQ_PACKET_SENT);
> +
> +	if (r)
>   		return r;
> +
> +	/* TODO: find out if more needs to be done for MIPI_DIS_MSG_REQ_ACK */
> +
> +	if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
> +		r = dsi_vc_send_bta_sync(dssdev, vc);
> +		if (r) {
> +			DSSERR("bta sync failed\n");
> +			return r;
> +		}
>   	}
>   
>   	/* RX_FIFO_NOT_EMPTY */
> 
> ---
> base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
> change-id: 20260528-vm-upstr-c8e7634ebf56
> 
> Best regards,
> --
> Andreas Kemnade <akemnade@kernel.org>
> 
> 

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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 14:44 ` Ivaylo Dimitrov
@ 2026-05-28 17:02   ` Andreas Kemnade
  2026-05-28 17:43     ` Ivaylo Dimitrov
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Kemnade @ 2026-05-28 17:02 UTC (permalink / raw)
  To: Ivaylo Dimitrov
  Cc: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren, Linux-OMAP, Marek Vasut,
	H. Nikolaus Schaller, dri-devel, linux-kernel, Tomi Valkeinen,
	Andreas Kemnade

Hi,

so this droid4? Or which device is it?

On Thu, 28 May 2026 17:44:14 +0300
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:

> Applied against 6.18.31, no dice :)
> 
> [   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on 
> minor 0
> [   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
> dispc_component_ops [omapdrm])
> [   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
> dsi_vc_flush_receive_data [omapdrm])
> [   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
> dsi_vc_flush_receive_data [omapdrm])
> [   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops 
> dsi_vc_flush_receive_data [omapdrm])
> [   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops 
> dsi_vc_flush_receive_data [omapdrm])
> [   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops 
> dsi_vc_flush_receive_data [omapdrm])
> [   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
> [   12.311981] [drm] Enabling DMM ywrap scrolling

I would expect some
output from  the panel-dsi-cm driver:
dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n",
                        id1, id2, id3);

or some error:
        dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n");

Any explanation why it is missing?



> [   12.770385] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
> [   22.901306] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   22.901306] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
> wait timed out
looks like dsi is not involed here, so something else is producing problems?

> [   33.131256] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   33.131378] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
> commit wait timed out

This might have something to do with the patch.

> [   43.371307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   43.371398] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
> commit wait timed out
> [   43.631408] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
> [   43.692504] omapdrm omapdrm.0: [drm] fb0: omapdrmdrmfb frame buffer 
> device
> [   54.251342] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   54.251464] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
> wait timed out
> [   64.491302] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   64.491424] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
> commit wait timed out
> [   74.731323] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   74.731445] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
> commit wait timed out
> [   74.991363] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
> [   85.621307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   85.621398] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
> wait timed out
> [   95.851287] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [   95.851379] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
> commit wait timed out
> [  106.101257] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [  106.101440] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0] 
> commit wait timed out
> [  106.371459] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
> [  106.961334] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
> [  141.301269] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [  141.301269] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit 
> wait timed out
> [  151.531280] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
> [  151.531402] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1] 
> commit wait timed out
> 
> 
Thanks for testing.

Regards,
Andreas

> On 28.05.26 г. 13:16 ч., akemnade@kernel.org wrote:
> > From: Andreas Kemnade <andreas@kemnade.info>
> > 
> > Some chips need configuration commands to be sent first, before they can
> > send data. TC358762 for example needs PPI_LPTXTIMECNT configured
> > and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to
> > configure such chips, do not send bta sync during writes if no acks are
> > requested. Instead just wait for the packet to be sent to avoid FIFO
> > overflows. There might be more to do about acks, but there seem to be
> > virtually no users of that flag.
> > 
> > This came to light when fiddling with the Epson Moverio BT-200 display
> > which consists of 2 TC358762 bridges with SPI funneled through
> > to the unknown display chip. With that patch the bridge can be accessed,
> > Reading back registers works, when the above-mentioned registers are set.
> > 
> > Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested.
> > 
> > Fixes: e70965386353e ("drm/omap: dsi: simplify write function")
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > This was not tested on any command mode display, which IMHO should be
> > done.  So droid4 folks: please give it a try
> > ---
> >   drivers/gpu/drm/omapdrm/dss/dsi.c | 32 +++++++++++++++++++++++---------
> >   1 file changed, 23 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> > index 27fe7bca9e2cf..98362b0157023 100644
> > --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> > +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> > @@ -2194,6 +2194,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel)
> >   static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
> >   			       const struct mipi_dsi_msg *msg)
> >   {
> > +	DECLARE_COMPLETION_ONSTACK(completion);
> >   	struct dsi_data *dsi = to_dsi_data(dssdev);
> >   	int r;
> >   
> > @@ -2205,17 +2206,30 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
> >   	if (r < 0)
> >   		return r;
> >   
> > -	/*
> > -	 * TODO: we do not always have to do the BTA sync, for example
> > -	 * we can improve performance by setting the update window
> > -	 * information without sending BTA sync between the commands.
> > -	 * In that case we can return early.
> > -	 */
> > +	/* wait for IRQ for long packet transmission confirmation */
> > +	r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler,
> > +			&completion, DSI_VC_IRQ_PACKET_SENT);
> > +	if (r)
> > +		return r;
> >   
> > -	r = dsi_vc_send_bta_sync(dssdev, vc);
> > -	if (r) {
> > -		DSSERR("bta sync failed\n");
> > +	if (wait_for_completion_timeout(&completion,
> > +			msecs_to_jiffies(500)) == 0)
> > +		r = -EIO;
> > +
> > +	dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler,
> > +			      &completion, DSI_VC_IRQ_PACKET_SENT);
> > +
> > +	if (r)
> >   		return r;
> > +
> > +	/* TODO: find out if more needs to be done for MIPI_DIS_MSG_REQ_ACK */
> > +
> > +	if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
> > +		r = dsi_vc_send_bta_sync(dssdev, vc);
> > +		if (r) {
> > +			DSSERR("bta sync failed\n");
> > +			return r;
> > +		}
> >   	}
> >   
> >   	/* RX_FIFO_NOT_EMPTY */
> > 
> > ---
> > base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
> > change-id: 20260528-vm-upstr-c8e7634ebf56
> > 
> > Best regards,
> > --
> > Andreas Kemnade <akemnade@kernel.org>
> > 
> >   
> 
> 


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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 17:02   ` Andreas Kemnade
@ 2026-05-28 17:43     ` Ivaylo Dimitrov
  2026-05-28 20:06       ` Andreas Kemnade
  0 siblings, 1 reply; 7+ messages in thread
From: Ivaylo Dimitrov @ 2026-05-28 17:43 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren, Linux-OMAP, Marek Vasut,
	H. Nikolaus Schaller, dri-devel, linux-kernel, Tomi Valkeinen,
	Andreas Kemnade

Hi,

On 28.05.26 г. 20:02 ч., Andreas Kemnade wrote:
> Hi,
> 
> so this droid4? Or which device is it?
> 

Oh, sorry, yes, this is droid4.

> On Thu, 28 May 2026 17:44:14 +0300
> Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
> 
>> Applied against 6.18.31, no dice :)
>>
>> [   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on
>> minor 0
>> [   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>> dispc_component_ops [omapdrm])
>> [   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>> dsi_vc_flush_receive_data [omapdrm])
>> [   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>> dsi_vc_flush_receive_data [omapdrm])
>> [   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>> dsi_vc_flush_receive_data [omapdrm])
>> [   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops
>> dsi_vc_flush_receive_data [omapdrm])
>> [   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops
>> dsi_vc_flush_receive_data [omapdrm])
>> [   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
>> [   12.311981] [drm] Enabling DMM ywrap scrolling
> 
> I would expect some
> output from  the panel-dsi-cm driver:
> dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n",
>                          id1, id2, id3);
> 
> or some error:
>          dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n");
> 
> Any explanation why it is missing?
> 

It is there, I grep-ed for omapdrm only, didn't want to flood the ML:

2026-05-28T17:34:45.761932+03:00 devuan-droid4 kernel: [   12.502105] 
panel-dsi-cm 58004000.encoder.0: panel revision 70.01.02

Here is the (almost)full boot log: https://paste.debian.net/hidden/e6ca55a7

> 
> 
>> [   12.770385] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
>> [   22.901306] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   22.901306] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit
>> wait timed out
> looks like dsi is not involed here, so something else is producing problems?
> 
>> [   33.131256] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   33.131378] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1]
>> commit wait timed out
> 
> This might have something to do with the patch.
> 
>> [   43.371307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   43.371398] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0]
>> commit wait timed out
>> [   43.631408] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
>> [   43.692504] omapdrm omapdrm.0: [drm] fb0: omapdrmdrmfb frame buffer
>> device
>> [   54.251342] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   54.251464] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit
>> wait timed out
>> [   64.491302] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   64.491424] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1]
>> commit wait timed out
>> [   74.731323] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   74.731445] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0]
>> commit wait timed out
>> [   74.991363] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
>> [   85.621307] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   85.621398] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit
>> wait timed out
>> [   95.851287] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [   95.851379] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1]
>> commit wait timed out
>> [  106.101257] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [  106.101440] omapdrm omapdrm.0: [drm] *ERROR* [PLANE:34:plane-0]
>> commit wait timed out
>> [  106.371459] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
>> [  106.961334] omapdrm omapdrm.0: atomic complete timeout (pipe 0)!
>> [  141.301269] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [  141.301269] omapdrm omapdrm.0: [drm] *ERROR* [CRTC:67:crtc-0] commit
>> wait timed out
>> [  151.531280] omapdrm omapdrm.0: [drm] *ERROR* flip_done timed out
>> [  151.531402] omapdrm omapdrm.0: [drm] *ERROR* [CONNECTOR:66:DSI-1]
>> commit wait timed out
>>
>>
> Thanks for testing.
> 

You're welcome, I can do more testing as needed, ATM I am trying to 
upgrade leste to 6.18 anyways so have all tools in place. Feel free to 
ping me on leste IRC channel if you think I can be of any help here.

Regards,
Ivo

> Regards,
> Andreas
> 
>> On 28.05.26 г. 13:16 ч., akemnade@kernel.org wrote:
>>> From: Andreas Kemnade <andreas@kemnade.info>
>>>
>>> Some chips need configuration commands to be sent first, before they can
>>> send data. TC358762 for example needs PPI_LPTXTIMECNT configured
>>> and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to
>>> configure such chips, do not send bta sync during writes if no acks are
>>> requested. Instead just wait for the packet to be sent to avoid FIFO
>>> overflows. There might be more to do about acks, but there seem to be
>>> virtually no users of that flag.
>>>
>>> This came to light when fiddling with the Epson Moverio BT-200 display
>>> which consists of 2 TC358762 bridges with SPI funneled through
>>> to the unknown display chip. With that patch the bridge can be accessed,
>>> Reading back registers works, when the above-mentioned registers are set.
>>>
>>> Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested.
>>>
>>> Fixes: e70965386353e ("drm/omap: dsi: simplify write function")
>>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
>>> ---
>>> This was not tested on any command mode display, which IMHO should be
>>> done.  So droid4 folks: please give it a try
>>> ---
>>>    drivers/gpu/drm/omapdrm/dss/dsi.c | 32 +++++++++++++++++++++++---------
>>>    1 file changed, 23 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
>>> index 27fe7bca9e2cf..98362b0157023 100644
>>> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
>>> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
>>> @@ -2194,6 +2194,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel)
>>>    static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>>>    			       const struct mipi_dsi_msg *msg)
>>>    {
>>> +	DECLARE_COMPLETION_ONSTACK(completion);
>>>    	struct dsi_data *dsi = to_dsi_data(dssdev);
>>>    	int r;
>>>    
>>> @@ -2205,17 +2206,30 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>>>    	if (r < 0)
>>>    		return r;
>>>    
>>> -	/*
>>> -	 * TODO: we do not always have to do the BTA sync, for example
>>> -	 * we can improve performance by setting the update window
>>> -	 * information without sending BTA sync between the commands.
>>> -	 * In that case we can return early.
>>> -	 */
>>> +	/* wait for IRQ for long packet transmission confirmation */
>>> +	r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler,
>>> +			&completion, DSI_VC_IRQ_PACKET_SENT);
>>> +	if (r)
>>> +		return r;
>>>    
>>> -	r = dsi_vc_send_bta_sync(dssdev, vc);
>>> -	if (r) {
>>> -		DSSERR("bta sync failed\n");
>>> +	if (wait_for_completion_timeout(&completion,
>>> +			msecs_to_jiffies(500)) == 0)
>>> +		r = -EIO;
>>> +
>>> +	dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler,
>>> +			      &completion, DSI_VC_IRQ_PACKET_SENT);
>>> +
>>> +	if (r)
>>>    		return r;
>>> +
>>> +	/* TODO: find out if more needs to be done for MIPI_DIS_MSG_REQ_ACK */
>>> +
>>> +	if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
>>> +		r = dsi_vc_send_bta_sync(dssdev, vc);
>>> +		if (r) {
>>> +			DSSERR("bta sync failed\n");
>>> +			return r;
>>> +		}
>>>    	}
>>>    
>>>    	/* RX_FIFO_NOT_EMPTY */
>>>
>>> ---
>>> base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
>>> change-id: 20260528-vm-upstr-c8e7634ebf56
>>>
>>> Best regards,
>>> --
>>> Andreas Kemnade <akemnade@kernel.org>
>>>
>>>    
>>
>>
> 

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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 17:43     ` Ivaylo Dimitrov
@ 2026-05-28 20:06       ` Andreas Kemnade
  2026-05-28 20:19         ` Andreas Kemnade
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Kemnade @ 2026-05-28 20:06 UTC (permalink / raw)
  To: Ivaylo Dimitrov
  Cc: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren, Linux-OMAP, Marek Vasut,
	H. Nikolaus Schaller, dri-devel, linux-kernel, Tomi Valkeinen,
	Andreas Kemnade

On Thu, 28 May 2026 20:43:12 +0300
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:

> Hi,
> 
> On 28.05.26 г. 20:02 ч., Andreas Kemnade wrote:
> > Hi,
> > 
> > so this droid4? Or which device is it?
> >   
> 
> Oh, sorry, yes, this is droid4.
> 
> > On Thu, 28 May 2026 17:44:14 +0300
> > Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
> >   
> >> Applied against 6.18.31, no dice :)
> >>
> >> [   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on
> >> minor 0
> >> [   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> >> dispc_component_ops [omapdrm])
> >> [   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> >> dsi_vc_flush_receive_data [omapdrm])
> >> [   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> >> dsi_vc_flush_receive_data [omapdrm])
> >> [   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> >> dsi_vc_flush_receive_data [omapdrm])
> >> [   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops
> >> dsi_vc_flush_receive_data [omapdrm])
> >> [   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops
> >> dsi_vc_flush_receive_data [omapdrm])
> >> [   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
> >> [   12.311981] [drm] Enabling DMM ywrap scrolling  
> > 
> > I would expect some
> > output from  the panel-dsi-cm driver:
> > dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n",
> >                          id1, id2, id3);
> > 
> > or some error:
> >          dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n");
> > 
> > Any explanation why it is missing?
> >   
> 
> It is there, I grep-ed for omapdrm only, didn't want to flood the ML:
> 
> 2026-05-28T17:34:45.761932+03:00 devuan-droid4 kernel: [   12.502105] 
> panel-dsi-cm 58004000.encoder.0: panel revision 70.01.02
> 
> Here is the (almost)full boot log: https://paste.debian.net/hidden/e6ca55a7
> 
2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  112.820404] DSI: omapdss DSI: failed to send nop between frames: -5
2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  113.331726] DSI: omapdss DSI: failed to send nop between frames: -5

and that is interesting. Apparently no PACKET_SENT_IRQ and the wait
completion times out. Maybe it is not used with short packets.
But..
       /*
         * Send NOP between the frames. If we don't send something here, the
         * updates stop working. This is probably related to DSI spec stating
         * that the DSI host should transition to LP at least once per frame.
         */
        r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);

I do not see a reason why something should go into LP mode here. the
message will probably be sent in HS mode but the BTA sync (not done anymore)
is probably the only thing turning something to LP mode.

So to avoid PACKET_SENT_IRQ trouble, do:
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index dcfcfc0efcdc..37323c9b08a8 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -2200,7 +2200,7 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
 	int r;
 
 	if (mipi_dsi_packet_format_is_short(msg->type))
-		r = dsi_vc_send_short(dsi, vc, msg);
+		return dsi_vc_send_short(dsi, vc, msg);
 	else
 		r = dsi_vc_send_long(dsi, vc, msg);
 

Also try:
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index dcfcfc0efcdc..37323c9b08a8 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -3283,11 +3283,11 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
 	DSSDBG("dsi_update_channel: %d", vc);
 
 	/*
-	 * Send NOP between the frames. If we don't send something here, the
+	 * Transition to LP here. If we don't send something here, the
 	 * updates stop working. This is probably related to DSI spec stating
 	 * that the DSI host should transition to LP at least once per frame.
 	 */
-	r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
+	r = dsi_vc_send_bta_sync(dssdev, vc);
 	if (r < 0) {
 		DSSWARN("failed to send nop between frames: %d\n", r);
 		goto err;



Regards,
Andreas

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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 20:06       ` Andreas Kemnade
@ 2026-05-28 20:19         ` Andreas Kemnade
  2026-05-29  6:26           ` Ivaylo Dimitrov
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Kemnade @ 2026-05-28 20:19 UTC (permalink / raw)
  To: Ivaylo Dimitrov
  Cc: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren, Linux-OMAP, Marek Vasut,
	H. Nikolaus Schaller, dri-devel, linux-kernel, Tomi Valkeinen

On Thu, 28 May 2026 22:06:03 +0200
Andreas Kemnade <andreas@kemnade.info> wrote:

> On Thu, 28 May 2026 20:43:12 +0300
> Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
> 
> > Hi,
> > 
> > On 28.05.26 г. 20:02 ч., Andreas Kemnade wrote:  
> > > Hi,
> > > 
> > > so this droid4? Or which device is it?
> > >     
> > 
> > Oh, sorry, yes, this is droid4.
> >   
> > > On Thu, 28 May 2026 17:44:14 +0300
> > > Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
> > >     
> > >> Applied against 6.18.31, no dice :)
> > >>
> > >> [   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on
> > >> minor 0
> > >> [   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> > >> dispc_component_ops [omapdrm])
> > >> [   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> > >> dsi_vc_flush_receive_data [omapdrm])
> > >> [   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> > >> dsi_vc_flush_receive_data [omapdrm])
> > >> [   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
> > >> dsi_vc_flush_receive_data [omapdrm])
> > >> [   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops
> > >> dsi_vc_flush_receive_data [omapdrm])
> > >> [   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops
> > >> dsi_vc_flush_receive_data [omapdrm])
> > >> [   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
> > >> [   12.311981] [drm] Enabling DMM ywrap scrolling    
> > > 
> > > I would expect some
> > > output from  the panel-dsi-cm driver:
> > > dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n",
> > >                          id1, id2, id3);
> > > 
> > > or some error:
> > >          dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n");
> > > 
> > > Any explanation why it is missing?
> > >     
> > 
> > It is there, I grep-ed for omapdrm only, didn't want to flood the ML:
> > 
> > 2026-05-28T17:34:45.761932+03:00 devuan-droid4 kernel: [   12.502105] 
> > panel-dsi-cm 58004000.encoder.0: panel revision 70.01.02
> > 
> > Here is the (almost)full boot log: https://paste.debian.net/hidden/e6ca55a7
> >   
> 2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  112.820404] DSI: omapdss DSI: failed to send nop between frames: -5
> 2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  113.331726] DSI: omapdss DSI: failed to send nop between frames: -5
> 
> and that is interesting. Apparently no PACKET_SENT_IRQ and the wait
> completion times out. Maybe it is not used with short packets.
> But..
>        /*
>          * Send NOP between the frames. If we don't send something here, the
>          * updates stop working. This is probably related to DSI spec stating
>          * that the DSI host should transition to LP at least once per frame.
>          */
>         r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
> 
> I do not see a reason why something should go into LP mode here. the
> message will probably be sent in HS mode but the BTA sync (not done anymore)
> is probably the only thing turning something to LP mode.
> 
> So to avoid PACKET_SENT_IRQ trouble, do:
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index dcfcfc0efcdc..37323c9b08a8 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -2200,7 +2200,7 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>  	int r;
>  
>  	if (mipi_dsi_packet_format_is_short(msg->type))
> -		r = dsi_vc_send_short(dsi, vc, msg);
> +		return dsi_vc_send_short(dsi, vc, msg);
>  	else
>  		r = dsi_vc_send_long(dsi, vc, msg);
>  
> 
> Also try:
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index dcfcfc0efcdc..37323c9b08a8 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -3283,11 +3283,11 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
>  	DSSDBG("dsi_update_channel: %d", vc);
>  
>  	/*
> -	 * Send NOP between the frames. If we don't send something here, the
> +	 * Transition to LP here. If we don't send something here, the
>  	 * updates stop working. This is probably related to DSI spec stating
>  	 * that the DSI host should transition to LP at least once per frame.
>  	 */
> -	r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
> +	r = dsi_vc_send_bta_sync(dssdev, vc);

probably rather VC_CMD
>  	if (r < 0) {
>  		DSSWARN("failed to send nop between frames: %d\n", r);
>  		goto err;
> 
> 
> 
> Regards,
> Andreas
> 


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

* Re: [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes
  2026-05-28 20:19         ` Andreas Kemnade
@ 2026-05-29  6:26           ` Ivaylo Dimitrov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivaylo Dimitrov @ 2026-05-29  6:26 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sebastian Reichel,
	Laurent Pinchart, Tony Lindgren, Linux-OMAP, Marek Vasut,
	H. Nikolaus Schaller, dri-devel, linux-kernel, Tomi Valkeinen

Hi,

with the following changes:

user@devuan:/media/user/7b76ddc8-44f5-47b5-af5b-e5e9b5ab39c3/user/linux_openpvrsgx$ 
git diff drivers/gpu/drm/omapdrm/dss/dsi.c
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c 
b/drivers/gpu/drm/omapdrm/dss/dsi.c
index af27339c79f9..8ffcd95c3bc3 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -2199,7 +2199,7 @@ static int dsi_vc_write_common(struct 
omap_dss_device *dssdev, int vc,
         int r;

         if (mipi_dsi_packet_format_is_short(msg->type))
-               r = dsi_vc_send_short(dsi, vc, msg);
+               return dsi_vc_send_short(dsi, vc, msg);
         else
                 r = dsi_vc_send_long(dsi, vc, msg);

@@ -3247,21 +3247,6 @@ static int _dsi_update(struct dsi_data *dsi)
         return 0;
  }

-static int _dsi_send_nop(struct dsi_data *dsi, int vc, int channel)
-{
-       const u8 payload[] = { MIPI_DCS_NOP };
-       const struct mipi_dsi_msg msg = {
-               .channel = channel,
-               .type = MIPI_DSI_DCS_SHORT_WRITE,
-               .tx_len = 1,
-               .tx_buf = payload,
-       };
-
-       WARN_ON(!dsi_bus_is_locked(dsi));
-
-       return _omap_dsi_host_transfer(dsi, vc, &msg);
-}
-
  static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
  {
         struct dsi_data *dsi = to_dsi_data(dssdev);
@@ -3282,11 +3267,11 @@ static int dsi_update_channel(struct 
omap_dss_device *dssdev, int vc)
         DSSDBG("dsi_update_channel: %d", vc);

         /*
-        * Send NOP between the frames. If we don't send something here, the
+        * Transition to LP here. If we don't send something here, the
          * updates stop working. This is probably related to DSI spec 
stating
          * that the DSI host should transition to LP at least once per 
frame.
          */
-       r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
+       r = dsi_vc_send_bta_sync(dssdev, VC_CMD);
         if (r < 0) {
                 DSSWARN("failed to send nop between frames: %d\n", r);
                 goto err;


Leste boots properly on droid4. No visible side effects in hildon so 
far, chromium runs as slow as usual, glmark2 score is 85, which looks 
normal, so with the above changes you may add my Tested-by, unless you 
want me to test more things.

Thanks and regards,
Ivo

On 28.05.26 г. 23:19 ч., Andreas Kemnade wrote:
> On Thu, 28 May 2026 22:06:03 +0200
> Andreas Kemnade <andreas@kemnade.info> wrote:
> 
>> On Thu, 28 May 2026 20:43:12 +0300
>> Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> On 28.05.26 г. 20:02 ч., Andreas Kemnade wrote:
>>>> Hi,
>>>>
>>>> so this droid4? Or which device is it?
>>>>      
>>>
>>> Oh, sorry, yes, this is droid4.
>>>    
>>>> On Thu, 28 May 2026 17:44:14 +0300
>>>> Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> wrote:
>>>>      
>>>>> Applied against 6.18.31, no dice :)
>>>>>
>>>>> [   11.617523] [drm] Initialized pvr 1.17.4948957 for 56000000.gpu on
>>>>> minor 0
>>>>> [   11.674652] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>>>>> dispc_component_ops [omapdrm])
>>>>> [   11.775085] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>>>>> dsi_vc_flush_receive_data [omapdrm])
>>>>> [   12.222930] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>>>>> dsi_vc_flush_receive_data [omapdrm])
>>>>> [   12.245117] omapdss_dss 58000000.dss: bound 58001000.dispc (ops
>>>>> dsi_vc_flush_receive_data [omapdrm])
>>>>> [   12.247375] omapdss_dss 58000000.dss: bound 58004000.encoder (ops
>>>>> dsi_vc_flush_receive_data [omapdrm])
>>>>> [   12.249267] omapdss_dss 58000000.dss: bound 58006000.encoder (ops
>>>>> dsi_vc_flush_receive_data [omapdrm])
>>>>> [   12.284729] [drm] Initialized omapdrm 1.0.0 for omapdrm.0 on minor 1
>>>>> [   12.311981] [drm] Enabling DMM ywrap scrolling
>>>>
>>>> I would expect some
>>>> output from  the panel-dsi-cm driver:
>>>> dev_info(&ddata->dsi->dev, "panel revision %02x.%02x.%02x\n",
>>>>                           id1, id2, id3);
>>>>
>>>> or some error:
>>>>           dev_err(&ddata->dsi->dev, "error while enabling panel, issuing HW reset\n");
>>>>
>>>> Any explanation why it is missing?
>>>>      
>>>
>>> It is there, I grep-ed for omapdrm only, didn't want to flood the ML:
>>>
>>> 2026-05-28T17:34:45.761932+03:00 devuan-droid4 kernel: [   12.502105]
>>> panel-dsi-cm 58004000.encoder.0: panel revision 70.01.02
>>>
>>> Here is the (almost)full boot log: https://paste.debian.net/hidden/e6ca55a7
>>>    
>> 2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  112.820404] DSI: omapdss DSI: failed to send nop between frames: -5
>> 2026-05-28T17:34:45.763732+03:00 devuan-droid4 kernel: [  113.331726] DSI: omapdss DSI: failed to send nop between frames: -5
>>
>> and that is interesting. Apparently no PACKET_SENT_IRQ and the wait
>> completion times out. Maybe it is not used with short packets.
>> But..
>>         /*
>>           * Send NOP between the frames. If we don't send something here, the
>>           * updates stop working. This is probably related to DSI spec stating
>>           * that the DSI host should transition to LP at least once per frame.
>>           */
>>          r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
>>
>> I do not see a reason why something should go into LP mode here. the
>> message will probably be sent in HS mode but the BTA sync (not done anymore)
>> is probably the only thing turning something to LP mode.
>>
>> So to avoid PACKET_SENT_IRQ trouble, do:
>> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> index dcfcfc0efcdc..37323c9b08a8 100644
>> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> @@ -2200,7 +2200,7 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
>>   	int r;
>>   
>>   	if (mipi_dsi_packet_format_is_short(msg->type))
>> -		r = dsi_vc_send_short(dsi, vc, msg);
>> +		return dsi_vc_send_short(dsi, vc, msg);
>>   	else
>>   		r = dsi_vc_send_long(dsi, vc, msg);
>>   
>>
>> Also try:
>> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> index dcfcfc0efcdc..37323c9b08a8 100644
>> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> @@ -3283,11 +3283,11 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
>>   	DSSDBG("dsi_update_channel: %d", vc);
>>   
>>   	/*
>> -	 * Send NOP between the frames. If we don't send something here, the
>> +	 * Transition to LP here. If we don't send something here, the
>>   	 * updates stop working. This is probably related to DSI spec stating
>>   	 * that the DSI host should transition to LP at least once per frame.
>>   	 */
>> -	r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
>> +	r = dsi_vc_send_bta_sync(dssdev, vc);
> 
> probably rather VC_CMD
>>   	if (r < 0) {
>>   		DSSWARN("failed to send nop between frames: %d\n", r);
>>   		goto err;
>>
>>
>>
>> Regards,
>> Andreas
>>
> 

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

end of thread, other threads:[~2026-05-29  6:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 10:16 [PATCH] drm/omap: dsi: avoid sending bta sync all the time in writes akemnade
2026-05-28 14:44 ` Ivaylo Dimitrov
2026-05-28 17:02   ` Andreas Kemnade
2026-05-28 17:43     ` Ivaylo Dimitrov
2026-05-28 20:06       ` Andreas Kemnade
2026-05-28 20:19         ` Andreas Kemnade
2026-05-29  6:26           ` Ivaylo Dimitrov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.