Re: [PATCH v5] drm/omap: dsi: avoid sending bta sync all the time in writes

Andreas Kemnade <[email protected]> Fri, 31 Jul 2026 13:42:56 +0200
Newsgroups org.kernel.vger.linux-omap,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <amyKQNbemhTMKTk8@akepd>
On Wed, Jul 29, 2026 at 02:15:33PM +0300, Tomi Valkeinen wrote:
> > -	/*
> > -	 * 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.
> > -	 */
> > +	/* TODO: find out if more needs to be done for MIPI_DSI_MSG_REQ_ACK */
> > -	r = dsi_vc_send_bta_sync(dssdev, vc);
> > -	if (r) {
> > -		DSSERR("bta sync failed\n");
> > -		return r;
> > +	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;
> > +		}
> >   	}
> 
> The dsi_vc_send_bta_sync() function does dsi_get_errors(), which we now
> don't always do here. I think that might cause any errors to be left there,
> which would trigger error handling on next read or write-with-bta.
> 
> _omap_dsi_host_transfer forward declaration can now be remove.

I will produce a v6, when I have the possibility to test again,
probably on Monday.
> 
> I don't have HW to test this, but other than the above, it looks reasonable.
> Although I have to say, based on my past experience, it's also very easy to
> break a use case =).
> 
Probably these usecases should use MIPI_DSI_MSG_REQ_ACK.

Regards,
Andreas