public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Cc: Linux and Kernel Video <video4linux-list@redhat.com>,
	linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 09/25] v4l: move ioctl32 handlers to drivers/media/
Date: Mon, 7 Nov 2005 11:17:48 +0100	[thread overview]
Message-ID: <200511071117.50613.arnd@arndb.de> (raw)
In-Reply-To: <1131250426.19680.29.camel@localhost>

On Sünndag 06 November 2005 05:13, Mauro Carvalho Chehab wrote:
> Em Sáb, 2005-11-05 às 17:26 +0100, Arnd Bergmann escreveu:
> > anexo Documento somente texto (compat_vidio.diff)
> > This moves the 32 bit ioctl compatibility handlers for
> > Video4Linux into a new file and adds explicit calls to them
> > to each v4l device driver.
> 
> 	Thanks for your patch, but IMHO, it should't be applied on mainstream.
> It would be better if we apply it on V4L tree and do some work on it to
> improve handling the compat stuff.

Sure, that sounds reasonable.

> > Unfortunately, there does not seem to be any code handling
> > the v4l2 ioctls, so quite often the code goes through two
> > separate conversions, first from 32 bit v4l to 64 bit v4l,
> > and from there to 64 bit v4l2. My patch does not change
> > that, so there is still much room for improvement.
> 	As you mentioned, some changes would be required to make it more
> robust. Also, we are introducing some newer devices that would require
> also conversion (already on -mm tree).
> 	On the other hand, compat_ioctl.c is not a good name, since there is
> v4l1-compat.c, meant to handle compat ioctl between the old API and the
> newer one.

Yes, I noticed that. The problem is that compat_ioctl is the conventional
name for 32 bit compatibility ioctl handlers in many other places, so
is was already confusing before my patch.

Maybe it makes sense to name the new file ioctl32 instead, as that is
also used in other places.

> > Also, some drivers have additional ioctl numbers, for
> > which the conversion should be handled internally to
> > that driver.
> 
> 	This is an interesting question: current version only handles V4L1
> ioctls:
> 
> +#define VIDIOCGTUNER32         _IOWR('v',4, struct video_tuner32)
> +#define VIDIOCSTUNER32         _IOW('v',5, struct video_tuner32)
> +#define VIDIOCGWIN32           _IOR('v',9, struct video_window32)
> +#define VIDIOCSWIN32           _IOW('v',10, struct video_window32)
> +#define VIDIOCGFBUF32          _IOR('v',11, struct video_buffer32)
> +#define VIDIOCSFBUF32          _IOW('v',12, struct video_buffer32)
> +#define VIDIOCGFREQ32          _IOR('v',14, u32)
> +#define VIDIOCSFREQ32          _IOW('v',15, u32)
> +
> 	The intention is to depreciate V4L1 old api (from 2.4 series), in favor
> of V4L2 API. The old API have several issues and doesn't support some
> video standards variations used on several countries.

You should really do that only after the V4L2 ioctl32 conversion has been
added. I'm personally watching TV going through both ioctl conversion layers
(xawtv finds 32 bit V4L2 is not implemented, falls back to 32 bit V4L1, that
is converted in the kernel to 64 bit V4L1 and then to 64 bit V4L2 when it
reaches the driver).

> 	Newer drivers (em28xx, cx88, saa7134), used by the modern boards don't
> directly implement the old API anymore. All calls are directed to
> v4l1-compat, that translates into V4L2 calls. We are also testing some
> patches to use this way also for bttv drivers. The intention is to make
> v4l1 obsolete and remove from kernel, maybe for 2.6.18 or 2.6.20.
> 
> 	We should seriously check this patch, to see if it does make sense with
> current implemented ioctls.

