From: Sakari Ailus <sakari.ailus@iki.fi>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Oleksij Rempel <bug-track@fisher-privat.net>,
linux-uvc-devel@lists.sourceforge.net,
linux-media@vger.kernel.org,
Youness Alaoui <youness.alaoui@collabora.co.uk>
Subject: Re: [RFC] Media controller entity information ioctl [was "Re: [patch] suggestion for media framework"]
Date: Tue, 05 Jun 2012 23:44:04 +0300 [thread overview]
Message-ID: <4FCE6F94.7030004@iki.fi> (raw)
In-Reply-To: <9993866.a3VUSWRbyi@avalon>
Hi Laurent,
Laurent Pinchart wrote:
> Hi Oleksiy,
>
> Thank you for the patch.
>
> [CC'ing linux-media]
>
> On Sunday 03 June 2012 19:17:06 Oleksij Rempel wrote:
>> Hi Laurent,
>>
>> in attachment is a suggestion patch for media framework and a test
>> program which use this patch.
>>
>> Suddenly we still didn't solved the problem with finding of XU. You
>> know, the proper way to find them is guid (i do not need to explain this
>> :)). Since uvc devices starting to have more and complicated XUs, media
>> api is probably proper way to go - how you suggested.
>>
>> On the wiki of TexasInstruments i found some code examples, how they use
>> this api. And it looks like there is some desing differences between
>> OMPA drivers and UVC. It is easy to find proper entity name for omap
>> devices just by: "(!strcmp(entity[index].name, "OMAP3 ISP CCDC"))".
>> We can't do the same for UVC, current names are just "Extension %u". We
>> can put guid instead, but it will looks ugly and not really informative.
>> This is why i added new struct uvc_ext.
>>
>> If you do not agree with this patch, it will be good if you proved other
>> solution. This problem need to be solved.
>
> The patch goes in the right direction, in that I think the media controller
> API is the proper way to solve this problem. However, extending the
> media_entity_desc structure with information about all possible kinds of
> entities will not scale, especially given that an entity may need to expose
> information related to multiple types (for instance an XU need to expose its
> GUID, but also subdev-related information if it has a device node).
>
> I've been thinking about adding a new ioctl to the media controller API for
> some time now, to report advanced static information about entities.
>
> The idea is that each entity would be allowed to report an arbitrary number of
> static items. Items would have a type (for which we would likely need some
> kind of central registry, possible with driver-specific types), a length and
> data. The items would be static (registered an initialization time) and
> aggregated in a single buffer that would be read in one go through a new
> ioctl.
>
> One important benefit of such an API would be to be able to report more than
> one entity type per subdev using entity type items. Many entities serve
> several purpose, for instance a sensor can integrate a flash controller. This
> can't be reported with the current API, as subdevs have a single type. By
> having several entity type items we could fix this issue.
I welcome this idea!
Another example of information that's missing currently is the lack of
bus information for the entities: it's next to impossible for the user
space to learn which i2c device a subdev is related to. At the same time
we could deprecate the media_entity_desc.type field.
Providing entity bus information as part of entity enumeration would
resolve this issue.
Btw. do you think a new IOCTL is really required? Why not to just add a
pointer for additional data the user may provide to the driver to fill
up? There's plenty of room in the struct for a pointer and perhaps a
size field.
Cheers,
--
Sakari Ailus
sakari.ailus@iki.fi
next prev parent reply other threads:[~2012-06-05 20:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4FCB9C12.1@fisher-privat.net>
2012-06-04 14:02 ` [RFC] Media controller entity information ioctl [was "Re: [patch] suggestion for media framework"] Laurent Pinchart
2012-06-04 14:17 ` Hans Verkuil
2012-06-04 15:35 ` Oleksij Rempel
2012-06-05 20:44 ` Sakari Ailus [this message]
[not found] ` <CA+Dpati=kqq52JMu0gJBT=VeLGLXVgd3E-aY4YmfkXytMCDzyA@mail.gmail.com>
2012-06-08 2:46 ` [linux-uvc-devel] " Laurent Pinchart
2012-06-21 17:11 ` Oleksij Rempel
2012-06-21 23:12 ` Laurent Pinchart
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=4FCE6F94.7030004@iki.fi \
--to=sakari.ailus@iki.fi \
--cc=bug-track@fisher-privat.net \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-uvc-devel@lists.sourceforge.net \
--cc=youness.alaoui@collabora.co.uk \
/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.