From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] media: staging: max96712: Add support for 3-lane C-PHY
Date: Fri, 31 Mar 2023 16:19:34 +0200 [thread overview]
Message-ID: <ZCbr9n4pT6ycYXpC@oden.dyn.berto.se> (raw)
In-Reply-To: <ZCbpdboZZop7pJXn@valkosipuli.retiisi.eu>
Hej Sakari,
On 2023-03-31 17:08:53 +0300, Sakari Ailus wrote:
> Hejssan, Niklas!
>
> On Fri, Mar 31, 2023 at 03:24:04PM +0200, Niklas Söderlund wrote:
> > Hej Sakari,
> >
> > Tack för din feedback.
> >
> > On 2023-03-31 15:21:34 +0300, Sakari Ailus wrote:
> >
> > ...
> >
> > > > @@ -332,8 +341,9 @@ static int max96712_parse_dt(struct
> > > > max96712_priv *priv)
> > > > {
> > > > struct fwnode_handle *ep;
> > > > struct v4l2_fwnode_endpoint v4l2_ep = {
> > > > - .bus_type = V4L2_MBUS_CSI2_DPHY
> > > > + .bus_type = V4L2_MBUS_UNKNOWN,
> > >
> > > The bindings don't require setting bus-type. Please change the bindings as
> > > well. And assume D-PHY in the driver if bus-type isn't set.
> >
> > Thanks for spotting this, I will send out an update to update the
> > binding to require setting bus-type.
> >
> > About updating the driver to assume D-PHY if bus-type is not set. I
> > wonder if we can avoid that and keep the driver change as is? The only
> > in-tree user of this binding is in r8a779a0-falcon-csi-dsi.dtsi, and I
> > intend to send out a patch to set the bus-type for that together with
> > the updated bindings.
> >
> > I have tested this driver change on the Falcon board and if bus-type is
> > not explicitly set in the DTS it is reported as D-PHY and everything
> > works as expected. So if I
> >
> > - Send out a patch to update the bindings to require bus-type being set.
> > - Send out patch to update the only in-tree use of the driver to set
> > bus-type.
> >
> > Can't we avoid issues in the future by not assuming no bus-type is D-PHY
> > in the driver while still being backward compatible with the old DTS?
>
> If you want to keep supporting D-PHY as a default, you should instead try
> parsing with V4L2_MBUS_CSI2_DPHY as bus_type. Then CPHY if that fails.
>
> Although if bus_type is mandatory, then this patch is fine.
Thanks. I prefers to make bus-type a mandatory property, it feels like
being explicit in the bindings is the best way going forward. I have
posted the patches to make this change and to update the only user.
There is only one user in-tree, and making the change now would still be
backward compatible with it. So better bite the bullet now before the
binding spreads.
Trevlig helg!
>
> --
> Trevliga hälsningar,
>
> Sakari Ailus
--
Kind Regards,
Niklas Söderlund
prev parent reply other threads:[~2023-03-31 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 14:46 [PATCH] media: staging: max96712: Add support for 3-lane C-PHY Niklas Söderlund
2023-03-30 14:21 ` Niklas Söderlund
2023-03-31 12:21 ` Sakari Ailus
2023-03-31 13:24 ` Niklas Söderlund
2023-03-31 14:08 ` Sakari Ailus
2023-03-31 14:19 ` Niklas Söderlund [this message]
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=ZCbr9n4pT6ycYXpC@oden.dyn.berto.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=gregkh@linuxfoundation.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
/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