Note that my patch does not change any behavior relative to 2.6.14 vanilla, it
just moves the conversion handlers to a different place.

	Arnd <><

  reply	other threads:[~2005-11-07 10:16 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051105162650.620266000@b551138y.boeblingen.de.ibm.com>
2005-11-05 16:26 ` [PATCH 01/25] compat: Remove leftovers from register_ioctl32_conversion Arnd Bergmann
2005-11-05 16:44   ` Al Viro
2005-11-05 17:04   ` Andi Kleen
2005-11-05 16:26 ` [PATCH 02/25] net: move socket ioctl32 to net/compat.c Arnd Bergmann
2005-11-05 16:26 ` [PATCH 03/25] net: improve ioctl32 dev_ioctl handling Arnd Bergmann
2005-11-05 16:26 ` [PATCH 04/25] net: move atm ioctl32 to net/atm/ioctl.c Arnd Bergmann
2005-11-05 16:26 ` [PATCH 05/25] net: move ppp specific ioctl32 handlers Arnd Bergmann
2005-11-05 16:26 ` [PATCH 06/25] mtd: move ioctl32 code to mtdchar.c Arnd Bergmann
2005-11-08 10:59   ` Jörn Engel
2005-11-08 18:10     ` Eric W. Biederman
2005-11-08 18:33       ` Jörn Engel
2005-11-08 18:45         ` Josh Boyer
2005-11-08 18:57         ` Thomas Gleixner
2005-11-08 22:21           ` Jörn Engel
2005-11-09  0:04             ` Thomas Gleixner
2005-11-08 19:03         ` David Woodhouse
2005-11-09 15:37         ` Eric W. Biederman
2005-11-09 15:48           ` Jörn Engel
2005-11-05 16:26 ` [PATCH 07/25] block: move ioctl32 code to drivers/block/ioctl.c Arnd Bergmann
2005-11-05 16:26 ` [PATCH 08/25] tty: move ioctl32 code over to vt_ioctl.c and tty_io.c Arnd Bergmann
2005-11-05 16:26 ` [PATCH 09/25] v4l: move ioctl32 handlers to drivers/media/ Arnd Bergmann
2005-11-06  4:13   ` Mauro Carvalho Chehab
2005-11-07 10:17     ` Arnd Bergmann [this message]
2005-11-12 14:35       ` Mauro Carvalho Chehab
2005-11-05 16:27 ` [PATCH 10/25] fs: move ext2 ioctl32 handlers into file systems Arnd Bergmann
2005-11-06  4:39   ` Christoph Hellwig
2005-11-07 10:24     ` Arnd Bergmann
2005-11-05 16:27 ` [PATCH 11/25] framebuffer: move ioctl32 code to fbmem.c Arnd Bergmann
2005-11-06  0:16   ` Antonino A. Daplas
2005-11-05 16:27 ` [PATCH 12/25] scsi: move SG_IO ioctl32 code to sg.c Arnd Bergmann
2005-11-05 16:44   ` James Bottomley
2005-11-05 19:19     ` Arnd Bergmann
2005-11-05 16:27 ` [PATCH 13/25] loop: move ioctl32 code to loop.c Arnd Bergmann
2005-11-07  3:33   ` Christoph Hellwig
2005-11-05 16:27 ` [PATCH 14/25] smbfs: simplify compat_ioctl handling Arnd Bergmann
2005-11-05 16:27 ` [PATCH 15/25] autofs: move ioctl32 to autofs{,4}/root.c Arnd Bergmann
2005-11-06  6:22   ` Ian Kent
2005-11-07 10:36     ` Arnd Bergmann
2005-11-07 16:02       ` Ian Kent
2005-11-08 16:23         ` Ian Kent
2005-11-05 16:27 ` [PATCH 16/25] ncpfs: move ioctl32 code to fs/ncpfs/ioctl.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 17/25] vfat: move ioctl32 code to fs/fat/dir.c Arnd Bergmann
2005-11-06 12:05   ` OGAWA Hirofumi
2005-11-07 10:41     ` Arnd Bergmann
2005-11-07  3:37   ` Christoph Hellwig
2005-11-07 10:42     ` Arnd Bergmann
2005-11-05 16:27 ` [PATCH 18/25] raw: move ioctl32 code to raw.c Arnd Bergmann
2005-11-06 13:59   ` Adrian Bunk
2005-11-07 10:43     ` Arnd Bergmann
2005-11-05 16:27 ` [PATCH 19/25] usbdevfs: move ioctl32 into devio.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 20/25] i2c: move ioctl32 code to i2c-dev.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 21/25] reiserfs: remove ioctl conversion code Arnd Bergmann
2005-11-05 16:27 ` [PATCH 22/25] serial: move ioctl32 code to tty_io.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 23/25] cdrom: move ioctl32 code to drivers/cdrom/compat.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 24/25] tape: move mtio ioctl32 code to driver/char/compat_mtio.c Arnd Bergmann
2005-11-05 16:27 ` [PATCH 25/25] bluetooth: integrate ioctl32 handling Arnd Bergmann

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=200511071117.50613.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@brturbo.com.br \
    --cc=video4linux-list@redhat.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