01 Feb, 2016

1 commit


11 Jan, 2016

3 commits

  • With the MC next gen rework, what's left for media_entity_init()
    is to just initialize the PADs. However, certain devices, like
    a FLASH led/light doesn't have any input or output PAD.

    So, there's no reason why calling media_entity_init() would be
    mandatory. Also, despite its name, what this function actually
    does is to initialize the PADs data. So, rename it to
    media_entity_pads_init() in order to reflect that.

    The media entity actual init happens during entity register,
    at media_device_register_entity(). We should move init of
    num_links and num_backlinks to it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Rename the userspace types from MEDIA_ENT_T_ to MEDIA_ENT_F_
    and add the backward compatibility bits.

    The changes at the .c files was generated by the following
    coccinelle script:

    @@
    @@
    -MEDIA_ENT_T_UNKNOWN
    +MEDIA_ENT_F_UNKNOWN
    @@
    @@
    -MEDIA_ENT_T_DVB_BASE
    +MEDIA_ENT_F_DVB_BASE
    @@
    @@
    -MEDIA_ENT_T_V4L2_BASE
    +MEDIA_ENT_F_V4L2_BASE
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_BASE
    +MEDIA_ENT_F_V4L2_SUBDEV_BASE
    @@
    @@
    -MEDIA_ENT_T_CONNECTOR_BASE
    +MEDIA_ENT_F_CONNECTOR_BASE
    @@
    @@
    -MEDIA_ENT_T_V4L2_VIDEO
    +MEDIA_ENT_F_IO_V4L
    @@
    @@
    -MEDIA_ENT_T_V4L2_VBI
    +MEDIA_ENT_F_IO_VBI
    @@
    @@
    -MEDIA_ENT_T_V4L2_SWRADIO
    +MEDIA_ENT_F_IO_SWRADIO
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN
    +MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN
    @@
    @@
    -MEDIA_ENT_T_CONN_RF
    +MEDIA_ENT_F_CONN_RF
    @@
    @@
    -MEDIA_ENT_T_CONN_SVIDEO
    +MEDIA_ENT_F_CONN_SVIDEO
    @@
    @@
    -MEDIA_ENT_T_CONN_COMPOSITE
    +MEDIA_ENT_F_CONN_COMPOSITE
    @@
    @@
    -MEDIA_ENT_T_CONN_TEST
    +MEDIA_ENT_F_CONN_TEST
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_SENSOR
    +MEDIA_ENT_F_CAM_SENSOR
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_FLASH
    +MEDIA_ENT_F_FLASH
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_LENS
    +MEDIA_ENT_F_LENS
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_DECODER
    +MEDIA_ENT_F_ATV_DECODER
    @@
    @@
    -MEDIA_ENT_T_V4L2_SUBDEV_TUNER
    +MEDIA_ENT_F_TUNER
    @@
    @@
    -MEDIA_ENT_T_DVB_DEMOD
    +MEDIA_ENT_F_DTV_DEMOD
    @@
    @@
    -MEDIA_ENT_T_DVB_DEMUX
    +MEDIA_ENT_F_TS_DEMUX
    @@
    @@
    -MEDIA_ENT_T_DVB_TSOUT
    +MEDIA_ENT_F_IO_DTV
    @@
    @@
    -MEDIA_ENT_T_DVB_CA
    +MEDIA_ENT_F_DTV_CA
    @@
    @@
    -MEDIA_ENT_T_DVB_NET_DECAP
    +MEDIA_ENT_F_DTV_NET_DECAP

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Currently, media_entity_init() creates an array with the links,
    allocated at init time. It provides a parameter (extra_links)
    that would allocate more links than the current needs, but this
    is not used by any driver.

    As we want to be able to do dynamic link allocation/removal,
    we'll need to change the implementation of the links. So,
    before doing that, let's first remove that extra unused
    parameter, in order to cleanup the interface first.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Sakari Ailus
    Acked-by: Laurent Pinchart

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

17 Nov, 2015

