lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220920083908.st4h3pb6usn4zavu@pengutronix.de>
Date:   Tue, 20 Sep 2022 10:39:08 +0200
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        mchehab@...nel.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, kishon@...com, vkoul@...nel.org,
        hverkuil@...all.nl, jacopo@...ndi.org,
        kieran.bingham+renesas@...asonboard.com,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-phy@...ts.infradead.org,
        kernel@...gutronix.de
Subject: Re: [PATCH v2 4/4] media: tc358746: add Toshiba TC358746 Parallel to
 CSI-2 bridge driver

Hi Sakari,

On 22-09-19, Sakari Ailus wrote:
> On Mon, Sep 19, 2022 at 08:37:23PM +0300, Laurent Pinchart wrote:
> > > > > +	ctrl = v4l2_ctrl_new_int_menu(&tc358746->ctrl_hdl, NULL,
> > > > > +				      V4L2_CID_LINK_FREQ, 0, 0,
> > > > 
> > > > Shouldn't the max argument be set to the number of items minus 1 ?
> > > 
> > > Right now I would keep it that way since the driver only supports one
> > > link-frequencies setting. So the ctrl don't let the userspace assume
> > > that there are more than one link-frequency.
> > 
> > Good point. Can you add a short comment above the call to explain this ?
> 
> Wouldn't it be just easier to do what Laurent suggested originally? The end
> result is the same, isn't it, and no comment needed?

The end result depends on the device-tree given "link-frequencies"
property. The driver currently takes only one frequency but the
system-integrator of course can specify many more. In such case the 1st
is used. If I go with Laurent's comment, all frequencies would be shown
to the user-space but IMHO this shouldn't be the case since the driver
supports only 1 frequency.

> > 
> > > > > +				      link_frequencies);
> > > > > +	if (ctrl)
> > > > > +		ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
> 
> Now that this is a bridge, this value presumably doesn't need to change.

The value can change, e.g. if you have a few freq. to allow a wide range
of frame sizes. This can be the case to conform the emv tests. So there
can be a freq. for smaller frame sizes and one for larger frame sizes.

> There will just be more blanking if the source sub-device pixel rate is
> slower, right?

Please see above.

Regards,
  Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