]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (5571): V4l1-compat: Make VIDIOCSPICT return errors in a useful way
authorTrent Piepho <xyzzy@speakeasy.org>
Sat, 28 Apr 2007 01:56:29 +0000 (22:56 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 9 May 2007 13:13:09 +0000 (10:13 -0300)
commitccd39b98da994cf9536e5678ce05babb0323c8b0
tree09520b7aaf5d491a0f954fc8f038d0806663ac5d
parent0cbfc8c31ab5bf676f88d23e3a91c5685c37f0f4
V4L/DVB (5571): V4l1-compat:  Make VIDIOCSPICT return errors in a useful way

Among other things, VIDIOCSPICT sets the pixel format.  Some drivers
don't support all formats, e.g. cx88 doesn't support the planar formats.
The compat code that translates VIDIOCSPICT into V4L2 ioctls doesn't pass
on any errors, so a userspace program doesn't know if it has selected an
unsupported pixel format.

VIDIOCSPICT sets both the memory capture and overlay formats, and it's
possible that one will be set while the other will fail, e.g. cx88
doesn't even support overlay.  Also, trying to set the overlay format
will fail for non-root users.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/v4l1-compat.c