From: Arnd Bergmann <arnd@arndb.de>
To: Ming Lei <ming.lei@canonical.com>
Cc: linux-arm-kernel@lists.infradead.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Tony Lindgren <tony@atomide.com>, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
Sylwester Nawrocki <snjw23@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-omap@vger.kernel.org
Subject: Re: [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection
Date: Tue, 6 Dec 2011 14:41:25 +0000 [thread overview]
Message-ID: <201112061441.25822.arnd@arndb.de> (raw)
In-Reply-To: <CACVXFVPYUY-vpeoKJKX2XN7-0w+=seW0u3EaP=hD9m1Sy7nkTQ@mail.gmail.com>
On Tuesday 06 December 2011, Ming Lei wrote:
> > Using an array added to the end of the v4l2_fd_result structure
> > rather than a pointer would really make this easier IMHO.
>
> I have tried to do this, but video_usercopy needs a few changes
> to handle array args if no indirect pointer is passed to kernel.
Ah, I see. Or you would have to encode the array size into the
ioctl command, which is also ugly in a different way.
> I am not sure if media guys are happy to accept the changes, :-)
Maybe Mauro can comment on which solution he prefers then, given
the choice between:
1. adding another handler in drivers/media/video/v4l2-compat-ioctl32.c
2. passing a pointer that is casted to __u64 in user space an back
in the kernel
3. extending video_usercopy in some way to make this work, preferably
in a generic way.
4. using a variable command number like
#define VIDIOC_G_FD_RESULT(num) _IOC(_IOC_READ|_IOC_WRITE,'V', 95, \
sizeof(struct v4l2_fd_result) + (num) * sizeof(struct v4l2_fd_detection)
5. requiring the interface to be simplified to return only a single
struct v4l2_fd_detection at a time
I agree that none of these are nice. My preferred option would be last one,
but I don't know how performance critical the interface is or if it would
cause any races that you want to avoid.
Arnd
next prev parent reply other threads:[~2011-12-06 14:41 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 9:12 [RFC PATCH v1 0/7] media&omap4: introduce face detection(FD) driver Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 1/7] omap4: introduce fdif(face detect module) hwmod Ming Lei
2011-12-13 2:42 ` Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 2/7] omap4: build fdif omap device from hwmod Ming Lei
2011-12-02 12:10 ` Sergei Shtylyov
2011-12-05 4:25 ` Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 3/7] media: videobuf2: move out of setting pgprot_noncached from vb2_mmap_pfn_range Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 4/7] media: videobuf2: introduce VIDEOBUF2_PAGE memops Ming Lei
2011-12-02 16:35 ` Aguirre, Sergio
2011-12-05 2:16 ` Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection Ming Lei
2011-12-02 12:33 ` Arnd Bergmann
2011-12-04 11:18 ` Ming Lei
2011-12-05 14:37 ` Arnd Bergmann
2011-12-06 6:30 ` Ming Lei
2011-12-06 12:55 ` Arnd Bergmann
2011-12-06 13:11 ` Ming Lei
2011-12-06 14:41 ` Arnd Bergmann [this message]
2011-12-06 14:52 ` Ming Lei
2011-12-06 15:45 ` Ming Lei
2011-12-06 20:59 ` Arnd Bergmann
2011-12-02 9:12 ` [RFC PATCH v1 6/7] media: video: introduce face detection driver module Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 7/7] media: video: introduce omap4 face detection module driver Ming Lei
2011-12-02 10:28 ` [RFC PATCH v1 0/7] media&omap4: introduce face detection(FD) driver Sylwester Nawrocki
2011-12-02 14:59 ` Ming Lei
-- strict thread matches above, loose matches on Subject: below --
2011-12-02 15:02 Ming Lei
2011-12-02 15:02 ` [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection Ming Lei
2011-12-05 22:15 ` Sylwester Nawrocki
2011-12-08 3:42 ` Ming Lei
2011-12-08 22:27 ` Sylwester Nawrocki
2011-12-09 4:34 ` Ming Lei
2011-12-11 17:27 ` Sylwester Nawrocki
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=201112061441.25822.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=ming.lei@canonical.com \
--cc=snjw23@gmail.com \
--cc=tony@atomide.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).