13 Apr, 2011

1 commit


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

    Hans Verkuil
     
  • 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

    Hans Verkuil
     

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

    Laurent Pinchart
     
  • 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

    Laurent Pinchart
     

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

    Hans Verkuil
     

21 Oct, 2010

1 commit


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

    Hans Verkuil
     

17 Jun, 2009

2 commits


30 Mar, 2009

3 commits


29 Jan, 2009

1 commit


03 Jan, 2009

1 commit


30 Dec, 2008

1 commit