13 Apr, 2011
1 commit
-
v4l2_device_unregister_subdev() wrongly uses "arg..." instead of "## arg"
in its body. Fix it.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
23 Mar, 2011
2 commits
-
The video_device struct has proper ref counting and its release function
will be called when the last user releases it. But no such support was
available for struct v4l2_device. This made it hard to determine when a
USB driver can release the device if it has multiple device nodes.With one device node it is easy of course, since when the device node is
released, the whole device can be released.This patch adds refcounting to v4l2_device. When registering device nodes
the v4l2_device refcount will be increased, when releasing device nodes
it will be decreased. The (optional) release function will be called when
the last device node was released.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Integrate the v4l2_prio_state into the core, ready for use.
One struct v4l2_prio_state is added to v4l2_device and a pointer
to a prio state is added to video_device.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
22 Mar, 2011
2 commits
-
The pointer will later be used to register/unregister media entities
when registering/unregistering a v4l2_subdev or a video_device.With the introduction of media devices, device drivers need to store a
pointer to a driver-specific structure in the device's drvdata.
v4l2_device can't claim ownership of the drvdata anymore.To maintain compatibility with drivers that rely on v4l2_device storing
a pointer to itself in the device's drvdata, v4l2_device_register() will
keep doing so if the drvdata is NULL.Signed-off-by: Laurent Pinchart
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Create a device node named subdevX for every registered subdev.
As the device node is registered before the subdev core::s_config
function is called, return -EGAIN on open until initialization
completes.Signed-off-by: Laurent Pinchart
Signed-off-by: Vimarsh Zutshi
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
02 Dec, 2010
1 commit
-
The BKL replacement mutex had some serious performance side-effects on
V4L drivers. It is replaced by a better heuristic that works around the
worst of the side-effects.Read the v4l2-dev.c comments for the whole sorry story. This is a
temporary measure only until we can convert all v4l drivers to use
unlocked_ioctl.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
21 Oct, 2010
1 commit
-
"sd" and "err" are too common names to be used in macros for local variables.
Prefix them with an underscore to avoid name clashing.[mchehab@redhat.com: whitespace cleanups]
Signed-off-by: Guennadi Liakhovetski
Reviewed-by: Andy Walls
Signed-off-by: Mauro Carvalho Chehab
09 Aug, 2010
1 commit
-
Add a new framework to handle controls which makes life for driver
developers much easier.Note that this patch moves some of the control support that used to be in
v4l2-common.c to v4l2-ctrls.c. The tables were copied unchanged. The body
of v4l2_ctrl_query_fill() was copied to a new v4l2_ctrl_fill() function
in v4l2-ctrls.c. This new function doesn't use the v4l2_queryctrl
struct anymore, which makes it more general.The remainder of v4l2-ctrls.c is all new. Highlights include:
- No need to implement VIDIOC_QUERYCTRL, QUERYMENU, S_CTRL, G_CTRL,
S_EXT_CTRLS, G_EXT_CTRLS or TRY_EXT_CTRLS in either bridge drivers
or subdevs. New wrapper functions are provided that can just be plugged in.
Once everything has been converted these wrapper functions can be removed as well.- When subdevices are added their controls can be automatically merged
with the bridge driver's controls.- Most drivers just need to implement s_ctrl to set the controls.
The framework handles the locking and tries to be as 'atomic' as possible.- Ready for the subdev device nodes: the same mechanism applies to subdevs
and their device nodes as well. Sub-device drivers can make controls
local, preventing them from being merged with bridge drivers.- Takes care of backwards compatibility handling of VIDIOC_S_CTRL and
VIDIOC_G_CTRL. Handling of V4L2_CID_PRIVATE_BASE is fully transparent.
CTRL_CLASS controls are automatically added.Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
17 Jun, 2009
2 commits
-
Add a utility function that can be used to setup the v4l2_device's name
field in a standard manner.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The name size limit is gone from the driver core, the BUS_ID_SIZE
value will be removed.Acked-by: Greg Kroah-Hartman
Signed-off-by: Kay Sievers
Signed-off-by: Mauro Carvalho Chehab
30 Mar, 2009
3 commits
-
Call v4l2_device_disconnect when the parent of a hotpluggable device
disconnects. This ensures that you do not have a pointer to a device that
is no longer present.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add a notify callback to v4l2_device to let sub-devices notify their
parent of special events.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Some drivers (e.g. for ISA devices) have no parent device because there
is no associated bus driver. Allow the parent device to be NULL in
those cases when registering v4l2_device.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
29 Jan, 2009
1 commit
-
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
03 Jan, 2009
1 commit
-
Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.Cc: Jean-Francois Moine
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
30 Dec, 2008
1 commit
-
Start implementing a proper v4l2 framework as discussed during the
Linux Plumbers Conference 2008.Introduces v4l2_device (for device instances) and v4l2_subdev (representing
sub-device instances).Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Reviewed-by: Guennadi Liakhovetski
Reviewed-by: Andy Walls
Reviewed-by: David Brownell
Signed-off-by: Mauro Carvalho Chehab