Re: [PATCH] drm/panel/synaptics-r63353: Use _multi variants
From: Maxime Ripard
Date: Thu Mar 06 2025 - 12:20:55 EST
On Thu, Mar 06, 2025 at 10:08:24AM -0500, Anusha Srivatsa wrote:
> On Thu, Mar 6, 2025 at 4:31 AM Maxime Ripard <mripard@xxxxxxxxxx> wrote:
>
> > Hi Anusha,
> >
> > On Wed, Mar 05, 2025 at 07:01:41PM -0500, Anusha Srivatsa wrote:
> > > Move away from using deprecated API and use _multi
> > > variants if available. Use mipi_dsi_msleep()
> > > and mipi_dsi_usleep_range() instead of msleep()
> > > and usleep_range() respectively.
> > >
> > > Used Coccinelle to find the multiple occurences.
> > > SmPl patch:
> > > @rule@
> > > identifier dsi_var;
> > > identifier r;
> > > identifier func;
> > > type t;
> > > position p;
> > > expression dsi_device;
> > > expression list es;
> > > @@
> > > t func(...) {
> > > ...
> > > struct mipi_dsi_device *dsi_var = dsi_device;
> > > +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var };
> > > <+...
> > > (
> > > -mipi_dsi_dcs_write_seq(dsi_var,es)@p;
> > > +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);
> > > |
> > > -mipi_dsi_generic_write_seq(dsi_var,es)@p;
> > > +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);
> > > |
> > > -mipi_dsi_generic_write(dsi_var,es)@p;
> > > +mipi_dsi_generic_write_multi(&dsi_ctx,es);
> > > |
> > > -r = mipi_dsi_dcs_nop(dsi_var)@p;
> > > +mipi_dsi_dcs_nop_multi(&dsi_ctx);
> > > |
> > > ....rest of API
> > > ..
> > > )
> > > -if(r < 0) {
> > > -...
> > > -}
> > > ...+>
> >
> > The point of sending a single patch was to review the coccinelle script,
> > so you must put the entire script you used here.
>
> I was actually thinking of sending patches per driver this time around
> since Tejas also seems to be looking into similar parts....Thoughts?
Not really?
The point of doing it with one driver was to make sure the coccinelle
script was fine before rolling it to other drivers. And actually, it
doesn't really matter: the whole point of putting the script in the
commit log is to be able to review and document the script you used. If
you're not going to put the one you used, it's kind of pointless.
And yeah, you should absolutely sync with Tejas, but it's unrelated to
coccinelle.
Maxime
Attachment:
signature.asc
Description: PGP signature