From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: MEDIA_IOC_G_TOPOLOGY and pad indices
Date: Sun, 04 Feb 2018 15:20:55 +0200 [thread overview]
Message-ID: <2768029.GcpMBOxS6Y@avalon> (raw)
In-Reply-To: <7773f8ac-32b8-4199-4b4c-05657dd0bb37@xs4all.nl>
Hi Hans,
On Sunday, 4 February 2018 15:16:26 EET Hans Verkuil wrote:
> On 02/04/2018 02:13 PM, Laurent Pinchart wrote:
> > On Sunday, 4 February 2018 15:06:42 EET Hans Verkuil wrote:
> >> Hi Mauro,
> >>
> >> I'm working on adding proper compliance tests for the MC but I think
> >> something is missing in the G_TOPOLOGY ioctl w.r.t. pads.
> >>
> >> In several v4l-subdev ioctls you need to pass the pad. There the pad is
> >> an index for the corresponding entity. I.e. an entity has 3 pads, so the
> >> pad argument is [0-2].
> >>
> >> The G_TOPOLOGY ioctl returns a pad ID, which is > 0x01000000. I can't use
> >> that in the v4l-subdev ioctls, so how do I translate that to a pad index
> >> in my application?
> >>
> >> It seems to be a missing feature in the API. I assume this information is
> >> available in the core, so then I would add a field to struct media_v2_pad
> >> with the pad index for the entity.
> >>
> >> Next time we add new public API features I want to see compliance tests
> >> before accepting it. It's much too easy to overlook something, either in
> >> the design or in a driver or in the documentation, so this is really,
> >> really needed IMHO.
> >
> > I agree with you, and would even like to go one step beyond by requiring
> > an implementation in a real use case, not just in a compliance or test
> > tool.
> >
> > On the topic of the G_TOPOLOGY API, it's pretty clear it was merged too
> > hastily. We could try to fix it, but given all the issues we haven't
> > solved yet, I believe a new version of the API would be better.
>
> It's actually not too bad as an API speaking as an end-user. It's simple and
> efficient. But this pad issue is a real problem.
We have other issues such as connector support and entities function vs. types
that we have never solved. The G_TOPOLOGY ioctl moves in the right direction
but has clearly been merged too early. It might be possible to fix it, I
haven't checked yet, but I really don't want to see this mistake being
repeated in the future.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2018-02-04 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-04 13:06 MEDIA_IOC_G_TOPOLOGY and pad indices Hans Verkuil
2018-02-04 13:13 ` Laurent Pinchart
2018-02-04 13:16 ` Hans Verkuil
2018-02-04 13:20 ` Laurent Pinchart [this message]
2018-02-05 12:27 ` Mauro Carvalho Chehab
2018-02-05 11:15 ` Mauro Carvalho Chehab
2018-02-05 11:38 ` Hans Verkuil
2018-02-05 13:34 ` Mauro Carvalho Chehab
2018-02-05 11:55 ` Hans Verkuil
2018-02-05 13:17 ` Mauro Carvalho Chehab
2018-02-05 13:47 ` Hans Verkuil
2018-02-05 14:13 ` Mauro Carvalho Chehab
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=2768029.GcpMBOxS6Y@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.