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: <CA+V-a8u9FY5Nd6Kdp6zy9OKmMDWiK2HG9KGfKDRKXch7-LozLg@mail.gmail.com>
Date: Thu, 5 Sep 2024 10:11:54 +0100
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>, 
	Laurent Pinchart <laurent.pinchart@...asonboard.com>, 
	Kieran Bingham <kieran.bingham@...asonboard.com>, 
	Jacopo Mondi <jacopo.mondi@...asonboard.com>, Mauro Carvalho Chehab <mchehab@...nel.org>, 
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-renesas-soc@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>, 
	Fabrizio Castro <fabrizio.castro.jz@...esas.com>, 
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [RFC PATCH 00/12] media: ov5645: Add support for streams

Hi Tomi,

Thanks for the feedback.

On Thu, Sep 5, 2024 at 7:48 AM Tomi Valkeinen
<tomi.valkeinen@...asonboard.com> wrote:
>
> On 05/09/2024 00:07, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Hi All,
> >
> > This patch series aims to add the below features,
> > - Support subdev active state
> > - Support for streams
> > - Support for virtual channel
> > - Code cleanup
> >
> > Sending this is as an RFC, I've done limited testing and Im seeing issue
> > when route is updated and wanted some feedback on the implementation.
> >
> > When route is updated for the sensor with below command, and when start
> > streaming I get "Dangling sink streams: mask 0x1" error. Should the
> > corresponding bridge also need to support routes to fix this? or is it
> > something missing Ive missed in the current implementation.
> >
> > $ media-ctl -R "'ov5645 0-003c' [1/0->0/1[1]]"
> >
> > Output after route update:
> > - entity 4: ov5645 0-003c (2 pads, 1 link, 1 route)
> >              type V4L2 subdev subtype Sensor flags 0
> >              device node name /dev/v4l-subdev1
> >          routes:
> >                  1/0 -> 0/1 [ACTIVE]
> >          pad0: SOURCE
> >                  [stream:1 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb
> >                   crop:(0,0)/1920x1080]
> >                  -> "csi-10830400.csi2":0 [ENABLED,IMMUTABLE]
> >          pad1: SINK,0x8
> >                  [stream:0 fmt:UYVY8_1X16/2592x1944 field:none colorspace:srgb
> >                   crop:(0,0)/1920x1080]
>
> I think you actually want 1/0->0/0 routing.
PAD1 -> Internal image pad Sink
PAD0 -> Source

The above combination works were pad1/stream0 ---> pad0/stream0

> The error says that the sink
> side device has routing which does not have a stream at stream ID 1, or
> no routing support at all, which implies a single stream at stream ID 0.
>
To support virtual channels I have the below routes,

    struct v4l2_subdev_route routes[OV5645_ROUTES_MAX] = {
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 0,
            .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 1,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 2,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 3,
        },
    };

Where the image pad sink stream0 can connect source stream0/1/2/3

So to switch source stream1 I use the below:
$ media-ctl -R "'ov5645 0-003c' [1/0->0/1[1]]"

With the above I connect sink pad1 stream0 -> source pad0 stream1,
(unless Ive misunderstood the connection graph).

Cheers,
Prabhakar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