[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190326113725.mx3ixvy4tunb44xw@paasikivi.fi.intel.com>
Date: Tue, 26 Mar 2019 13:37:25 +0200
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Mickael GUENE <mickael.guene@...com>
Cc: Sakari Ailus <sakari.ailus@....fi>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Matt Ranostay <matt.ranostay@...sulko.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ben Kao <ben.kao@...el.com>,
Todor Tomov <todor.tomov@...aro.org>,
Rui Miguel Silva <rui.silva@...aro.org>,
Akinobu Mita <akinobu.mita@...il.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Jason Chen <jasonx.z.chen@...el.com>,
Jacopo Mondi <jacopo+renesas@...ndi.org>,
Tianshu Qiu <tian.shu.qiu@...el.com>,
Bingbu Cao <bingbu.cao@...el.com>
Subject: Re: [PATCH v1 2/3] media:st-mipid02: MIPID02 CSI-2 to PARALLEL
bridge driver
On Mon, Mar 25, 2019 at 12:14:05PM +0000, Mickael GUENE wrote:
> Hi Sakari,
>
> On 3/25/19 12:17, Sakari Ailus wrote:
> > Hi Mickael,
> >
> > On Mon, Mar 18, 2019 at 09:57:44AM +0000, Mickael GUENE wrote:
> >> Hi Sakari,
> >>
> >> Thanks for your review. Find my comments below.
> >>
> >> On 3/16/19 23:14, Sakari Ailus wrote:
> > ...
> >>>> +static struct v4l2_subdev *mipid02_find_sensor(struct mipid02_dev *bridge)
> >>>> +{
> >>>> + struct media_device *mdev = bridge->sd.v4l2_dev->mdev;
> >>>> + struct media_entity *entity;
> >>>> +
> >>>> + if (!mdev)
> >>>> + return NULL;
> >>>> +
> >>>> + media_device_for_each_entity(entity, mdev)
> >>>> + if (entity->function == MEDIA_ENT_F_CAM_SENSOR)
> >>>> + return media_entity_to_v4l2_subdev(entity);
> >>>
> >>> Hmm. Could you instead use the link state to determine which of the
> >>> receivers is active? You'll need one more pad, and then you'd had 1:1
> >>> mapping between ports and pads.
> >>>
> >> Goal here is not to detect which of the receivers is active but to find
> >> sensor in case there are others sub-dev in chain (for example a
> >> serializer/deserializer as found in cars).
> >
> > You shouldn't make assumptions on the rest of the pipeline beyond the
> > device that's directly connected. You might not even have a camera there.
> >
> I have also seen your answer to '[PATCH v2 2/2] media:st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver'
> concerning support of set_fmt, get_fmt and link_validate.
> My initial idea was to avoid to avoid to implement them and to avoid media ctrl configuration. According
> to your remark is seems a bad idea. Right ?
Yes, you'll need them. This is how the media controller pipeline works: a
driver for a given device is generally only aware of its direct links and
generally only communicate with drivers for devices directly connected to
them.
> In that case I have to also implement enum_mbus_code ?
Yes, please.
> I will drop this code and use connected device only to get link speed.
Ack.
--
Sakari Ailus
sakari.ailus@...ux.intel.com
Powered by blists - more mailing lists