19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

28 Nov, 2017

1 commit


22 Mar, 2017

1 commit


24 Aug, 2016

1 commit

  • Replace all calls to g/s_crop by calls to the get/set_selection pad ops.

    Remove the old g/s_crop video ops since they are now no longer used.

    The cropcap video op is now only used to pass pixelaspect information,
    and is only needed if the pixelaspect is not 1:1.

    Signed-off-by: Hans Verkuil
    Cc: Guennadi Liakhovetski
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

01 Oct, 2015

1 commit

  • Make videobuf2-v4l2 as a wrapper of videobuf2-core for v4l2-use.
    And replace videobuf2-core.h with videobuf2-v4l2.h.
    This renaming change should be accompanied by the modifications
    of all device drivers that include videobuf2-core.h.
    It can be done with just running this shell script.

    replace()
    {
    str1=$1
    str2=$2
    dir=$3
    for file in $(find $dir -name *.h -o -name *.c -o -name Makefile)
    do
    echo $file
    sed "s/$str1/$str2/g" $file > $file.out
    mv $file.out $file
    done
    }

    replace "videobuf2-core" "videobuf2-v4l2" "include/media/"
    replace "videobuf2-core" "videobuf2-v4l2" "drivers/media/"
    replace "videobuf2-core" "videobuf2-v4l2" "drivers/usb/gadget/"
    replace "videobuf2-core" "videobuf2-v4l2" "drivers/staging/media/"

    Signed-off-by: Junghak Sung
    Signed-off-by: Geunyoung Kim
    Acked-by: Seung-Woo Kim
    Acked-by: Inki Dae
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Junghak Sung
     

15 Nov, 2014

1 commit

  • In order to have subsytem agnostic media bus format definitions we've
    moved media bus definition to include/uapi/linux/media-bus-format.h and
    prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

    Reference new definitions in all platform drivers.

    Signed-off-by: Boris Brezillon
    Acked-by: Hans Verkuil
    Acked-by: Sakari Ailus
    Acked-by: Sekhar Nori
    Acked-by: Lad, Prabhakar
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Boris BREZILLON
     

31 Oct, 2013

2 commits

  • Some non soc-camera drivers, e.g. em28xx, use subdevice drivers, originally
    written for soc-camera, which use soc_camera_power_on() and
    soc_camera_power_off() helpers to implement their .s_power() methods. Those
    helpers in turn can enable and disable a clock, if it is supplied to them
    as a parameter. This works well when camera host drivers balance their
    calls to subdevices' .s_power() methods. However, some such drivers fail to
    do that, which leads to unbalanced calls to v4l2_clk_enable() /
    v4l2_clk_disable(), which then in turn produce kernel warnings. Such
    behaviour is wrong and should be fixed, however, sometimes it is difficult,
    because some of those drivers are rather old and use lots of subdevices,
    which all should be tested after such a fix. To support such drivers this
    patch adds a work-around, allowing host drivers or platforms to set a flag,
    in which case soc-camera helpers will only enable the clock, if it is
    disabled, and disable it only once on the first call to .s_power(0).

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • This prepares soc-camera to use struct v4l2_subdev_platform_data for its
    subdevice-facing API, which would allow subdevice driver re-use.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     

29 Jun, 2013

1 commit

  • In scan_async_group() if the size parameter is negative, the sasd pointer
    will be used uninitialised:
    drivers/media/platform/soc_camera/soc_camera.c: In function "soc_camera_host_register":
    drivers/media/platform/soc_camera/soc_camera.c:1514:55: warning: "sasd" may
    be used uninitialized in this function [-Wmaybe-uninitialized]
    sasd->asd.match.i2c.adapter_id, sasd->asd.match.i2c.address);
    ^
    drivers/media/platform/soc_camera/soc_camera.c:1464:34: note: "sasd" was
    declared here
    struct soc_camera_async_subdev *sasd;
    Fix this by making "size" and the array, from which it is assigned unsigned.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     

22 Jun, 2013