1 commit

  • Currently, include/media is messy, as it contains both the V4L2 core
    headers and some driver-specific headers on the same place. That makes
    harder to identify what core headers should be documented and what
    headers belong to I2C drivers that are included only by bridge/main
    drivers that would require the functions provided by them.

    Let's move those i2c specific files to its own subdirectory.

    The files to move were produced via the following script:
    mkdir include/media/i2c
    (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
    (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done)
    for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done

    And the references corrected via this script:
    MAIN_DIR="media/"
    PREV_DIR="media/"
    DIRS="i2c/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
    for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
    n=`basename $j`
    git grep -l $n
    done
    done|sort|uniq >files && (
    echo "Handling files..." >&2;
    echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo "perl -ne 's,(include [\\\"\\&2;
    echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
    (
    cd include/$MAIN_DIR;
    for j in $DIRS; do
    for i in $(ls $j); do
    echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
    done;
    done;
    echo "cat > a && mv a \$i; done"
    );
    ) >script && . ./script

    Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Arnd Bergmann

    Mauro Carvalho Chehab
     

06 Jul, 2015

1 commit


01 May, 2015

2 commits


24 Mar, 2015

1 commit

  • If a subdevice pad op is called from a bridge driver, then there is
    no v4l2_subdev_fh struct that can be passed to the subdevice. This
    made it hard to use such subdevs from a bridge driver.

    This patch replaces the v4l2_subdev_fh pointer by a v4l2_subdev_pad_config
    pointer in the pad ops. This allows bridge drivers to use the various
    try_ pad ops by creating a v4l2_subdev_pad_config struct and passing it
    along to the pad op.

    The v4l2_subdev_get_try_* macros had to be changed because of this, so
    I also took the opportunity to use the full name of the v4l2_subdev_get_try_*
    functions in the __V4L2_SUBDEV_MK_GET_TRY macro arguments: if you now do
    'git grep v4l2_subdev_get_try_format' you will actually find the header
    where it is defined.

    One remark regarding the drivers/staging/media/davinci_vpfe patches: the
    *_init_formats() functions assumed that fh could be NULL. However, that's
    not true for this driver, it's always set. This is almost certainly a copy
    and paste from the omap3isp driver. I've updated the code to reflect the
    fact that fh is never NULL.

    Signed-off-by: Hans Verkuil
    Acked-by: Lad, Prabhakar
    Tested-by: Lad, Prabhakar
    Acked-by: Laurent Pinchart
    Acked-by: Sakari Ailus
    Acked-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

03 Mar, 2015

1 commit


15 Nov, 2014

1 commit

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

    Replace all references to the old definitions in i2c drivers.

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

    Boris BREZILLON
     

22 Sep, 2014

1 commit


25 May, 2014

2 commits


07 Mar, 2014

1 commit

  • This patch moves the parsing helpers used to parse connected graphs
    in the device tree, like the video interface bindings documented in
    Documentation/devicetree/bindings/media/video-interfaces.txt, from
    drivers/media/v4l2-core/v4l2-of.c into drivers/of/base.c.

    This allows to reuse the same parser code from outside the V4L2
    framework, most importantly from display drivers.
    The functions v4l2_of_get_next_endpoint, v4l2_of_get_remote_port,
    and v4l2_of_get_remote_port_parent are moved. They are renamed to
    of_graph_get_next_endpoint, of_graph_get_remote_port, and
    of_graph_get_remote_port_parent, respectively.
    Since there are not that many current users yet, switch all of
    them to the new functions right away.

    Signed-off-by: Philipp Zabel
    Acked-by: Tomi Valkeinen
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Sylwester Nawrocki

    Philipp Zabel
     

31 Oct, 2013

1 commit


24 Aug, 2013

1 commit


27 Jul, 2013

1 commit


29 Jun, 2013

1 commit


17 Jun, 2013

2 commits


27 May, 2013

2 commits


21 May, 2013

1 commit


24 Mar, 2013

1 commit


20 Mar, 2013

3 commits


06 Feb, 2013

1 commit


16 Aug, 2012

1 commit