4 commits

  • Add support for asynchronous subdevice probing, using the v4l2-async API.
    The legacy synchronous mode is still supported too, which allows to
    gradually update drivers and platforms. The selected approach adds a
    notifier for each struct soc_camera_device instance, i.e. for each video
    device node, even when there are multiple such instances registered with a
    single soc-camera host simultaneously.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Hans Verkuil
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • Instead of centrally enabling and disabling subdevice master clocks in
    soc-camera core, let subdevice drivers do that themselves, using the
    V4L2 clock API and soc-camera convenience wrappers.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Hans Verkuil
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • Currently soc-camera uses a single camera host callback to activate the
    interface master clock and to configure the interface for a specific
    client. However, during probing we might not have the information about
    a client, we just need to activate the clock. Add new camera host driver
    callbacks to only start and stop the clock without and client-specific
    configuration.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Hans Verkuil
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • All soc-camera host drivers include a pointer to an soc-camera device in
    their host private struct to check, that only one client is connected.
    Move this common code to soc_camera.c.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Hans Verkuil
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     

21 Jun, 2013

1 commit

  • The parent field will eventually disappear to be replaced by v4l2_dev.
    soc_camera does provide a v4l2_device struct but did not point to it in
    struct video_device. This is now fixed.
    Now the video nodes can be found under the correct platform bus, and
    the advanced debug ioctls work correctly as well (the core implementation
    of those ioctls requires that v4l2_dev is set correctly).

    Signed-off-by: Hans Verkuil
    Acked-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

05 Apr, 2013

1 commit


05 Jan, 2013

3 commits

  • struct soc_camera_link currently contains fields, used both by sensor and
    bridge drivers. To make subdevice driver re-use simpler, split it into a
    host and a subdevice parts.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • Currently soc-camera has a per-device node lock, used for video operations
    and a per-host lock for code paths, modifying host's pipeline. Manipulating
    the two locks increases complexity and doesn't bring any advantages. This
    patch removes the per-device lock and uses the per-host lock for all
    operations.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     
  • The recently introduced host_lock causes lockdep warnings, besides, list
    enumeration in scan_add_host() must be protected by holdint the list_lock.
    OTOH, holding .video_lock in soc_camera_open() isn't enough to protect
    the host during its building of the pipeline, because .video_lock is per
    soc-camera device. If, e.g. more than one sensor can be attached to a host
    and the user tries to open both device nodes simultaneously, host's .add()
    method can be called simultaneously for both sensors. Fix these problems
    by holding list_lock instead of .host_lock in scan_add_host() and taking
    it shortly at the beginning of soc_camera_open(), and using .host_lock to
    protect host's .add() and .remove() operations only.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     

26 Sep, 2012

1 commit

  • Write-only ioctls should have a const argument in the ioctl op.
    Do this conversion for vidioc_s_crop.
    Adding const for write-only ioctls was decided during the 2012 Media Workshop.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

16 Aug, 2012

2 commits


16 May, 2012

1 commit

  • Add a capabilities field to the soc_camera_host structure to flag hosts
    that support user-configurable line strides. soc_camera_try_fmt() then
    passes the user-provided bytesperline and sizeimage format fields to
    such hosts, and expects the host to check (and fix if needed) the
    values.

    Signed-off-by: Laurent Pinchart
    [g.liakhovetski@gmx.de: fix a typo in mx2_camera.c]
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     

15 May, 2012

1 commit


26 Apr, 2012

1 commit

  • If multiple clients are registered on a single camera host interface,
    the user-space hot-plug software can try to access the one, that probed
    first, before probing of the second one has completed. This can be
    handled by individual host drivers, but it is even better to hold back
    the user-space until all the probing on this host has completed. This
    fixes a race on ecovec with two clients registered on the CEU1 host, which
    otherwise triggers a BUG() in sh_mobile_ceu_remove_device().

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Guennadi Liakhovetski
     

06 Jan, 2012

1 commit


11 Dec, 2011

1 commit


04 Nov, 2011

9 commits


28 Jul, 2011

5 commits