Re: [PATCH 5/9] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i

2014-11-21 Thread Maxime Ripard
Hi Mauro,

On Thu, Nov 20, 2014 at 02:28:56PM -0200, Mauro Carvalho Chehab wrote:
 Em Thu, 20 Nov 2014 16:55:24 +0100
 Hans de Goede hdego...@redhat.com escreveu:
 
  Add support for the larger fifo found on sun5i and sun6i, having a separate
  compatible for the ir found on sun5i  sun6i also is useful if we ever want
  to add ir transmit support, because the sun5i  sun6i version do not have
  transmit support.
  
  Note this commits also adds checking for the end-of-packet interrupt flag
  (which was already enabled), as the fifo-data-available interrupt flag only
  gets set when the trigger-level is exceeded. So far we've been getting away
  with not doing this because of the low trigger-level, but this is something
  which we should have done since day one.
  
  Signed-off-by: Hans de Goede hdego...@redhat.com
 
 As this is meant to be merged via some other tree:
 
 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com

I think merging it through your tree would be just fine.

Acked-by: Maxime Ripard maxime.rip...@free-electrons.com

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH 1/9] clk: sunxi: Give sunxi_factors_register a registers parameter

2014-11-21 Thread Maxime Ripard
Hi Hans,

On Thu, Nov 20, 2014 at 04:55:20PM +0100, Hans de Goede wrote:
 Before this commit sunxi_factors_register uses of_iomap(node, 0) to get
 the clk registers. The sun6i prcm has factor clocks, for which we want to
 use sunxi_factors_register, but of_iomap(node, 0) does not work for the prcm
 factor clocks, because the prcm uses the mfd framework, so the registers
 are not part of the dt-node, instead they are added to the platform_device,
 as platform_device resources.
 
 This commit makes getting the registers the callers duty, so that
 sunxi_factors_register can be used with mfd instantiated platform device too.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com

Funny, I was thinking of doing exactly the same thing for MMC clocks :)

 ---
  drivers/clk/sunxi/clk-factors.c| 10 --
  drivers/clk/sunxi/clk-factors.h|  7 ---
  drivers/clk/sunxi/clk-mod0.c   |  6 --
  drivers/clk/sunxi/clk-sun8i-mbus.c |  2 +-
  drivers/clk/sunxi/clk-sunxi.c  |  3 ++-
  5 files changed, 15 insertions(+), 13 deletions(-)
 
 diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
 index f83ba09..fc4f4b5 100644
 --- a/drivers/clk/sunxi/clk-factors.c
 +++ b/drivers/clk/sunxi/clk-factors.c
 @@ -156,9 +156,10 @@ static const struct clk_ops clk_factors_ops = {
   .set_rate = clk_factors_set_rate,
  };
  
 -struct clk * __init sunxi_factors_register(struct device_node *node,
 -const struct factors_data *data,
 -spinlock_t *lock)
 +struct clk *sunxi_factors_register(struct device_node *node,
 +const struct factors_data *data,
 +spinlock_t *lock,
 +void __iomem *reg)
  {
   struct clk *clk;
   struct clk_factors *factors;
 @@ -168,11 +169,8 @@ struct clk * __init sunxi_factors_register(struct 
 device_node *node,
   struct clk_hw *mux_hw = NULL;
   const char *clk_name = node-name;
   const char *parents[FACTORS_MAX_PARENTS];
 - void __iomem *reg;
   int i = 0;
  
 - reg = of_iomap(node, 0);
 -
   /* if we have a mux, we will have 1 parents */
   while (i  FACTORS_MAX_PARENTS 
  (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
 diff --git a/drivers/clk/sunxi/clk-factors.h b/drivers/clk/sunxi/clk-factors.h
 index 9913840..1f5526d 100644
 --- a/drivers/clk/sunxi/clk-factors.h
 +++ b/drivers/clk/sunxi/clk-factors.h
 @@ -37,8 +37,9 @@ struct clk_factors {
   spinlock_t *lock;
  };
  
 -struct clk * __init sunxi_factors_register(struct device_node *node,
 -const struct factors_data *data,
 -spinlock_t *lock);
 +struct clk *sunxi_factors_register(struct device_node *node,
 +const struct factors_data *data,
 +spinlock_t *lock,
 +void __iomem *reg);

Why are you dropping the __init there?

  
  #endif
 diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
 index 4a56385..9530833 100644
 --- a/drivers/clk/sunxi/clk-mod0.c
 +++ b/drivers/clk/sunxi/clk-mod0.c
 @@ -78,7 +78,8 @@ static DEFINE_SPINLOCK(sun4i_a10_mod0_lock);
  
  static void __init sun4i_a10_mod0_setup(struct device_node *node)
  {
 - sunxi_factors_register(node, sun4i_a10_mod0_data, 
 sun4i_a10_mod0_lock);
 + sunxi_factors_register(node, sun4i_a10_mod0_data,
 +sun4i_a10_mod0_lock, of_iomap(node, 0));

As of_iomap can fail, I'd rather check the returned value before
calling sunxi_factors_register.

I know it wasn't done before, but it's the right thing to do, as it
would lead to an instant crash if that fails.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH 5/9] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i

2014-11-21 Thread Hans de Goede
Hi,

On 11/21/2014 09:26 AM, Maxime Ripard wrote:
 Hi Mauro,
 
 On Thu, Nov 20, 2014 at 02:28:56PM -0200, Mauro Carvalho Chehab wrote:
 Em Thu, 20 Nov 2014 16:55:24 +0100
 Hans de Goede hdego...@redhat.com escreveu:

 Add support for the larger fifo found on sun5i and sun6i, having a separate
 compatible for the ir found on sun5i  sun6i also is useful if we ever want
 to add ir transmit support, because the sun5i  sun6i version do not have
 transmit support.

 Note this commits also adds checking for the end-of-packet interrupt flag
 (which was already enabled), as the fifo-data-available interrupt flag only
 gets set when the trigger-level is exceeded. So far we've been getting away
 with not doing this because of the low trigger-level, but this is something
 which we should have done since day one.

 Signed-off-by: Hans de Goede hdego...@redhat.com

 As this is meant to be merged via some other tree:

 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com
 
 I think merging it through your tree would be just fine.
 
 Acked-by: Maxime Ripard maxime.rip...@free-electrons.com

Heh, I was thinking it would be best if it went through Maxime's tree because
it also has some deps on new clk stuff (well the dts have deps on that), but 
either
way works for me.

Maxime if you want this go through Mauro's tree, I can send a pull-req to Mauro
(I'm a linux-media sub-maintainer), so if that is the case let me know and I'll
prepare a pull-req (after fixing the missing reset documentation in the 
bindings).

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] clk: sunxi: Give sunxi_factors_register a registers parameter

2014-11-21 Thread Hans de Goede
Hi,

On 11/21/2014 09:35 AM, Maxime Ripard wrote:
 Hi Hans,
 
 On Thu, Nov 20, 2014 at 04:55:20PM +0100, Hans de Goede wrote:
 Before this commit sunxi_factors_register uses of_iomap(node, 0) to get
 the clk registers. The sun6i prcm has factor clocks, for which we want to
 use sunxi_factors_register, but of_iomap(node, 0) does not work for the prcm
 factor clocks, because the prcm uses the mfd framework, so the registers
 are not part of the dt-node, instead they are added to the platform_device,
 as platform_device resources.

 This commit makes getting the registers the callers duty, so that
 sunxi_factors_register can be used with mfd instantiated platform device too.

 Signed-off-by: Hans de Goede hdego...@redhat.com
 
 Funny, I was thinking of doing exactly the same thing for MMC clocks :)
 
 ---
  drivers/clk/sunxi/clk-factors.c| 10 --
  drivers/clk/sunxi/clk-factors.h|  7 ---
  drivers/clk/sunxi/clk-mod0.c   |  6 --
  drivers/clk/sunxi/clk-sun8i-mbus.c |  2 +-
  drivers/clk/sunxi/clk-sunxi.c  |  3 ++-
  5 files changed, 15 insertions(+), 13 deletions(-)

 diff --git a/drivers/clk/sunxi/clk-factors.c 
 b/drivers/clk/sunxi/clk-factors.c
 index f83ba09..fc4f4b5 100644
 --- a/drivers/clk/sunxi/clk-factors.c
 +++ b/drivers/clk/sunxi/clk-factors.c
 @@ -156,9 +156,10 @@ static const struct clk_ops clk_factors_ops = {
  .set_rate = clk_factors_set_rate,
  };
  
 -struct clk * __init sunxi_factors_register(struct device_node *node,
 -   const struct factors_data *data,
 -   spinlock_t *lock)
 +struct clk *sunxi_factors_register(struct device_node *node,
 +   const struct factors_data *data,
 +   spinlock_t *lock,
 +   void __iomem *reg)
  {
  struct clk *clk;
  struct clk_factors *factors;
 @@ -168,11 +169,8 @@ struct clk * __init sunxi_factors_register(struct 
 device_node *node,
  struct clk_hw *mux_hw = NULL;
  const char *clk_name = node-name;
  const char *parents[FACTORS_MAX_PARENTS];
 -void __iomem *reg;
  int i = 0;
  
 -reg = of_iomap(node, 0);
 -
  /* if we have a mux, we will have 1 parents */
  while (i  FACTORS_MAX_PARENTS 
 (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
 diff --git a/drivers/clk/sunxi/clk-factors.h 
 b/drivers/clk/sunxi/clk-factors.h
 index 9913840..1f5526d 100644
 --- a/drivers/clk/sunxi/clk-factors.h
 +++ b/drivers/clk/sunxi/clk-factors.h
 @@ -37,8 +37,9 @@ struct clk_factors {
  spinlock_t *lock;
  };
  
 -struct clk * __init sunxi_factors_register(struct device_node *node,
 -   const struct factors_data *data,
 -   spinlock_t *lock);
 +struct clk *sunxi_factors_register(struct device_node *node,
 +   const struct factors_data *data,
 +   spinlock_t *lock,
 +   void __iomem *reg);
 
 Why are you dropping the __init there?

Because it is going to be used from mfd instantiation, so from a platform_dev
probe function which is not __init.

 
  
  #endif
 diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
 index 4a56385..9530833 100644
 --- a/drivers/clk/sunxi/clk-mod0.c
 +++ b/drivers/clk/sunxi/clk-mod0.c
 @@ -78,7 +78,8 @@ static DEFINE_SPINLOCK(sun4i_a10_mod0_lock);
  
  static void __init sun4i_a10_mod0_setup(struct device_node *node)
  {
 -sunxi_factors_register(node, sun4i_a10_mod0_data, 
 sun4i_a10_mod0_lock);
 +sunxi_factors_register(node, sun4i_a10_mod0_data,
 +   sun4i_a10_mod0_lock, of_iomap(node, 0));
 
 As of_iomap can fail, I'd rather check the returned value before
 calling sunxi_factors_register.
 
 I know it wasn't done before, but it's the right thing to do, as it
 would lead to an instant crash if that fails.

Ok, I'll wait for you to review the rest of the series and then do a v2 of the
patch-set with this fixed (as time permits).

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/9] clk: sunxi: Add prcm mod0 clock driver

2014-11-21 Thread Maxime Ripard
Hi,

On Thu, Nov 20, 2014 at 04:55:22PM +0100, Hans de Goede wrote:
 Add a driver for mod0 clocks found in the prcm. Currently there is only
 one mod0 clocks in the prcm, the ir clock.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
  drivers/clk/sunxi/Makefile|  2 +-
  drivers/clk/sunxi/clk-sun6i-prcm-mod0.c   | 63 
 +++
  drivers/mfd/sun6i-prcm.c  | 14 +
  4 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
 
 diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
 b/Documentation/devicetree/bindings/clock/sunxi.txt
 index ed116df..342c75a 100644
 --- a/Documentation/devicetree/bindings/clock/sunxi.txt
 +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
 @@ -56,6 +56,7 @@ Required properties:
   allwinner,sun4i-a10-usb-clk - for usb gates + resets on A10 / A20
   allwinner,sun5i-a13-usb-clk - for usb gates + resets on A13
   allwinner,sun6i-a31-usb-clk - for usb gates + resets on A31
 + allwinner,sun6i-a31-ir-clk - for the ir clock on A31
  
  Required properties for all clocks:
  - reg : shall be the control register address for the clock.
 diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
 index 7ddc2b5..daf8b1c 100644
 --- a/drivers/clk/sunxi/Makefile
 +++ b/drivers/clk/sunxi/Makefile
 @@ -10,4 +10,4 @@ obj-y += clk-sun8i-mbus.o
  
  obj-$(CONFIG_MFD_SUN6I_PRCM) += \
   clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \
 - clk-sun8i-apb0.o
 + clk-sun8i-apb0.o clk-sun6i-prcm-mod0.o
 diff --git a/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c 
 b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
 new file mode 100644
 index 000..e80f18e
 --- /dev/null
 +++ b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
 @@ -0,0 +1,63 @@
 +/*
 + * Allwinner A31 PRCM mod0 clock driver
 + *
 + * Copyright (C) 2014 Hans de Goede hdego...@redhat.com
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include linux/clk-provider.h
 +#include linux/clkdev.h
 +#include linux/module.h
 +#include linux/of_address.h
 +#include linux/platform_device.h
 +
 +#include clk-factors.h
 +#include clk-mod0.h
 +
 +static const struct of_device_id sun6i_a31_prcm_mod0_clk_dt_ids[] = {
 + { .compatible = allwinner,sun6i-a31-ir-clk },
 + { /* sentinel */ }
 +};
 +
 +static DEFINE_SPINLOCK(sun6i_prcm_mod0_lock);
 +
 +static int sun6i_a31_prcm_mod0_clk_probe(struct platform_device *pdev)
 +{
 + struct device_node *np = pdev-dev.of_node;
 + struct resource *r;
 + void __iomem *reg;
 +
 + if (!np)
 + return -ENODEV;
 +
 + r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 + reg = devm_ioremap_resource(pdev-dev, r);
 + if (IS_ERR(reg))
 + return PTR_ERR(reg);
 +
 + sunxi_factors_register(np, sun4i_a10_mod0_data,
 +sun6i_prcm_mod0_lock, reg);
 + return 0;
 +}
 +
 +static struct platform_driver sun6i_a31_prcm_mod0_clk_driver = {
 + .driver = {
 + .name = sun6i-a31-prcm-mod0-clk,
 + .of_match_table = sun6i_a31_prcm_mod0_clk_dt_ids,
 + },
 + .probe = sun6i_a31_prcm_mod0_clk_probe,
 +};
 +module_platform_driver(sun6i_a31_prcm_mod0_clk_driver);
 +
 +MODULE_DESCRIPTION(Allwinner A31 PRCM mod0 clock driver);
 +MODULE_AUTHOR(Hans de Goede hdego...@redhat.com);
 +MODULE_LICENSE(GPL);

I don't think this is the right approach, mainly for two reasons: the
compatible shouldn't change, and you're basically duplicating code
there.

I understand that you need the new compatible in order to avoid a
double probing: one by CLK_OF_DECLARE, and one by the usual mechanism,
and that also implies the second reason.

However, as those are not critical clocks that need to be here early
at boot, you can also fix this by turning the mod0 driver into a
platform driver itself. The compatible will be kept, the driver will
be the same.

The only thing we need to pay attention to is how client drivers
react when they cannot grab their clock. They should return
-EPROBE_DEFER, but that remains to be checked.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH 4/9] rc: sunxi-cir: Add support for an optional reset controller

2014-11-21 Thread Maxime Ripard
Hi Mauro,

On Thu, Nov 20, 2014 at 02:28:31PM -0200, Mauro Carvalho Chehab wrote:
 Em Thu, 20 Nov 2014 16:55:23 +0100
 Hans de Goede hdego...@redhat.com escreveu:
 
  On sun6i the cir block is attached to the reset controller, add support
  for de-asserting the reset if a reset controller is specified in dt.
  
  Signed-off-by: Hans de Goede hdego...@redhat.com
 
 As this is meant to be merged via some other tree:
 
 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com

Again, I think it'll be perfectly fine in your tree :)

Once the documentation is updated,
Acked-by: Maxime Ripard maxime.rip...@free-electrons.com

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH 3/9] clk: sunxi: Add prcm mod0 clock driver

2014-11-21 Thread Hans de Goede
Hi,

On 11/21/2014 09:49 AM, Maxime Ripard wrote:
 Hi,
 
 On Thu, Nov 20, 2014 at 04:55:22PM +0100, Hans de Goede wrote:
 Add a driver for mod0 clocks found in the prcm. Currently there is only
 one mod0 clocks in the prcm, the ir clock.

 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
  drivers/clk/sunxi/Makefile|  2 +-
  drivers/clk/sunxi/clk-sun6i-prcm-mod0.c   | 63 
 +++
  drivers/mfd/sun6i-prcm.c  | 14 +
  4 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c

 diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
 b/Documentation/devicetree/bindings/clock/sunxi.txt
 index ed116df..342c75a 100644
 --- a/Documentation/devicetree/bindings/clock/sunxi.txt
 +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
 @@ -56,6 +56,7 @@ Required properties:
  allwinner,sun4i-a10-usb-clk - for usb gates + resets on A10 / A20
  allwinner,sun5i-a13-usb-clk - for usb gates + resets on A13
  allwinner,sun6i-a31-usb-clk - for usb gates + resets on A31
 +allwinner,sun6i-a31-ir-clk - for the ir clock on A31
  
  Required properties for all clocks:
  - reg : shall be the control register address for the clock.
 diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
 index 7ddc2b5..daf8b1c 100644
 --- a/drivers/clk/sunxi/Makefile
 +++ b/drivers/clk/sunxi/Makefile
 @@ -10,4 +10,4 @@ obj-y += clk-sun8i-mbus.o
  
  obj-$(CONFIG_MFD_SUN6I_PRCM) += \
  clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \
 -clk-sun8i-apb0.o
 +clk-sun8i-apb0.o clk-sun6i-prcm-mod0.o
 diff --git a/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c 
 b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
 new file mode 100644
 index 000..e80f18e
 --- /dev/null
 +++ b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
 @@ -0,0 +1,63 @@
 +/*
 + * Allwinner A31 PRCM mod0 clock driver
 + *
 + * Copyright (C) 2014 Hans de Goede hdego...@redhat.com
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include linux/clk-provider.h
 +#include linux/clkdev.h
 +#include linux/module.h
 +#include linux/of_address.h
 +#include linux/platform_device.h
 +
 +#include clk-factors.h
 +#include clk-mod0.h
 +
 +static const struct of_device_id sun6i_a31_prcm_mod0_clk_dt_ids[] = {
 +{ .compatible = allwinner,sun6i-a31-ir-clk },
 +{ /* sentinel */ }
 +};
 +
 +static DEFINE_SPINLOCK(sun6i_prcm_mod0_lock);
 +
 +static int sun6i_a31_prcm_mod0_clk_probe(struct platform_device *pdev)
 +{
 +struct device_node *np = pdev-dev.of_node;
 +struct resource *r;
 +void __iomem *reg;
 +
 +if (!np)
 +return -ENODEV;
 +
 +r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 +reg = devm_ioremap_resource(pdev-dev, r);
 +if (IS_ERR(reg))
 +return PTR_ERR(reg);
 +
 +sunxi_factors_register(np, sun4i_a10_mod0_data,
 +   sun6i_prcm_mod0_lock, reg);
 +return 0;
 +}
 +
 +static struct platform_driver sun6i_a31_prcm_mod0_clk_driver = {
 +.driver = {
 +.name = sun6i-a31-prcm-mod0-clk,
 +.of_match_table = sun6i_a31_prcm_mod0_clk_dt_ids,
 +},
 +.probe = sun6i_a31_prcm_mod0_clk_probe,
 +};
 +module_platform_driver(sun6i_a31_prcm_mod0_clk_driver);
 +
 +MODULE_DESCRIPTION(Allwinner A31 PRCM mod0 clock driver);
 +MODULE_AUTHOR(Hans de Goede hdego...@redhat.com);
 +MODULE_LICENSE(GPL);
 
 I don't think this is the right approach, mainly for two reasons: the
 compatible shouldn't change, and you're basically duplicating code
 there.
 
 I understand that you need the new compatible in order to avoid a
 double probing: one by CLK_OF_DECLARE, and one by the usual mechanism,
 and that also implies the second reason.

Not only for that, we need a new compatible also because the mfd framework
needs a separate compatible per sub-node as that is how it finds nodes
to attach to the platform devices, so we need a new compatible anyways,
with your make the mod0 clock driver a platform driver solution we could
use:

compatible = allwinner,sun6i-a31-ir-clk, 
allwinner,sun4i-a10-mod0-clk;

To work around this, but there are other problems, your make mod0clk a
platform driver solution cannot work because the clocks node in the dtsi
is not simple-bus compatible, so no platform-devs will be instantiated for
the clocks there.

Besides the compatible (which as said we need a separate one 

[PATCH for v3.18] media: use sg = sg_next(sg) instead of sg++

2014-11-21 Thread Hans Verkuil
Several drivers (mostly copy-and-paste) still used sg++ instead of
sg = sg_next(sg). Fix them since sg++ won't work if contiguous scatter
entries where combined into one larger entry.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
Cc: sta...@vger.kernel.org  # for v3.7 and up
---
 drivers/media/pci/bt8xx/bttv-risc.c  | 12 ++--
 drivers/media/pci/cx23885/cx23885-core.c |  6 +++---
 drivers/media/pci/cx25821/cx25821-core.c | 12 ++--
 drivers/media/pci/cx88/cx88-core.c   |  6 +++---
 drivers/media/pci/ivtv/ivtv-udma.c   |  2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-risc.c 
b/drivers/media/pci/bt8xx/bttv-risc.c
index 82cc47d..4d3f05a 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -84,7 +84,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
continue;
while (offset  offset = sg_dma_len(sg)) {
offset -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
if (bpl = sg_dma_len(sg)-offset) {
/* fits into current chunk */
@@ -100,13 +100,13 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
*risc,
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
-   sg++;
+   sg = sg_next(sg);
while (todo  sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|
sg_dma_len(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
todo -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
todo);
@@ -187,15 +187,15 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem 
*risc,
/* go to next sg entry if needed */
while (yoffset  yoffset = sg_dma_len(ysg)) {
yoffset -= sg_dma_len(ysg);
-   ysg++;
+   ysg = sg_next(ysg);
}
while (uoffset  uoffset = sg_dma_len(usg)) {
uoffset -= sg_dma_len(usg);
-   usg++;
+   usg = sg_next(usg);
}
while (voffset  voffset = sg_dma_len(vsg)) {
voffset -= sg_dma_len(vsg);
-   vsg++;
+   vsg = sg_next(vsg);
}
 
/* calculate max number of bytes we can write */
diff --git a/drivers/media/pci/cx23885/cx23885-core.c 
b/drivers/media/pci/cx23885/cx23885-core.c
index 331edda..3bd386c 100644
--- a/drivers/media/pci/cx23885/cx23885-core.c
+++ b/drivers/media/pci/cx23885/cx23885-core.c
@@ -1078,7 +1078,7 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
scatterlist *sglist,
for (line = 0; line  lines; line++) {
while (offset  offset = sg_dma_len(sg)) {
offset -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
 
if (lpi  line  0  !(line % lpi))
@@ -1101,14 +1101,14 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
scatterlist *sglist,
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
todo -= (sg_dma_len(sg)-offset);
offset = 0;
-   sg++;
+   sg = sg_next(sg);
while (todo  sg_dma_len(sg)) {
*(rp++) = cpu_to_le32(RISC_WRITE|
sg_dma_len(sg));
*(rp++) = cpu_to_le32(sg_dma_address(sg));
*(rp++) = cpu_to_le32(0); /* bits 63-32 */
todo -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
*(rp++) = cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
*(rp++) = cpu_to_le32(sg_dma_address(sg));
diff --git a/drivers/media/pci/cx25821/cx25821-core.c 
b/drivers/media/pci/cx25821/cx25821-core.c
index e81173c..389fffd 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -996,7 +996,7 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct 
scatterlist *sglist,
 

Re: [PATCH 5/9] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i

2014-11-21 Thread Maxime Ripard
On Fri, Nov 21, 2014 at 09:42:09AM +0100, Hans de Goede wrote:
 Hi,
 
 On 11/21/2014 09:26 AM, Maxime Ripard wrote:
  Hi Mauro,
  
  On Thu, Nov 20, 2014 at 02:28:56PM -0200, Mauro Carvalho Chehab wrote:
  Em Thu, 20 Nov 2014 16:55:24 +0100
  Hans de Goede hdego...@redhat.com escreveu:
 
  Add support for the larger fifo found on sun5i and sun6i, having a 
  separate
  compatible for the ir found on sun5i  sun6i also is useful if we ever 
  want
  to add ir transmit support, because the sun5i  sun6i version do not have
  transmit support.
 
  Note this commits also adds checking for the end-of-packet interrupt flag
  (which was already enabled), as the fifo-data-available interrupt flag 
  only
  gets set when the trigger-level is exceeded. So far we've been getting 
  away
  with not doing this because of the low trigger-level, but this is 
  something
  which we should have done since day one.
 
  Signed-off-by: Hans de Goede hdego...@redhat.com
 
  As this is meant to be merged via some other tree:
 
  Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com
  
  I think merging it through your tree would be just fine.
  
  Acked-by: Maxime Ripard maxime.rip...@free-electrons.com
 
 Heh, I was thinking it would be best if it went through Maxime's tree because
 it also has some deps on new clk stuff (well the dts have deps on that), but 
 either
 way works for me.
 
 Maxime if you want this go through Mauro's tree, I can send a pull-req to 
 Mauro
 (I'm a linux-media sub-maintainer), so if that is the case let me know and 
 I'll
 prepare a pull-req (after fixing the missing reset documentation in the 
 bindings).

So much for not reading the cover letter... Sorry.

We're getting quite close to the end of the ARM merge window, and I
got a couple comments, Lee hasn't commented yet, so I'd say it's a bit
too late for this to come in.

If Mauro is happy with the current patches for him, it's completely
fine to merge it through his tree. The DTS can wait.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


Re: [PATCH for v3.18] media: use sg = sg_next(sg) instead of sg++

2014-11-21 Thread Hans Verkuil
Mariusz,

Thanks for reporting and testing this so quickly!

On 11/21/2014 10:20 AM, Hans Verkuil wrote:
 Several drivers (mostly copy-and-paste) still used sg++ instead of
 sg = sg_next(sg). Fix them since sg++ won't work if contiguous scatter
 entries where combined into one larger entry.
 
 Signed-off-by: Hans Verkuil hans.verk...@cisco.com

Reported-by: Mariusz Bialonczyk ma...@skyboo.net
Tested-by: Mariusz Bialonczyk ma...@skyboo.net

Regards,

Hans

 Cc: sta...@vger.kernel.org  # for v3.7 and up
 ---
  drivers/media/pci/bt8xx/bttv-risc.c  | 12 ++--
  drivers/media/pci/cx23885/cx23885-core.c |  6 +++---
  drivers/media/pci/cx25821/cx25821-core.c | 12 ++--
  drivers/media/pci/cx88/cx88-core.c   |  6 +++---
  drivers/media/pci/ivtv/ivtv-udma.c   |  2 +-
  5 files changed, 19 insertions(+), 19 deletions(-)
 
 diff --git a/drivers/media/pci/bt8xx/bttv-risc.c 
 b/drivers/media/pci/bt8xx/bttv-risc.c
 index 82cc47d..4d3f05a 100644
 --- a/drivers/media/pci/bt8xx/bttv-risc.c
 +++ b/drivers/media/pci/bt8xx/bttv-risc.c
 @@ -84,7 +84,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
 *risc,
   continue;
   while (offset  offset = sg_dma_len(sg)) {
   offset -= sg_dma_len(sg);
 - sg++;
 + sg = sg_next(sg);
   }
   if (bpl = sg_dma_len(sg)-offset) {
   /* fits into current chunk */
 @@ -100,13 +100,13 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
 *risc,
   *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
   todo -= (sg_dma_len(sg)-offset);
   offset = 0;
 - sg++;
 + sg = sg_next(sg);
   while (todo  sg_dma_len(sg)) {
   *(rp++)=cpu_to_le32(BT848_RISC_WRITE|
   sg_dma_len(sg));
   *(rp++)=cpu_to_le32(sg_dma_address(sg));
   todo -= sg_dma_len(sg);
 - sg++;
 + sg = sg_next(sg);
   }
   *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
   todo);
 @@ -187,15 +187,15 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem 
 *risc,
   /* go to next sg entry if needed */
   while (yoffset  yoffset = sg_dma_len(ysg)) {
   yoffset -= sg_dma_len(ysg);
 - ysg++;
 + ysg = sg_next(ysg);
   }
   while (uoffset  uoffset = sg_dma_len(usg)) {
   uoffset -= sg_dma_len(usg);
 - usg++;
 + usg = sg_next(usg);
   }
   while (voffset  voffset = sg_dma_len(vsg)) {
   voffset -= sg_dma_len(vsg);
 - vsg++;
 + vsg = sg_next(vsg);
   }
  
   /* calculate max number of bytes we can write */
 diff --git a/drivers/media/pci/cx23885/cx23885-core.c 
 b/drivers/media/pci/cx23885/cx23885-core.c
 index 331edda..3bd386c 100644
 --- a/drivers/media/pci/cx23885/cx23885-core.c
 +++ b/drivers/media/pci/cx23885/cx23885-core.c
 @@ -1078,7 +1078,7 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
 scatterlist *sglist,
   for (line = 0; line  lines; line++) {
   while (offset  offset = sg_dma_len(sg)) {
   offset -= sg_dma_len(sg);
 - sg++;
 + sg = sg_next(sg);
   }
  
   if (lpi  line  0  !(line % lpi))
 @@ -1101,14 +1101,14 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
 scatterlist *sglist,
   *(rp++) = cpu_to_le32(0); /* bits 63-32 */
   todo -= (sg_dma_len(sg)-offset);
   offset = 0;
 - sg++;
 + sg = sg_next(sg);
   while (todo  sg_dma_len(sg)) {
   *(rp++) = cpu_to_le32(RISC_WRITE|
   sg_dma_len(sg));
   *(rp++) = cpu_to_le32(sg_dma_address(sg));
   *(rp++) = cpu_to_le32(0); /* bits 63-32 */
   todo -= sg_dma_len(sg);
 - sg++;
 + sg = sg_next(sg);
   }
   *(rp++) = cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
   *(rp++) = cpu_to_le32(sg_dma_address(sg));
 diff --git a/drivers/media/pci/cx25821/cx25821-core.c 
 b/drivers/media/pci/cx25821/cx25821-core.c
 index 

Re: [PATCH 5/9] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i

2014-11-21 Thread Hans de Goede
Hi,

On 11/21/2014 10:59 AM, Maxime Ripard wrote:
 On Fri, Nov 21, 2014 at 09:42:09AM +0100, Hans de Goede wrote:
 Hi,

 On 11/21/2014 09:26 AM, Maxime Ripard wrote:
 Hi Mauro,

 On Thu, Nov 20, 2014 at 02:28:56PM -0200, Mauro Carvalho Chehab wrote:
 Em Thu, 20 Nov 2014 16:55:24 +0100
 Hans de Goede hdego...@redhat.com escreveu:

 Add support for the larger fifo found on sun5i and sun6i, having a 
 separate
 compatible for the ir found on sun5i  sun6i also is useful if we ever 
 want
 to add ir transmit support, because the sun5i  sun6i version do not have
 transmit support.

 Note this commits also adds checking for the end-of-packet interrupt flag
 (which was already enabled), as the fifo-data-available interrupt flag 
 only
 gets set when the trigger-level is exceeded. So far we've been getting 
 away
 with not doing this because of the low trigger-level, but this is 
 something
 which we should have done since day one.

 Signed-off-by: Hans de Goede hdego...@redhat.com

 As this is meant to be merged via some other tree:

 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com

 I think merging it through your tree would be just fine.

 Acked-by: Maxime Ripard maxime.rip...@free-electrons.com

 Heh, I was thinking it would be best if it went through Maxime's tree because
 it also has some deps on new clk stuff (well the dts have deps on that), but 
 either
 way works for me.

 Maxime if you want this go through Mauro's tree, I can send a pull-req to 
 Mauro
 (I'm a linux-media sub-maintainer), so if that is the case let me know and 
 I'll
 prepare a pull-req (after fixing the missing reset documentation in the 
 bindings).
 
 So much for not reading the cover letter... Sorry.
 
 We're getting quite close to the end of the ARM merge window, and I
 got a couple comments, Lee hasn't commented yet, so I'd say it's a bit
 too late for this to come in.

Oh, but this was not intended for 3.19, this can wait till 3.20 from my pov,
sorry if that was not clear. I was assuming that the merge window was more
or less closed already, so that this going into 3.20 was expected.

Regrrds,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH for v3.18] media: use sg = sg_next(sg) instead of sg++

2014-11-21 Thread Hans Verkuil
On 11/21/2014 11:05 AM, Hans Verkuil wrote:
 Mariusz,
 
 Thanks for reporting and testing this so quickly!
 
 On 11/21/2014 10:20 AM, Hans Verkuil wrote:
 Several drivers (mostly copy-and-paste) still used sg++ instead of
 sg = sg_next(sg). Fix them since sg++ won't work if contiguous scatter
 entries where combined into one larger entry.

I did a bit more research and I found out why this hasn't been a problem
before: the vb1 code will not combine scatterlist entries since it fills
in the entries manually instead of relying on the core code as vb2 does.
So this is a result of switching cx23885 to vb2 after all, although the
driver code really should have been using sg_next regardless.

So I will post only the cx23885 fix to 3.18, the fixes for the other
drivers will be for 3.19 which is crucial for cx88 since that is moved
to vb2 in 3.19 as well, so it will result in a similar bug.

Regards,

Hans


 Signed-off-by: Hans Verkuil hans.verk...@cisco.com
 
 Reported-by: Mariusz Bialonczyk ma...@skyboo.net
 Tested-by: Mariusz Bialonczyk ma...@skyboo.net
 
 Regards,
 
   Hans
 
 Cc: sta...@vger.kernel.org  # for v3.7 and up
 ---
  drivers/media/pci/bt8xx/bttv-risc.c  | 12 ++--
  drivers/media/pci/cx23885/cx23885-core.c |  6 +++---
  drivers/media/pci/cx25821/cx25821-core.c | 12 ++--
  drivers/media/pci/cx88/cx88-core.c   |  6 +++---
  drivers/media/pci/ivtv/ivtv-udma.c   |  2 +-
  5 files changed, 19 insertions(+), 19 deletions(-)

 diff --git a/drivers/media/pci/bt8xx/bttv-risc.c 
 b/drivers/media/pci/bt8xx/bttv-risc.c
 index 82cc47d..4d3f05a 100644
 --- a/drivers/media/pci/bt8xx/bttv-risc.c
 +++ b/drivers/media/pci/bt8xx/bttv-risc.c
 @@ -84,7 +84,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
 *risc,
  continue;
  while (offset  offset = sg_dma_len(sg)) {
  offset -= sg_dma_len(sg);
 -sg++;
 +sg = sg_next(sg);
  }
  if (bpl = sg_dma_len(sg)-offset) {
  /* fits into current chunk */
 @@ -100,13 +100,13 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
 *risc,
  *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
  todo -= (sg_dma_len(sg)-offset);
  offset = 0;
 -sg++;
 +sg = sg_next(sg);
  while (todo  sg_dma_len(sg)) {
  *(rp++)=cpu_to_le32(BT848_RISC_WRITE|
  sg_dma_len(sg));
  *(rp++)=cpu_to_le32(sg_dma_address(sg));
  todo -= sg_dma_len(sg);
 -sg++;
 +sg = sg_next(sg);
  }
  *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
  todo);
 @@ -187,15 +187,15 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem 
 *risc,
  /* go to next sg entry if needed */
  while (yoffset  yoffset = sg_dma_len(ysg)) {
  yoffset -= sg_dma_len(ysg);
 -ysg++;
 +ysg = sg_next(ysg);
  }
  while (uoffset  uoffset = sg_dma_len(usg)) {
  uoffset -= sg_dma_len(usg);
 -usg++;
 +usg = sg_next(usg);
  }
  while (voffset  voffset = sg_dma_len(vsg)) {
  voffset -= sg_dma_len(vsg);
 -vsg++;
 +vsg = sg_next(vsg);
  }
  
  /* calculate max number of bytes we can write */
 diff --git a/drivers/media/pci/cx23885/cx23885-core.c 
 b/drivers/media/pci/cx23885/cx23885-core.c
 index 331edda..3bd386c 100644
 --- a/drivers/media/pci/cx23885/cx23885-core.c
 +++ b/drivers/media/pci/cx23885/cx23885-core.c
 @@ -1078,7 +1078,7 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
 scatterlist *sglist,
  for (line = 0; line  lines; line++) {
  while (offset  offset = sg_dma_len(sg)) {
  offset -= sg_dma_len(sg);
 -sg++;
 +sg = sg_next(sg);
  }
  
  if (lpi  line  0  !(line % lpi))
 @@ -1101,14 +1101,14 @@ static __le32 *cx23885_risc_field(__le32 *rp, struct 
 scatterlist *sglist,
  *(rp++) = cpu_to_le32(0); /* bits 63-32 */
  todo -= (sg_dma_len(sg)-offset);
  offset = 0;
 -sg++;
 +sg = sg_next(sg);
  while (todo  sg_dma_len(sg)) {
  *(rp++) = cpu_to_le32(RISC_WRITE|
  

[GIT FIXES FOR v3.18] Various fixes for 3.18

2014-11-21 Thread Hans Verkuil
Hi Mauro,

Here are three fixes and one MAINTAINERS update that should go to 3.18.

Regards,

Hans

The following changes since commit c02ef64aab828d80040b5dce934729312e698c33:

  [media] cx23885: add DVBSky T982(Dual DVB-T2/T/C) support (2014-11-14 
18:28:41 -0200)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v3.18g

for you to fetch changes up to ddc5bee72f9707a8729d214156d7e4e09eecbd3a:

  cx23885: use sg = sg_next(sg) instead of sg++ (2014-11-21 11:43:19 +0100)


Andrey Utkin (1):
  Update MAINTAINERS for solo6x10

Hans Verkuil (1):
  cx23885: use sg = sg_next(sg) instead of sg++

Krzysztof Hałasa (1):
  solo6x10: fix a race in IRQ handler.

sensoray-dev (1):
  s2255drv: fix payload size for JPG, MJPEG

 MAINTAINERS|  4 +++-
 drivers/media/pci/cx23885/cx23885-core.c   |  6 +++---
 drivers/media/pci/solo6x10/solo6x10-core.c | 10 ++
 drivers/media/usb/s2255/s2255drv.c |  2 +-
 4 files changed, 9 insertions(+), 13 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] bttv/cx25821/cx88/ivtv: use sg_next instead of sg++

2014-11-21 Thread Hans Verkuil
Never use sg++, always use sg = sg_next(sg). Scatterlist entries can
be combined if the memory is contiguous but sg++ won't know about that.

As far as I can tell cx88 and ivtv are really broken because of this,
and bttv and cx25821 are OK because vb1 doesn't combine scatterlist
entries.

But regardless, sg++ should never be used, only sg_next is safe.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
---
 drivers/media/pci/bt8xx/bttv-risc.c  | 12 ++--
 drivers/media/pci/cx25821/cx25821-core.c | 12 ++--
 drivers/media/pci/cx88/cx88-core.c   |  6 +++---
 drivers/media/pci/ivtv/ivtv-udma.c   |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bttv-risc.c 
b/drivers/media/pci/bt8xx/bttv-risc.c
index 82cc47d..4d3f05a 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -84,7 +84,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
continue;
while (offset  offset = sg_dma_len(sg)) {
offset -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
if (bpl = sg_dma_len(sg)-offset) {
/* fits into current chunk */
@@ -100,13 +100,13 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem 
*risc,
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
-   sg++;
+   sg = sg_next(sg);
while (todo  sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|
sg_dma_len(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
todo -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
todo);
@@ -187,15 +187,15 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem 
*risc,
/* go to next sg entry if needed */
while (yoffset  yoffset = sg_dma_len(ysg)) {
yoffset -= sg_dma_len(ysg);
-   ysg++;
+   ysg = sg_next(ysg);
}
while (uoffset  uoffset = sg_dma_len(usg)) {
uoffset -= sg_dma_len(usg);
-   usg++;
+   usg = sg_next(usg);
}
while (voffset  voffset = sg_dma_len(vsg)) {
voffset -= sg_dma_len(vsg);
-   vsg++;
+   vsg = sg_next(vsg);
}
 
/* calculate max number of bytes we can write */
diff --git a/drivers/media/pci/cx25821/cx25821-core.c 
b/drivers/media/pci/cx25821/cx25821-core.c
index e81173c..389fffd 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -996,7 +996,7 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct 
scatterlist *sglist,
for (line = 0; line  lines; line++) {
while (offset  offset = sg_dma_len(sg)) {
offset -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
if (bpl = sg_dma_len(sg) - offset) {
/* fits into current chunk */
@@ -1014,14 +1014,14 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct 
scatterlist *sglist,
*(rp++) = cpu_to_le32(0);   /* bits 63-32 */
todo -= (sg_dma_len(sg) - offset);
offset = 0;
-   sg++;
+   sg = sg_next(sg);
while (todo  sg_dma_len(sg)) {
*(rp++) = cpu_to_le32(RISC_WRITE |
sg_dma_len(sg));
*(rp++) = cpu_to_le32(sg_dma_address(sg));
*(rp++) = cpu_to_le32(0);   /* bits 63-32 */
todo -= sg_dma_len(sg);
-   sg++;
+   sg = sg_next(sg);
}
*(rp++) = cpu_to_le32(RISC_WRITE | RISC_EOL | todo);
*(rp++) = cpu_to_le32(sg_dma_address(sg));
@@ -1101,7 +1101,7 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, 
struct scatterlist *sglist,
for (line = 0; line  lines; line++) {
while (offset  

Re: [PATCH 1/9] clk: sunxi: Give sunxi_factors_register a registers parameter

2014-11-21 Thread Maxime Ripard
On Fri, Nov 21, 2014 at 09:44:51AM +0100, Hans de Goede wrote:
 Hi,
 
 On 11/21/2014 09:35 AM, Maxime Ripard wrote:
  Hi Hans,
  
  On Thu, Nov 20, 2014 at 04:55:20PM +0100, Hans de Goede wrote:
  Before this commit sunxi_factors_register uses of_iomap(node, 0) to get
  the clk registers. The sun6i prcm has factor clocks, for which we want to
  use sunxi_factors_register, but of_iomap(node, 0) does not work for the 
  prcm
  factor clocks, because the prcm uses the mfd framework, so the registers
  are not part of the dt-node, instead they are added to the platform_device,
  as platform_device resources.
 
  This commit makes getting the registers the callers duty, so that
  sunxi_factors_register can be used with mfd instantiated platform device 
  too.
 
  Signed-off-by: Hans de Goede hdego...@redhat.com
  
  Funny, I was thinking of doing exactly the same thing for MMC clocks :)
  
  ---
   drivers/clk/sunxi/clk-factors.c| 10 --
   drivers/clk/sunxi/clk-factors.h|  7 ---
   drivers/clk/sunxi/clk-mod0.c   |  6 --
   drivers/clk/sunxi/clk-sun8i-mbus.c |  2 +-
   drivers/clk/sunxi/clk-sunxi.c  |  3 ++-
   5 files changed, 15 insertions(+), 13 deletions(-)
 
  diff --git a/drivers/clk/sunxi/clk-factors.c 
  b/drivers/clk/sunxi/clk-factors.c
  index f83ba09..fc4f4b5 100644
  --- a/drivers/clk/sunxi/clk-factors.c
  +++ b/drivers/clk/sunxi/clk-factors.c
  @@ -156,9 +156,10 @@ static const struct clk_ops clk_factors_ops = {
 .set_rate = clk_factors_set_rate,
   };
   
  -struct clk * __init sunxi_factors_register(struct device_node *node,
  - const struct factors_data *data,
  - spinlock_t *lock)
  +struct clk *sunxi_factors_register(struct device_node *node,
  + const struct factors_data *data,
  + spinlock_t *lock,
  + void __iomem *reg)
   {
 struct clk *clk;
 struct clk_factors *factors;
  @@ -168,11 +169,8 @@ struct clk * __init sunxi_factors_register(struct 
  device_node *node,
 struct clk_hw *mux_hw = NULL;
 const char *clk_name = node-name;
 const char *parents[FACTORS_MAX_PARENTS];
  -  void __iomem *reg;
 int i = 0;
   
  -  reg = of_iomap(node, 0);
  -
 /* if we have a mux, we will have 1 parents */
 while (i  FACTORS_MAX_PARENTS 
(parents[i] = of_clk_get_parent_name(node, i)) != NULL)
  diff --git a/drivers/clk/sunxi/clk-factors.h 
  b/drivers/clk/sunxi/clk-factors.h
  index 9913840..1f5526d 100644
  --- a/drivers/clk/sunxi/clk-factors.h
  +++ b/drivers/clk/sunxi/clk-factors.h
  @@ -37,8 +37,9 @@ struct clk_factors {
 spinlock_t *lock;
   };
   
  -struct clk * __init sunxi_factors_register(struct device_node *node,
  - const struct factors_data *data,
  - spinlock_t *lock);
  +struct clk *sunxi_factors_register(struct device_node *node,
  + const struct factors_data *data,
  + spinlock_t *lock,
  + void __iomem *reg);
  
  Why are you dropping the __init there?
 
 Because it is going to be used from mfd instantiation, so from a platform_dev
 probe function which is not __init.

Ah right. Mentionning it in the commit log would be nice.

 
  
   
   #endif
  diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
  index 4a56385..9530833 100644
  --- a/drivers/clk/sunxi/clk-mod0.c
  +++ b/drivers/clk/sunxi/clk-mod0.c
  @@ -78,7 +78,8 @@ static DEFINE_SPINLOCK(sun4i_a10_mod0_lock);
   
   static void __init sun4i_a10_mod0_setup(struct device_node *node)
   {
  -  sunxi_factors_register(node, sun4i_a10_mod0_data, 
  sun4i_a10_mod0_lock);
  +  sunxi_factors_register(node, sun4i_a10_mod0_data,
  + sun4i_a10_mod0_lock, of_iomap(node, 0));
  
  As of_iomap can fail, I'd rather check the returned value before
  calling sunxi_factors_register.
  
  I know it wasn't done before, but it's the right thing to do, as it
  would lead to an instant crash if that fails.
 
 Ok, I'll wait for you to review the rest of the series and then do a v2 of the
 patch-set with this fixed (as time permits).

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


signature.asc
Description: Digital signature


[PATCH] Staging: media: lirc: lirc_serial: replaced printk with pr_debug

2014-11-21 Thread Abel Moyo
Replaced printk with pr_debug in dprintk

Signed-off-by: Abel Moyo abelmoyo...@gmail.com
---
 drivers/staging/media/lirc/lirc_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_serial.c 
b/drivers/staging/media/lirc/lirc_serial.c
index 181b92b..86c5274 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -116,7 +116,7 @@ static bool txsense;/* 0 = active high, 1 = active 
low */
 #define dprintk(fmt, args...)  \
do {\
if (debug)  \
-   printk(KERN_DEBUG LIRC_DRIVER_NAME :  \
+   pr_debug(LIRC_DRIVER_NAME :   \
   fmt, ## args);   \
} while (0)
 
-- 
1.8.5.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


terratec HTC XS HD USB

2014-11-21 Thread Robert N
Hi,

I'm trying to get my USB tuner stick working on an openwrt, but
getting some errors.

using w_scan to scan the available channels, gives:

113000: sr6900 (time: 00:11) (time: 00:12) signal ok:
QAM_64   f = 113000 kHz S6900C999
start_filter:1410: ERROR: ioctl DMX_SET_FILTER failed: 97 Message too long
Info: NIT(actual) filter timeout

I know the 113Mhz is a valid MUX, because tuner works well under windows.

Any hints what could be the reason of the error messages?

Thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH/RFC v4 00/11] Add a plugin for Exynos4 camera

2014-11-21 Thread Jacek Anaszewski
This is a fourth version of the patch series adding a plugin for the 
Exynos4 camera.

Temporarily the plugin doesn't link against libmediactl, but
has its sources compiled in. Currently libmediactl is built
after the plugins and it can't be easily changed because
it depends on the core libs.


Changes from v3:


- added struct v4l2_subdev and put entity fd and 
  information about supported controls to it
- improved functions for negotiating and setting
  pipeline format by using available libv4lsubdev API
- applied minor improvements and cleanups


Changes from v2:


- switched to using mediatext library for parsing
  the media device configuration
- extended libmediactl
- switched to using libmediactl


Changes from v1:


- removed redundant mbus code negotiation
- split the parser, media device helpers and ioctl wrappers
  to the separate modules
- added mechanism for querying extended controls
- applied various fixes and modifications

The plugin was tested on latest media-tree.git master with patches for
exynos4-is that fix failing open ioctl when a sensor sub-device is not
linked [1] [2] [3].

The plugin expects a configuration file:
/var/lib/libv4l/exynos4_capture_conf

Exemplary configuration file:

==

link-conf s5p-mipi-csis.0:1 - FIMC.0:0 [1]
ctrl-to-subdev-conf 0x0098091f - fimc.0.capture
ctrl-to-subdev-conf 0x00980902 - S5C73M3
ctrl-to-subdev-conf 0x00980922 - fimc.0.capture
ctrl-to-subdev-conf 0x009a0914 - S5C73M3

==

With this settings the plugin can be tested on the exynos4412-trats2 board
using following gstreamer pipeline:

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=960,height=720 ! 
fbdevsink

In order to avoid fbdevsink element failure the fix [4]
for exynos-drm driver is required.

Thanks,
Jacek Anaszewski

[1] https://patchwork.linuxtv.org/patch/26366/
[2] https://patchwork.linuxtv.org/patch/26367/
[3] https://patchwork.linuxtv.org/patch/26368/
[4] http://www.spinics.net/lists/dri-devel/msg66494.html

Jacek Anaszewski (11):
  mediactl: Introduce v4l2_subdev structure
  mediactl: Add support for v4l2 controls
  mediactl: Separate entity and pad parsing
  mediatext: Add library
  mediactl: Add media device graph helpers
  mediactl: Add media_device creation helpers
  media-ctl: libv4l2subdev: add VYUY8_2X8 mbus code
  mediactl: Add support for media device pipelines
  mediactl: Close only pipeline sub-devices
  mediactl: Add media device ioctl API
  Add a libv4l plugin for Exynos4 camera

 configure.ac  |1 +
 lib/Makefile.am   |7 +-
 lib/libv4l-exynos4-camera/Makefile.am |7 +
 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c |  595 +
 utils/media-ctl/Makefile.am   |   12 +-
 utils/media-ctl/libmediactl.c |  486 -
 utils/media-ctl/libmediatext.pc.in|   10 +
 utils/media-ctl/libv4l2media_ioctl.c  |  325 +++
 utils/media-ctl/libv4l2media_ioctl.h  |   40 ++
 utils/media-ctl/libv4l2subdev.c   |  204 ++-
 utils/media-ctl/mediactl-priv.h   |   15 +
 utils/media-ctl/mediactl.h|  256 +
 utils/media-ctl/mediatext-test.c  |   66 +++
 utils/media-ctl/mediatext.c   |  286 ++
 utils/media-ctl/mediatext.h   |   52 ++
 utils/media-ctl/v4l2subdev.h  |   70 +++
 16 files changed, 2401 insertions(+), 31 deletions(-)
 create mode 100644 lib/libv4l-exynos4-camera/Makefile.am
 create mode 100644 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
 create mode 100644 utils/media-ctl/libmediatext.pc.in
 create mode 100644 utils/media-ctl/libv4l2media_ioctl.c
 create mode 100644 utils/media-ctl/libv4l2media_ioctl.h
 create mode 100644 utils/media-ctl/mediatext-test.c
 create mode 100644 utils/media-ctl/mediatext.c
 create mode 100644 utils/media-ctl/mediatext.h

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH/RFC v4 01/11] mediactl: Introduce v4l2_subdev structure

2014-11-21 Thread Jacek Anaszewski
Add struct v4l2_subdev as a representation of the v4l2 sub-device
related to a media entity. Add sd property, the pointer to
the newly introduced structure, to the struct media_entity
and move fd property to it.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c   |   30 +-
 utils/media-ctl/libv4l2subdev.c |   34 +-
 utils/media-ctl/mediactl-priv.h |5 +
 utils/media-ctl/mediactl.h  |   22 ++
 4 files changed, 69 insertions(+), 22 deletions(-)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index ec360bd..53921f5 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -511,7 +511,6 @@ static int media_enum_entities(struct media_device *media)
 
entity = media-entities[media-entities_count];
memset(entity, 0, sizeof(*entity));
-   entity-fd = -1;
entity-info.id = id | MEDIA_ENT_ID_FLAG_NEXT;
entity-media = media;
 
@@ -529,11 +528,13 @@ static int media_enum_entities(struct media_device *media)
 
entity-pads = malloc(entity-info.pads * 
sizeof(*entity-pads));
entity-links = malloc(entity-max_links * 
sizeof(*entity-links));
-   if (entity-pads == NULL || entity-links == NULL) {
+   entity-sd = calloc(1, sizeof(*entity-sd));
+   if (entity-pads == NULL || entity-links == NULL || entity-sd 
== NULL) {
ret = -ENOMEM;
break;
}
 
+   entity-sd-fd = -1;
media-entities_count++;
 
if (entity-info.flags  MEDIA_ENT_FL_DEFAULT) {
@@ -704,8 +705,9 @@ void media_device_unref(struct media_device *media)
 
free(entity-pads);
free(entity-links);
-   if (entity-fd != -1)
-   close(entity-fd);
+   if (entity-sd-fd != -1)
+   close(entity-sd-fd);
+   free(entity-sd);
}
 
free(media-entities);
@@ -726,13 +728,17 @@ int media_device_add_entity(struct media_device *media,
if (entity == NULL)
return -ENOMEM;
 
+   entity-sd = calloc(1, sizeof(*entity-sd));
+   if (entity-sd == NULL)
+   return -ENOMEM;
+
media-entities = entity;
media-entities_count++;
 
entity = media-entities[media-entities_count - 1];
memset(entity, 0, sizeof *entity);
 
-   entity-fd = -1;
+   entity-sd-fd = -1;
entity-media = media;
strncpy(entity-devname, devnode, sizeof entity-devname);
entity-devname[sizeof entity-devname - 1] = '\0';
@@ -955,3 +961,17 @@ int media_parse_setup_links(struct media_device *media, 
const char *p)
 
return *end ? -EINVAL : 0;
 }
+
+/* 
-
+ * Media entity access
+ */
+
+int media_entity_get_fd(struct media_entity *entity)
+{
+   return entity-sd-fd;
+}
+
+void media_entity_set_fd(struct media_entity *entity, int fd)
+{
+   entity-sd-fd = fd;
+}
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 8015330..09e0081 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -41,11 +41,11 @@
 
 int v4l2_subdev_open(struct media_entity *entity)
 {
-   if (entity-fd != -1)
+   if (entity-sd-fd != -1)
return 0;
 
-   entity-fd = open(entity-devname, O_RDWR);
-   if (entity-fd == -1) {
+   entity-sd-fd = open(entity-devname, O_RDWR);
+   if (entity-sd-fd == -1) {
int ret = -errno;
media_dbg(entity-media,
  %s: Failed to open subdev device node %s\n, 
__func__,
@@ -58,8 +58,8 @@ int v4l2_subdev_open(struct media_entity *entity)
 
 void v4l2_subdev_close(struct media_entity *entity)
 {
-   close(entity-fd);
-   entity-fd = -1;
+   close(entity-sd-fd);
+   entity-sd-fd = -1;
 }
 
 int v4l2_subdev_get_format(struct media_entity *entity,
@@ -77,7 +77,7 @@ int v4l2_subdev_get_format(struct media_entity *entity,
fmt.pad = pad;
fmt.which = which;
 
-   ret = ioctl(entity-fd, VIDIOC_SUBDEV_G_FMT, fmt);
+   ret = ioctl(entity-sd-fd, VIDIOC_SUBDEV_G_FMT, fmt);
if (ret  0)
return -errno;
 
@@ -101,7 +101,7 @@ int v4l2_subdev_set_format(struct media_entity *entity,
fmt.which = which;
fmt.format = *format;
 
-   ret = ioctl(entity-fd, VIDIOC_SUBDEV_S_FMT, fmt);
+   ret = ioctl(entity-sd-fd, VIDIOC_SUBDEV_S_FMT, fmt);
if (ret  0)
return -errno;
 
@@ -128,7 +128,7 @@ int v4l2_subdev_get_selection(struct media_entity *entity,
u.sel.target = target;
u.sel.which = which;
 
- 

[PATCH/RFC v4 03/11] mediactl: Separate entity and pad parsing

2014-11-21 Thread Jacek Anaszewski
Sometimes it's useful to be able to parse the entity independent of the pad.
Separate entity parsing into media_parse_entity().

Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com
---
 utils/media-ctl/libmediactl.c |   28 
 utils/media-ctl/mediactl.h|   14 ++
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index 4c4ddbe..af7dd43 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -787,10 +787,10 @@ int media_device_add_entity(struct media_device *media,
return 0;
 }
 
-struct media_pad *media_parse_pad(struct media_device *media,
- const char *p, char **endp)
+struct media_entity *media_parse_entity(struct media_device *media,
+   const char *p, char **endp)
 {
-   unsigned int entity_id, pad;
+   unsigned int entity_id;
struct media_entity *entity;
char *end;
 
@@ -827,7 +827,27 @@ struct media_pad *media_parse_pad(struct media_device 
*media,
return NULL;
}
}
-   for (; isspace(*end); ++end);
+   for (p = end; isspace(*p); ++p);
+
+   *endp = (char *)p;
+
+   return entity;
+}
+
+struct media_pad *media_parse_pad(struct media_device *media,
+ const char *p, char **endp)
+{
+   unsigned int pad;
+   struct media_entity *entity;
+   char *end;
+
+   if (endp == NULL)
+   endp = end;
+
+   entity = media_parse_entity(media, p, end);
+   if (!entity)
+   return NULL;
+   *endp = end;
 
if (*end != ':') {
media_dbg(media, Expected ':'\n, *end);
diff --git a/utils/media-ctl/mediactl.h b/utils/media-ctl/mediactl.h
index b8cefe8..7309b16 100644
--- a/utils/media-ctl/mediactl.h
+++ b/utils/media-ctl/mediactl.h
@@ -368,6 +368,20 @@ int media_setup_link(struct media_device *media,
 int media_reset_links(struct media_device *media);
 
 /**
+ * @brief Parse string to an entity on the media device.
+ * @param media - media device.
+ * @param p - input string
+ * @param endp - pointer to string where parsing ended
+ *
+ * Parse NULL terminated string describing an entity and return its
+ * struct media_entity instance.
+ *
+ * @return Pointer to struct media_entity on success, NULL on failure.
+ */
+struct media_entity *media_parse_entity(struct media_device *media,
+   const char *p, char **endp);
+
+/**
  * @brief Parse string to a pad on the media device.
  * @param media - media device.
  * @param p - input string
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH/RFC v4 05/11] mediactl: Add media device graph helpers

2014-11-21 Thread Jacek Anaszewski
Add new graph helpers useful for video pipeline discovering.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c |  174 +
 utils/media-ctl/mediactl.h|  121 
 2 files changed, 295 insertions(+)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index af7dd43..a476601 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -35,6 +35,7 @@
 #include unistd.h
 
 #include linux/media.h
+#include linux/kdev_t.h
 #include linux/videodev2.h
 
 #include mediactl.h
@@ -87,6 +88,28 @@ struct media_entity *media_get_entity_by_name(struct 
media_device *media,
return NULL;
 }
 
+struct media_entity *media_get_entity_by_devname(struct media_device *media,
+ const char *devname, size_t 
length)
+{
+   unsigned int i;
+
+   /* A match is impossible if the entity devname is longer than the 
maximum
+* size we can get from the kernel.
+*/
+   if (length = FIELD_SIZEOF(struct media_entity, devname))
+   return NULL;
+
+   for (i = 0; i  media-entities_count; ++i) {
+   struct media_entity *entity = media-entities[i];
+
+   if (strncmp(entity-devname, devname, length) == 0 
+   entity-devname[length] == '\0')
+   return entity;
+   }
+
+   return NULL;
+}
+
 struct media_entity *media_get_entity_by_id(struct media_device *media,
__u32 id)
 {
@@ -145,6 +168,11 @@ const char *media_entity_get_devname(struct media_entity 
*entity)
return entity-devname[0] ? entity-devname : NULL;
 }
 
+const char *media_entity_get_name(struct media_entity *entity)
+{
+   return entity-info.name ? entity-info.name : NULL;
+}
+
 struct media_entity *media_get_default_entity(struct media_device *media,
  unsigned int type)
 {
@@ -177,6 +205,152 @@ const struct media_entity_desc 
*media_entity_get_info(struct media_entity *entit
return entity-info;
 }
 
+int media_get_link_by_sink_pad(struct media_device *media,
+   struct media_pad *pad,
+   struct media_link **link)
+{
+   struct media_link *cur_link = NULL;
+   int i, j;
+
+   if (pad == NULL || link == NULL)
+   return -EINVAL;
+
+   for (i = 0; i  media-entities_count; ++i) {
+   for (j = 0; j  media-entities[i].num_links; ++j) {
+   cur_link = media-entities[i].links[j];
+   if ((cur_link-flags  MEDIA_LNK_FL_ENABLED) 
+   /* check if cur_link's sink entity matches the pad 
parent entity */
+   (cur_link-sink-entity-info.id == 
pad-entity-info.id) 
+   /* check if cur_link's sink pad id matches */
+   (cur_link-sink-index == pad-index)) {
+   *link = cur_link;
+   return 0;
+   }
+   }
+   }
+
+   return -EINVAL;
+}
+
+int media_get_link_by_source_pad(struct media_entity *entity,
+   struct media_pad *pad,
+   struct media_link **link)
+{
+   int i;
+
+   if (entity == NULL || pad == NULL || link == NULL)
+   return -EINVAL;
+
+   for (i = 0; i  entity-num_links; ++i) {
+   if ((entity-links[i].flags  MEDIA_LNK_FL_ENABLED) 
+   (entity-links[i].source-index == pad-index)) {
+   *link = entity-links[i];
+   return 0;
+   }
+   }
+
+   return -EINVAL;
+}
+
+int media_get_pads_by_entity(struct media_entity *entity, unsigned int type,
+   struct media_pad **pads, int *num_pads)
+{
+   struct media_pad *entity_pads;
+   int cnt_pads, i;
+
+   if (entity == NULL || pads == NULL || num_pads == NULL)
+   return -EINVAL;
+
+   entity_pads = malloc(sizeof(*entity_pads));
+   cnt_pads = 0;
+
+   for (i = 0; i  entity-info.pads; ++i) {
+   if (entity-pads[i].flags  type) {
+   entity_pads = realloc(entity_pads, (i + 1) *
+ sizeof(*entity_pads));
+   entity_pads[cnt_pads++] = entity-pads[i];
+   }
+   }
+
+   if (cnt_pads == 0)
+   free(entity_pads);
+
+   *pads = entity_pads;
+   *num_pads = cnt_pads;
+
+   return 0;
+}
+
+int media_get_busy_pads_by_entity(struct media_device *media,
+   struct media_entity *entity,
+   unsigned int type,
+   struct media_pad 

[PATCH/RFC v4 02/11] mediactl: Add support for v4l2 controls

2014-11-21 Thread Jacek Anaszewski
Make struct v4l2_subdev capable of aggregating information
on its validated v4l2 controls. A control needs to be validated
for a v4l2_subdev in case it is mentioned in the media
configuraion file. Added are also functions for validating
controls and finding validated controls.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c   |   11 +++
 utils/media-ctl/libv4l2subdev.c |   60 ++-
 utils/media-ctl/mediactl-priv.h |3 ++
 utils/media-ctl/v4l2subdev.h|   28 ++
 4 files changed, 101 insertions(+), 1 deletion(-)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index 53921f5..4c4ddbe 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -537,6 +537,12 @@ static int media_enum_entities(struct media_device *media)
entity-sd-fd = -1;
media-entities_count++;
 
+   entity-sd-v4l2_controls = malloc(sizeof(__u32));
+   if (entity-sd-v4l2_controls == NULL) {
+   ret = -ENOMEM;
+   break;
+   }
+
if (entity-info.flags  MEDIA_ENT_FL_DEFAULT) {
switch (entity-info.type) {
case MEDIA_ENT_T_DEVNODE_V4L:
@@ -707,6 +713,7 @@ void media_device_unref(struct media_device *media)
free(entity-links);
if (entity-sd-fd != -1)
close(entity-sd-fd);
+   free(entity-sd-v4l2_controls);
free(entity-sd);
}
 
@@ -732,6 +739,10 @@ int media_device_add_entity(struct media_device *media,
if (entity-sd == NULL)
return -ENOMEM;
 
+   entity-sd-v4l2_controls = malloc(sizeof(__u32));
+   if (entity-sd-v4l2_controls == NULL)
+   return -ENOMEM;
+
media-entities = entity;
media-entities_count++;
 
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 09e0081..4c5fb12 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -26,7 +26,6 @@
 #include ctype.h
 #include errno.h
 #include fcntl.h
-#include stdbool.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -755,3 +754,62 @@ enum v4l2_mbus_pixelcode 
v4l2_subdev_string_to_pixelcode(const char *string,
 
return mbus_formats[i].code;
 }
+
+int v4l2_subdev_validate_v4l2_ctrl(struct media_device *media,
+  struct media_entity *entity,
+  __u32 ctrl_id)
+{
+   struct v4l2_query_ext_ctrl queryctrl;
+   int ret;
+
+   if (v4l2_subdev_has_v4l2_control(media, entity, ctrl_id))
+   goto done;
+
+   ret = v4l2_subdev_open(entity);
+   if (ret  0)
+   return ret;
+
+   /* Iterate through control ids */
+
+   queryctrl.id = ctrl_id;
+
+   ret = ioctl(entity-sd-fd, VIDIOC_QUERY_EXT_CTRL, queryctrl);
+   if (ret  0) {
+   media_dbg(media, Control (0x%8.8x) not supported on entity 
%s\n,
+ queryctrl.name,
+ ctrl_id,
+ entity-info.name);
+   return ret;
+   }
+
+   entity-sd-v4l2_controls = realloc(entity-sd-v4l2_controls,
+   sizeof(*entity-sd-v4l2_controls) *
+   (entity-sd-v4l2_controls_count + 
1));
+   if (!entity-sd-v4l2_controls)
+   return -ENOMEM;
+
+   entity-sd-v4l2_controls[entity-sd-v4l2_controls_count] = ctrl_id;
+   ++entity-sd-v4l2_controls_count;
+
+done:
+   media_dbg(media, Validated control \%s\ (0x%8.8x) on entity %s\n,
+ queryctrl.name,
+ ctrl_id,
+ entity-info.name);
+
+   return 0;
+}
+
+bool v4l2_subdev_has_v4l2_control(struct media_device *media,
+ struct media_entity *entity,
+ int ctrl_id)
+{
+   struct v4l2_subdev *sd = entity-sd;
+   int i;
+
+   for (i = 0; i  sd-v4l2_controls_count; ++i)
+   if (sd-v4l2_controls[i] == ctrl_id)
+   return true;
+
+   return false;
+}
diff --git a/utils/media-ctl/mediactl-priv.h b/utils/media-ctl/mediactl-priv.h
index 4bcb1e0..fbf1989 100644
--- a/utils/media-ctl/mediactl-priv.h
+++ b/utils/media-ctl/mediactl-priv.h
@@ -41,6 +41,9 @@ struct media_entity {
 
 struct v4l2_subdev {
int fd;
+
+   __u32 *v4l2_controls;
+   unsigned int v4l2_controls_count;
 };
 
 struct media_device {
diff --git a/utils/media-ctl/v4l2subdev.h b/utils/media-ctl/v4l2subdev.h
index 1cb53ff..ac98b61 100644
--- a/utils/media-ctl/v4l2subdev.h
+++ b/utils/media-ctl/v4l2subdev.h
@@ -22,6 +22,7 @@
 #ifndef __SUBDEV_H__
 #define __SUBDEV_H__
 
+#include stdbool.h
 #include 

[PATCH/RFC v4 04/11] mediatext: Add library

2014-11-21 Thread Jacek Anaszewski
libmediatext is a helper library for converting configurations (Media
controller links, V4L2 controls and V4L2 sub-device media bus formats and
selections) from text-based form into IOCTLs.

libmediatext depends on libv4l2subdev and libmediactl.

Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com
Signed-off-by: Teemu Tuominen teemu.tuomi...@intel.com
Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
---
 utils/media-ctl/Makefile.am|   10 +-
 utils/media-ctl/libmediatext.pc.in |   10 ++
 utils/media-ctl/mediatext-test.c   |   66 +
 utils/media-ctl/mediatext.c|  286 
 utils/media-ctl/mediatext.h|   52 +++
 5 files changed, 422 insertions(+), 2 deletions(-)
 create mode 100644 utils/media-ctl/libmediatext.pc.in
 create mode 100644 utils/media-ctl/mediatext-test.c
 create mode 100644 utils/media-ctl/mediatext.c
 create mode 100644 utils/media-ctl/mediatext.h

diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
index a3931fb..3e883e0 100644
--- a/utils/media-ctl/Makefile.am
+++ b/utils/media-ctl/Makefile.am
@@ -1,4 +1,4 @@
-noinst_LTLIBRARIES = libmediactl.la libv4l2subdev.la
+noinst_LTLIBRARIES = libmediactl.la libv4l2subdev.la libmediatext.la
 
 libmediactl_la_SOURCES = libmediactl.c mediactl-priv.h
 libmediactl_la_CFLAGS = -static $(LIBUDEV_CFLAGS)
@@ -9,9 +9,15 @@ libv4l2subdev_la_LIBADD = libmediactl.la
 libv4l2subdev_la_CFLAGS = -static
 libv4l2subdev_la_LDFLAGS = -static
 
+libmediatext_la_SOURCES = mediatext.c
+libmediatext_la_CFLAGS = -static $(LIBUDEV_CFLAGS)
+libmediatext_la_LDFLAGS = -static $(LIBUDEV_LIBS)
+
 mediactl_includedir=$(includedir)/mediactl
 noinst_HEADERS = mediactl.h v4l2subdev.h
 
-bin_PROGRAMS = media-ctl
+bin_PROGRAMS = media-ctl mediatext-test
 media_ctl_SOURCES = media-ctl.c options.c options.h tools.h
 media_ctl_LDADD = libmediactl.la libv4l2subdev.la
+mediatext_test_SOURCES = mediatext-test.c
+mediatext_test_LDADD = libmediatext.la libmediactl.la libv4l2subdev.la
diff --git a/utils/media-ctl/libmediatext.pc.in 
b/utils/media-ctl/libmediatext.pc.in
new file mode 100644
index 000..6aa6353
--- /dev/null
+++ b/utils/media-ctl/libmediatext.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libmediatext
+Description: Media controller and V4L2 text-based configuration library
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lmediatext
diff --git a/utils/media-ctl/mediatext-test.c b/utils/media-ctl/mediatext-test.c
new file mode 100644
index 000..29ed38b
--- /dev/null
+++ b/utils/media-ctl/mediatext-test.c
@@ -0,0 +1,66 @@
+/*
+ * libmediatext test program
+ *
+ * Copyright (C) 2013 Intel Corporation
+ *
+ * Contact: Sakari Ailus sakari.ai...@linux.intel.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#include stdio.h
+#include stdlib.h
+#include string.h
+
+#include mediactl.h
+#include mediatext.h
+
+int main(int argc, char *argv[])
+{
+   struct media_device *device;
+   int rval;
+
+   if (argc != 3) {
+   fprintf(stderr, usage: %s media device string\n\n, 
argv[0]);
+   fprintf(stderr, \tstring := [ v4l2-ctrl |�v4l2-mbus | 
link-reset | link-conf]\n\n);
+   fprintf(stderr, \tv4l2-ctrl := \entity\ ctrl_type ctrl_id 
ctrl_value\n);
+   fprintf(stderr, \tctrl_type := [ int | int64 | bitmask ]\n);
+   fprintf(stderr, \tctrl_value := [ %%d | %%PRId64 | 
bitmask_value ]\n);
+   fprintf(stderr, \tbitmask_value := bbinary_number\n\n);
+   fprintf(stderr, \tv4l2-mbus := \n);
+   fprintf(stderr, \tlink-conf := \entity\:pad - 
\entity\:pad[link-flags]\n);
+   fprintf(stderr, \tctrl-to-subdev-conf := ctrl_id - 
\entity\\n);
+   return EXIT_FAILURE;
+   }
+
+   device = media_device_new(argv[1]);
+   if (!device)
+   return EXIT_FAILURE;
+
+   media_debug_set_handler(device, (void (*)(void *, ...))fprintf, stdout);
+
+   rval = media_device_enumerate(device);
+   if (rval)
+   return EXIT_FAILURE;
+
+   rval = mediatext_parse(device, argv[2]);
+   if (rval) {
+   fprintf(stderr, bad string %s (%s)\n, argv[2], 
strerror(-rval));
+   return EXIT_FAILURE;

[PATCH/RFC v4 10/11] mediactl: Add media device ioctl API

2014-11-21 Thread Jacek Anaszewski
Ioctls executed on complex media devices need special
handling. E.g. S_FMT requires negotiation for the whole
pipeline of sub-devices. On the other hand some ioctls
need to be targeted for specific sub-devices. The API
being introduced address such requirements.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/Makefile.am  |2 +-
 utils/media-ctl/libv4l2media_ioctl.c |  325 ++
 utils/media-ctl/libv4l2media_ioctl.h |   40 +
 3 files changed, 366 insertions(+), 1 deletion(-)
 create mode 100644 utils/media-ctl/libv4l2media_ioctl.c
 create mode 100644 utils/media-ctl/libv4l2media_ioctl.h

diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
index 3e883e0..7f18624 100644
--- a/utils/media-ctl/Makefile.am
+++ b/utils/media-ctl/Makefile.am
@@ -1,6 +1,6 @@
 noinst_LTLIBRARIES = libmediactl.la libv4l2subdev.la libmediatext.la
 
-libmediactl_la_SOURCES = libmediactl.c mediactl-priv.h
+libmediactl_la_SOURCES = libmediactl.c mediactl-priv.h libv4l2media_ioctl.c 
libv4l2media_ioctl.h
 libmediactl_la_CFLAGS = -static $(LIBUDEV_CFLAGS)
 libmediactl_la_LDFLAGS = -static $(LIBUDEV_LIBS)
 
diff --git a/utils/media-ctl/libv4l2media_ioctl.c 
b/utils/media-ctl/libv4l2media_ioctl.c
new file mode 100644
index 000..f2498e5
--- /dev/null
+++ b/utils/media-ctl/libv4l2media_ioctl.c
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski j.anaszew...@samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include errno.h
+#include unistd.h
+#include linux/videodev2.h
+#include sys/syscall.h
+
+#include libv4l2media_ioctl.h
+#include ../../utils/media-ctl/v4l2subdev.h
+#include mediactl-priv.h
+#include mediactl.h
+
+#define SYS_IOCTL(fd, cmd, arg) \
+   syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
+
+int media_ioctl_ctrl(struct media_device *media, int request,
+   struct v4l2_control *arg)
+{
+   struct media_entity *entity = media-pipeline;
+   struct v4l2_control ctrl = *arg;
+   struct v4l2_queryctrl queryctrl;
+   int ret = -EINVAL;
+
+   /*
+* The control has to be reset to the default value
+* on all of the pipeline entities, prior setting a new
+* value. This is required in cases when the control config
+* is changed between subsequent calls to VIDIOC_S_CTRL,
+* to avoid the situation when a control is set on more
+* than one sub-device.
+*/
+   if (request == VIDIOC_S_CTRL) {
+   while (entity) {
+   queryctrl.id = ctrl.id;
+
+   ret = SYS_IOCTL(entity-sd-fd, VIDIOC_QUERYCTRL,
+   queryctrl);
+   if (ret  0) {
+   entity = entity-next;
+   continue;
+   }
+
+   ctrl.value = queryctrl.default_value;
+   ret = SYS_IOCTL(entity-sd-fd, VIDIOC_S_CTRL, ctrl);
+   if (ret  0)
+   return -EINVAL;
+
+   entity = entity-next;
+   }
+
+   ctrl.value = arg-value;
+   }
+
+   entity = v4l2_subdev_get_pipeline_entity_by_cid(media, ctrl.id);
+   if (entity) {
+   ret = SYS_IOCTL(entity-sd-fd, request, ctrl);
+   media_dbg(media, Ioctl result for user control 0x%8.8x on %s: 
%d\n,
+ ctrl.id, entity-info.name, ret);
+   goto exit;
+   }
+
+   media_dbg(media, No config for control id 0x%8.8x\n, ctrl.id);
+
+   /* Walk the pipeline until the request succeeds */
+   entity = media-pipeline;
+
+   while (entity) {
+   ret = SYS_IOCTL(entity-sd-fd, request, ctrl);
+   if (!ret) {
+   media_dbg(media, Ioctl succeeded for user control 
0x%8.8x on %s\n,
+ ctrl.id, entity-info.name);
+   goto exit;
+   }
+
+   entity = entity-next;
+   }
+
+   media_dbg(media, Setting control 0x%8.8x failed\n, ctrl.id);
+
+exit:
+   *arg = ctrl;
+   return ret;
+}
+
+static int media_ioctl_single_ext_ctrl(struct media_device *media,
+ 

[PATCH/RFC v4 11/11] Add a libv4l plugin for Exynos4 camera

2014-11-21 Thread Jacek Anaszewski
The plugin provides support for the media device on Exynos4 SoC.
It performs single plane - multi plane API conversion,
video pipeline linking and takes care of automatic data format
negotiation for the whole pipeline, after intercepting
VIDIOC_S_FMT or VIDIOC_TRY_FMT ioctls.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 configure.ac  |1 +
 lib/Makefile.am   |7 +-
 lib/libv4l-exynos4-camera/Makefile.am |7 +
 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c |  595 +
 4 files changed, 609 insertions(+), 1 deletion(-)
 create mode 100644 lib/libv4l-exynos4-camera/Makefile.am
 create mode 100644 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c

diff --git a/configure.ac b/configure.ac
index c9b0524..ae653b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,7 @@ AC_CONFIG_FILES([Makefile
lib/libdvbv5/Makefile
lib/libv4l2rds/Makefile
lib/libv4l-mplane/Makefile
+   lib/libv4l-exynos4-camera/Makefile
 
utils/Makefile
utils/libv4l2util/Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3a0e19c..56b3a9f 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -5,7 +5,12 @@ SUBDIRS = \
libv4l2rds \
libv4l-mplane
 
+if WITH_V4LUTILS
+SUBDIRS += \
+   libv4l-exynos4-camera
+endif
+
 if LINUX_OS
 SUBDIRS += \
libdvbv5
-endif
\ No newline at end of file
+endif
diff --git a/lib/libv4l-exynos4-camera/Makefile.am 
b/lib/libv4l-exynos4-camera/Makefile.am
new file mode 100644
index 000..23c60c6
--- /dev/null
+++ b/lib/libv4l-exynos4-camera/Makefile.am
@@ -0,0 +1,7 @@
+if WITH_V4L_PLUGINS
+libv4l2plugin_LTLIBRARIES = libv4l-exynos4-camera.la
+endif
+
+libv4l_exynos4_camera_la_SOURCES = libv4l-exynos4-camera.c 
../../utils/media-ctl/libmediactl.c ../../utils/media-ctl/libv4l2subdev.c 
../../utils/media-ctl/libv4l2media_ioctl.c ../../utils/media-ctl/mediatext.c
+libv4l_exynos4_camera_la_CFLAGS = -fvisibility=hidden -std=gnu99
+libv4l_exynos4_camera_la_LDFLAGS = -avoid-version -module -shared 
-export-dynamic -lpthread
diff --git a/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c 
b/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
new file mode 100644
index 000..119c75c
--- /dev/null
+++ b/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
@@ -0,0 +1,595 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski j.anaszew...@samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include config.h
+#include errno.h
+#include stdint.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+#include sys/syscall.h
+#include linux/types.h
+
+#include ../../utils/media-ctl/libv4l2media_ioctl.h
+#include ../../utils/media-ctl/mediactl.h
+#include ../../utils/media-ctl/mediatext.h
+#include ../../utils/media-ctl/v4l2subdev.h
+#include libv4l-plugin.h
+
+struct media_device;
+struct media_entity;
+
+/*
+ * struct exynos4_camera_plugin - libv4l exynos4 camera plugin
+ * @media: media device comprising the vid_fd related video device
+ */
+struct exynos4_camera_plugin {
+   struct media_device *media;
+};
+
+#ifdef DEBUG
+#define V4L2_EXYNOS4_DBG(format, ARG...)\
+   printf([%s:%d] [%s]  format  \n, __FILE__, __LINE__, __func__, 
##ARG)
+#else
+#define V4L2_EXYNOS4_DBG(format, ARG...)
+#endif
+
+#define V4L2_EXYNOS4_ERR(format, ARG...)\
+   fprintf(stderr, Libv4l Exynos4 camera plugin: format \n, ##ARG)
+
+#define V4L2_EXYNOS4_LOG(format, ARG...)\
+   fprintf(stdout, Libv4l Exynos4 camera plugin: format \n, ##ARG)
+
+#if HAVE_VISIBILITY
+#define PLUGIN_PUBLIC __attribute__ ((visibility(default)))
+#else
+#define PLUGIN_PUBLIC
+#endif
+
+#define SYS_IOCTL(fd, cmd, arg) \
+   syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
+
+#define SIMPLE_CONVERT_IOCTL(fd, cmd, arg, __struc) ({  \
+   int __ret;  \
+   struct __struc *req = arg;  \
+   uint32_t type = req-type;  \
+   req-type = convert_type(type); \
+   __ret = SYS_IOCTL(fd, cmd, arg);\
+   req-type = type;   \
+   __ret;  \
+   })
+
+#define EXYNOS4_FIMC_DRV   exynos4-fimc

[PATCH/RFC v4 09/11] mediactl: Close only pipeline sub-devices

2014-11-21 Thread Jacek Anaszewski
The function media_device_new_by_entity_devname queries
media devices available in the system for containment
if given media entity. If a verification is negative
the media_device is released with media_device_unref.
In the previous approach media_device_unref was closing
all media entities it contained, which was undesirable
behavior as there might exist other initialized plugins
which had opened the same media_device and initialized
a pipeline. With this patch only the sub-devices that
belong to the pipeline of current media_device instance
will be closed.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index 003902b..9419fb4 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -917,13 +917,13 @@ void media_device_unref(struct media_device *media)
if (media-refcount  0)
return;
 
+   media_close_pipeline_subdevs(media);
+
for (i = 0; i  media-entities_count; ++i) {
struct media_entity *entity = media-entities[i];
 
free(entity-pads);
free(entity-links);
-   if (entity-sd-fd != -1)
-   close(entity-sd-fd);
free(entity-sd-v4l2_controls);
free(entity-sd);
}
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH/RFC v4 08/11] mediactl: Add support for media device pipelines

2014-11-21 Thread Jacek Anaszewski
Add infrastructure for linking media entities,
discovering pipelines of media entities and
opening/closing all sub-devices in the pipeline
at one go.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c   |  168 +++
 utils/media-ctl/libv4l2subdev.c |  109 +
 utils/media-ctl/mediactl-priv.h |7 ++
 utils/media-ctl/mediactl.h  |   70 
 utils/media-ctl/v4l2subdev.h|   42 ++
 5 files changed, 396 insertions(+)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index 9c81711..003902b 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -1243,9 +1243,172 @@ int media_parse_setup_links(struct media_device *media, 
const char *p)
 }
 
 /* 
-
+ * Pipeline operations
+ */
+
+int media_discover_pipeline_by_entity(struct media_device *media,
+ struct media_entity *entity)
+{
+   struct media_entity *pipe_head = NULL;
+   struct media_pad *sink_pads, sink_pad, *src_pad;
+   struct media_link *link = NULL;
+   int num_sink_pads, ret;
+
+   if (entity == NULL)
+   return -EINVAL;
+
+   for (;;) {
+   /* Make recently discovered entity the pipeline head */
+   if (pipe_head == NULL) {
+   pipe_head = entity;
+   } else {
+   entity-next = pipe_head;
+   pipe_head = entity;
+   }
+
+   /* Cache a source pad used for linking the entity */
+   if (link)
+   entity-pipe_src_pad = link-source;
+
+   ret = media_get_busy_pads_by_entity(media, entity,
+   MEDIA_PAD_FL_SINK,
+   sink_pads,
+   num_sink_pads);
+   if (ret  0)
+   return ret;
+
+   /* check if pipeline source entity has been reached */
+   if (num_sink_pads  2) {
+   media_dbg(media, Unexpected number of busy sink pads 
(%d)\n, num_sink_pads);
+   goto err_check_sink_pads;
+   } else if (num_sink_pads == 2) {
+   /* Allow two active pads only in case of S5C73M3-OIF 
entity */
+   if (strcmp(entity-info.name, S5C73M3-OIF)) {
+   media_dbg(media, Ambiguous media device 
topology: two busy sink pads);
+   goto err_check_sink_pads;
+   }
+   /*
+* Two active links are allowed betwen S5C73M3-OIF and 
S5C73M3 entities.
+* In such a case a route through pad 0 has to be 
selected.
+*/
+   ret = media_get_pad_by_index(sink_pads, num_sink_pads,
+   0, sink_pad);
+   if (ret  0)
+   goto err_check_sink_pads;
+   } else if (num_sink_pads == 1) {
+   sink_pad = sink_pads[0];
+   } else {
+   break;
+   }
+
+   free(sink_pads);
+
+   ret = media_get_link_by_sink_pad(media, sink_pad, link);
+   if (ret  0)
+   return -EINVAL;
+
+   /* Cache a sink pad used for linking the entity */
+   entity-pipe_sink_pad = link-sink;
+
+   media_dbg(media, Discovered sink pad %d for the %s entity\n,
+ entity-pipe_sink_pad-index, 
media_entity_get_name(entity));
+
+   src_pad = media_entity_remote_source(link-sink);
+   if (!src_pad)
+   return -EINVAL;
+
+   entity = src_pad-entity;
+   }
+
+   media-pipeline = pipe_head;
+
+   return 0;
+
+err_check_sink_pads:
+   free(sink_pads);
+   return -EINVAL;
+}
+
+int media_has_pipeline_entity(struct media_entity *pipeline, char *entity_name)
+{
+   if (pipeline == NULL || entity_name == NULL)
+   return -EINVAL;
+
+   while (pipeline) {
+   if (!strcmp(pipeline-info.name, entity_name))
+   return 1;
+   pipeline = pipeline-next;
+   }
+
+   return 0;
+}
+
+int media_open_pipeline_subdevs(struct media_device *media)
+{
+   struct media_entity *entity = media-pipeline;
+
+   if (entity == NULL)
+   return 0;
+
+   while (entity-next) {
+   media_dbg(media, Opening sub-device: %s\n, entity-devname);
+   entity-sd-fd = open(entity-devname, O_RDWR);
+
+ 

[PATCH/RFC v4 06/11] mediactl: Add media_device creation helpers

2014-11-21 Thread Jacek Anaszewski
Add helper functions that allow for easy instantiation
of media_device object basing on whether the media device
contains video device with given node name.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libmediactl.c |   75 +
 utils/media-ctl/mediactl.h|   29 
 2 files changed, 104 insertions(+)

diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c
index a476601..9c81711 100644
--- a/utils/media-ctl/libmediactl.c
+++ b/utils/media-ctl/libmediactl.c
@@ -853,6 +853,43 @@ struct media_device *media_device_new(const char *devnode)
return media;
 }
 
+struct media_device *media_device_new_by_entity_devname(char *entity_devname)
+{
+   struct media_device *media;
+   char media_devname[32];
+   int i, ret;
+
+   if (entity_devname == NULL)
+   return NULL;
+
+   /* query all available media devices */
+   for (i = 0;; ++i) {
+   sprintf(media_devname, /dev/media%d, i);
+
+   media = media_device_new(media_devname);
+   if (media == NULL)
+   return NULL;
+
+   ret = media_device_enumerate(media);
+   if (ret  0) {
+   media_dbg(media, Failed to enumerate %s (%d)\n, 
media_devname, ret);
+   goto err_dev_enum;
+   }
+
+   /* Check if the media device contains entity with 
entity_devname */
+   if (media_get_entity_by_devname(media, entity_devname, 
strlen(entity_devname)))
+   return media;
+
+   if (media)
+   media_device_unref(media);
+   }
+
+err_dev_enum:
+   if (media)
+   media_device_unref(media);
+   return NULL;
+}
+
 struct media_device *media_device_new_emulated(struct media_device_info *info)
 {
struct media_device *media;
@@ -896,6 +933,44 @@ void media_device_unref(struct media_device *media)
free(media);
 }
 
+int media_get_devname_by_fd(int fd, char *node_name)
+{
+   struct udev *udev;
+   struct media_entity tmp_entity;
+   struct stat stat;
+   int ret;
+
+   if (node_name == NULL)
+   return -EINVAL;
+
+   ret = fstat(fd, stat);
+   if (ret  0)
+   return -EINVAL;
+
+   tmp_entity.info.v4l.major = MAJOR(stat.st_rdev);
+   tmp_entity.info.v4l.minor = MINOR(stat.st_rdev);
+
+   ret = media_udev_open(udev);
+   if (ret  0)
+   printf(Can't get udev context\n);
+
+   /* Try to get the device name via udev */
+   ret = media_get_devname_udev(udev, tmp_entity);
+   if (!ret)
+   goto out;
+
+   ret = media_get_devname_sysfs(tmp_entity);
+   if (ret  0)
+   goto err_get_devname;
+
+out:
+   strcpy(node_name, tmp_entity.devname);
+err_get_devname:
+   media_udev_close(udev);
+   return ret;
+}
+
+
 int media_device_add_entity(struct media_device *media,
const struct media_entity_desc *desc,
const char *devnode)
diff --git a/utils/media-ctl/mediactl.h b/utils/media-ctl/mediactl.h
index 18a1e0e..7f16097 100644
--- a/utils/media-ctl/mediactl.h
+++ b/utils/media-ctl/mediactl.h
@@ -77,6 +77,23 @@ struct media_device *media_device_new(const char *devnode);
 struct media_device *media_device_new_emulated(struct media_device_info *info);
 
 /**
+ * @brief Create a new media device if it comprises entity with entity_devname
+ * @param entity_devname - device node name of the entity to be matched
+ *
+ * Query all media devices available in the system to find the one comprising
+ * the entity with device node name equal to entity_devname. If the media
+ * device is matched then its instance is created and initialized with
+ * enumerated entities and links. The returned device can be accessed.
+ *
+ * Media devices are reference-counted, see media_device_ref() and
+ * media_device_unref() for more information.
+ *
+ * @return A pointer to the new media device or NULL if video_devname cannot
+ * be matched or memory cannot be allocated.
+ */
+struct media_device *media_device_new_by_entity_devname(char *video_devname);
+
+/**
  * @brief Take a reference to the device.
  * @param media - device instance.
  *
@@ -242,6 +259,18 @@ const char *media_entity_get_devname(struct media_entity 
*entity);
 const char *media_entity_get_name(struct media_entity *entity);
 
 /**
+ * @brief Get the device node name by its file descriptor
+ * @param fd - file descriptor of a device
+ * @param node_name - output device node name string
+ *
+ * This function returns the full path and name to the device node 
corresponding
+ * to the given file descriptor.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int media_get_devname_by_fd(int fd, char *node_name);
+
+/**
  * 

[PATCH/RFC v4 07/11] media-ctl: libv4l2subdev: add VYUY8_2X8 mbus code

2014-11-21 Thread Jacek Anaszewski
The VYUY8_2X8 media bus format is the only one supported
by the S5C73M3 camera sensor, that is a part of the media
device on the Exynos4412-trats2 board.

Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com
Acked-by: Kyungmin Park kyungmin.p...@samsung.com
---
 utils/media-ctl/libv4l2subdev.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 4c5fb12..a96ed7a 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -704,6 +704,7 @@ static struct {
{ YUYV, V4L2_MBUS_FMT_YUYV8_1X16 },
{ YUYV1_5X8, V4L2_MBUS_FMT_YUYV8_1_5X8 },
{ YUYV2X8, V4L2_MBUS_FMT_YUYV8_2X8 },
+   { VYUY8_2X8, V4L2_MBUS_FMT_VYUY8_2X8 },
{ UYVY, V4L2_MBUS_FMT_UYVY8_1X16 },
{ UYVY1_5X8, V4L2_MBUS_FMT_UYVY8_1_5X8 },
{ UYVY2X8, V4L2_MBUS_FMT_UYVY8_2X8 },
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


randconfig build error with next-20141121, in drivers/media/pci/smipcie/smipcie.c

2014-11-21 Thread Jim Davis
Building with the attached random configuration file,

drivers/built-in.o: In function `smi_probe':
smipcie.c:(.text+0x15725b): undefined reference to `i2c_bit_add_bus'
smipcie.c:(.text+0x157327): undefined reference to `i2c_bit_add_bus'
make: *** [vmlinux] Error 1
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.18.0-rc5 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT=elf64-x86-64
CONFIG_ARCH_DEFCONFIG=arch/x86/configs/x86_64_defconfig
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS=-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx 
-fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 
-fcall-saved-r11
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=
CONFIG_COMPILE_TEST=y
CONFIG_LOCALVERSION=
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME=(none)
# CONFIG_SYSVIPC is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_FHANDLE=y
CONFIG_USELIB=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_DEBUG=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_HZ_PERIODIC=y
# CONFIG_NO_HZ_IDLE is not set
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_TASKS_RCU is not set
CONFIG_RCU_STALL_COMMON=y
CONFIG_CONTEXT_TRACKING=y
CONFIG_RCU_USER_QS=y
# CONFIG_CONTEXT_TRACKING_FORCE is not set
CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
CONFIG_RCU_FANOUT_EXACT=y
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_RCU_NOCB_CPU is not set
CONFIG_BUILD_BIN2C=y
# CONFIG_IKCONFIG is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_NUMA_BALANCING=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
# CONFIG_CGROUP_FREEZER is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_MEMCG is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
CONFIG_RT_GROUP_SCHED=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_NAMESPACES is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_RELAY=y
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_LTO_MENU=y
CONFIG_LTO_DISABLE=y
CONFIG_ANON_INODES=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_BPF=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_OBSOLETE_SYSCALLS=y
CONFIG_SGETMASK_SYSCALL=y
# CONFIG_SYSFS_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_PRINTK is not set
# CONFIG_BUG is not set
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_BASE_FULL is not set
CONFIG_FUTEX=y
# CONFIG_EPOLL is not set
# CONFIG_SIGNALFD is not set
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_BPF_SYSCALL=y
# CONFIG_SHMEM is not set
# CONFIG_AIO is not set
# CONFIG_ADVISE_SYSCALLS is not set
# CONFIG_NTP is not set
CONFIG_PCI_QUIRKS=y

[PATCH] MAINTAINERS: Update mchehab's addresses

2014-11-21 Thread Mauro Carvalho Chehab
I'm using the new Open Source Group address for my upstream work.
While the other email is still valid, it is better for me to receive
patches via the new address.

So, replace it everywhere inside MAINTAINERS.

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com
---
 MAINTAINERS | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5af7cb642c41..629c5b127292 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1827,7 +1827,7 @@ F:include/net/ax25.h
 F: net/ax25/
 
 AZ6007 DVB DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -2196,7 +2196,7 @@ F:Documentation/filesystems/btrfs.txt
 F: fs/btrfs/
 
 BTTV VIDEO4LINUX DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -2717,7 +2717,7 @@ F:drivers/media/common/cx2341x*
 F: include/media/cx2341x*
 
 CX88 VIDEO4LINUX DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -3386,7 +3386,7 @@ F:fs/ecryptfs/
 EDAC-CORE
 M: Doug Thompson dougthomp...@xmission.com
 M: Borislav Petkov b...@alien8.de
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Supported
@@ -3435,7 +3435,7 @@ S:Maintained
 F: drivers/edac/e7xxx_edac.c
 
 EDAC-GHES
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Maintained
@@ -3463,21 +3463,21 @@ S:  Maintained
 F: drivers/edac/i5000_edac.c
 
 EDAC-I5400
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Maintained
 F: drivers/edac/i5400_edac.c
 
 EDAC-I7300
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Maintained
 F: drivers/edac/i7300_edac.c
 
 EDAC-I7CORE
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Maintained
@@ -3520,7 +3520,7 @@ S:Maintained
 F: drivers/edac/r82600_edac.c
 
 EDAC-SBRIDGE
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-e...@vger.kernel.org
 W: bluesmoke.sourceforge.net
 S: Maintained
@@ -3580,7 +3580,7 @@ S:Maintained
 F: drivers/net/ethernet/ibm/ehea/
 
 EM28XX VIDEO4LINUX DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -5941,7 +5941,7 @@ S:Maintained
 F: drivers/media/radio/radio-maxiradio*
 
 MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 P: LinuxTV.org Project
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
@@ -7970,7 +7970,7 @@ S:Odd Fixes
 F: drivers/media/i2c/saa6588*
 
 SAA7134 VIDEO4LINUX DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -8428,7 +8428,7 @@ S:Maintained
 F: drivers/media/radio/si4713/radio-usb-si4713.c
 
 SIANO DVB DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -9117,7 +9117,7 @@ S:Maintained
 F: drivers/media/i2c/tda9840*
 
 TEA5761 TUNER DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: http://linuxtv.org
 T: git git://linuxtv.org/media_tree.git
@@ -9125,7 +9125,7 @@ S:Odd fixes
 F: drivers/media/tuners/tea5761.*
 
 TEA5767 TUNER DRIVER
-M: Mauro Carvalho Chehab m.che...@samsung.com
+M: Mauro Carvalho Chehab mche...@osg.samsung.com
 L: linux-media@vger.kernel.org
 W: 

[PATCH] media: pci: smipcie: Fix dependency for DVB_SMIPCIE

2014-11-21 Thread Andreas Ruprecht
In smipcie.c, the function i2c_bit_add_bus() is called. This
function is defined by the I2C bit-banging interfaces enabled
with CONFIG_I2C_ALGOBIT.

As there was no dependency in Kconfig, CONFIG_I2C_ALGOBIT could
be set to m while CONFIG_DVB_SMIPCIE was set to y, resulting
in a build error due to an undefined reference. This patch adds
the dependency on CONFIG_I2C_ALGOBIT in Kconfig.

Signed-off-by: Andreas Ruprecht rup...@einserver.de
Reported-by: Jim Davis jim.ep...@gmail.com
---
 drivers/media/pci/smipcie/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/smipcie/Kconfig 
b/drivers/media/pci/smipcie/Kconfig
index 75a2992..c728721 100644
--- a/drivers/media/pci/smipcie/Kconfig
+++ b/drivers/media/pci/smipcie/Kconfig
@@ -1,6 +1,6 @@
 config DVB_SMIPCIE
tristate SMI PCIe DVBSky cards
-   depends on DVB_CORE  PCI  I2C
+   depends on DVB_CORE  PCI  I2C  I2C_ALGOBIT
select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88RS6000T if MEDIA_SUBDRV_AUTOSELECT
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] media: pci: smipcie: Fix dependency for DVB_SMIPCIE

2014-11-21 Thread Mauro Carvalho Chehab
Em Fri, 21 Nov 2014 18:51:59 +0100
Andreas Ruprecht rup...@einserver.de escreveu:

 In smipcie.c, the function i2c_bit_add_bus() is called. This
 function is defined by the I2C bit-banging interfaces enabled
 with CONFIG_I2C_ALGOBIT.
 
 As there was no dependency in Kconfig, CONFIG_I2C_ALGOBIT could
 be set to m while CONFIG_DVB_SMIPCIE was set to y, resulting
 in a build error due to an undefined reference. This patch adds
 the dependency on CONFIG_I2C_ALGOBIT in Kconfig.
 
 Signed-off-by: Andreas Ruprecht rup...@einserver.de
 Reported-by: Jim Davis jim.ep...@gmail.com
 ---
  drivers/media/pci/smipcie/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/media/pci/smipcie/Kconfig 
 b/drivers/media/pci/smipcie/Kconfig
 index 75a2992..c728721 100644
 --- a/drivers/media/pci/smipcie/Kconfig
 +++ b/drivers/media/pci/smipcie/Kconfig
 @@ -1,6 +1,6 @@
  config DVB_SMIPCIE
   tristate SMI PCIe DVBSky cards
 - depends on DVB_CORE  PCI  I2C
 + depends on DVB_CORE  PCI  I2C  I2C_ALGOBIT

IMHO, the best would be, instead, to select I2C_ALGOBIT.

   select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
   select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
   select MEDIA_TUNER_M88RS6000T if MEDIA_SUBDRV_AUTOSELECT
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] media: pci: smipcie: Fix dependency for DVB_SMIPCIE

2014-11-21 Thread Andreas Ruprecht
On 21.11.2014 19:13, Mauro Carvalho Chehab wrote:
 Em Fri, 21 Nov 2014 18:51:59 +0100
 Andreas Ruprecht rup...@einserver.de escreveu:
 
 In smipcie.c, the function i2c_bit_add_bus() is called. This
 function is defined by the I2C bit-banging interfaces enabled
 with CONFIG_I2C_ALGOBIT.

 As there was no dependency in Kconfig, CONFIG_I2C_ALGOBIT could
 be set to m while CONFIG_DVB_SMIPCIE was set to y, resulting
 in a build error due to an undefined reference. This patch adds
 the dependency on CONFIG_I2C_ALGOBIT in Kconfig.

 Signed-off-by: Andreas Ruprecht rup...@einserver.de
 Reported-by: Jim Davis jim.ep...@gmail.com
 ---
  drivers/media/pci/smipcie/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/media/pci/smipcie/Kconfig 
 b/drivers/media/pci/smipcie/Kconfig
 index 75a2992..c728721 100644
 --- a/drivers/media/pci/smipcie/Kconfig
 +++ b/drivers/media/pci/smipcie/Kconfig
 @@ -1,6 +1,6 @@
  config DVB_SMIPCIE
  tristate SMI PCIe DVBSky cards
 -depends on DVB_CORE  PCI  I2C
 +depends on DVB_CORE  PCI  I2C  I2C_ALGOBIT
 
 IMHO, the best would be, instead, to select I2C_ALGOBIT.

Okay, I'll change that and submit a new version of this patch.

Regards,

Andreas Ruprecht
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] media: pci: smipcie: Fix dependency for DVB_SMIPCIE

2014-11-21 Thread Andreas Ruprecht
In smipcie.c, the function i2c_bit_add_bus() is called. This
function is defined by the I2C bit-banging interfaces enabled
with CONFIG_I2C_ALGOBIT.

As there was no dependency in Kconfig, CONFIG_I2C_ALGOBIT could
be set to m while CONFIG_DVB_SMIPCIE was set to y, resulting
in a build error due to an undefined reference.

This patch adds the dependency on CONFIG_I2C_ALGOBIT in Kconfig
by selecting it when CONFIG_DVB_SMIPCIE is selected.

Signed-off-by: Andreas Ruprecht rup...@einserver.de
Reported-by: Jim Davis jim.ep...@gmail.com
---
 drivers/media/pci/smipcie/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/pci/smipcie/Kconfig 
b/drivers/media/pci/smipcie/Kconfig
index 75a2992..57dd124 100644
--- a/drivers/media/pci/smipcie/Kconfig
+++ b/drivers/media/pci/smipcie/Kconfig
@@ -1,6 +1,7 @@
 config DVB_SMIPCIE
tristate SMI PCIe DVBSky cards
depends on DVB_CORE  PCI  I2C
+   select I2C_ALGOBIT
select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88RS6000T if MEDIA_SUBDRV_AUTOSELECT
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Any tuner hardware expert here?

2014-11-21 Thread Jahn
Does anybody here understand how  tuner hardware work?
From my understanding tuner sends output voltage( 13V/18V) to LNB( in 
satellite dish) and 
from LNB  input voltage is coming to tuner chip then to demodulator chip and to 
data bus and 
those data goes to CPU of the satellite receiver.
I have one tuner module that has signal ( measured by oscilloscope) on data bus 
but sattelite 
receiver shows no picture, so the data on data bus is probbaly decoded in a 
wrong way.
So, can anyone suggest a way what procedure to use to find out which part( 
electronic chip) 
is faulty?
Thanks for feedback


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l-utils stable release 1.6.1

2014-11-21 Thread Hans Verkuil
Hi Gregor,

On 11/20/2014 04:31 PM, Gregor Jasny wrote:
 Hello,
 
 do you consider something from these commits as important enough for a 
 bugfix release?
 
 Thanks,
 Gregor
 
 Akihiro Tsukada (9):
   libdvbv5, dvbv5-scan: generalize channel duplication check
   libdvbv5: add as many channels as possible in scanning DVB-T2
   libdvbv5: wrong frequency in the output of satellite delsys scans
   libdvbv5: add support for ISDB-S tuning
   libdvbv5: add support for ISDB-S scanning
   libdvbv5: add COUNTRY property
   v4l-utils/libdvbv5: restore deleted functions to keep API/ABI 
 compatible
   v4l-utils/libdvbv5: fix memory leak in dvb_guess_user_country()
   v4l-utils/libdvbv5: add gconv module for the text conversions of 
 ISDB-S/T.

 Gregor Jasny (7):
   Start v4l-utils 1.7.0 development cycle
   man: remove duplicate backslash from NAME section
   man: Use Unicode character for ellipsis and fall back to ...
   man: add generated files to .gitignore
   libdvbv5: Remove stray semicolon
   v4l2-compliance: Explicitely link against rt library
   v4l2-ctl: Explicitely link against rt library

 Hans Verkuil (10):
   qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg.

This one should go in (critical bug fix).

   v4l2-ctl: fix sliced vbi mode parsing

And this one.

   v4l2-compliance: when streaming used at least 2 buffers.
   v4l2-compliance: add initial checks for VIDIOC_QUERY_EXT_CTRL
   v4l2-ctl: add support for U32 control type.
   v4l2-ctl: fix array handling

And these two for v4l2-ctl.

Sorry for being late with replying.

Regards,

Hans

   v4l2-compliance: allow the V4L2_IN_ST_NO_SYNC status flag.
   qv4l2: add single step support
   qv4l2: don't select alsa device for video output.
   v4l2-compliance: select(): split ret = 0 test in two

 Hans de Goede (2):
   rc_keymaps: allwinner: S/KEY_HOME/KEY_HOMEPAGE/
   v4lconvert: Fix decoding of jpeg data with no vertical sub-sampling

 Mauro Carvalho Chehab (41):
   libdvbv5: properly represent Satellite frequencies
   README: better document the package
   libdvbv5: Fix some Doxygen warnings at dvb-fe.h
   Doxygen: Document libdvbv5 countries.h
   configure.ac: Fix gconv compilation with 64 bits
   parse_tcpdump_log.pl: only adjust direction for control EP
   contrib: add a parser for af9035
   parse_af9035.pl: properly handle URB errors
   parse_af9035.pl: Add two other commands from ITE driver
   parse_af9035.pl: add arguments to show timestamp and debug
   parse_af9035.pl: group write/read URBs
   parse_af9035.pl: create a routine to print send/race
   parse_af9035.pl: print read/write as C lines
   parse_af9035.pl: add support for firmware commands
   parse_af9035.pl: fix firmware write size
   ir-keytable: fix a regression introduced by fe2aa5f767eba
   gen_keytables.pl: Fix a regression at RC map file generation
   rc: Update the protocol name at RC6 tables
   rc_maps.cfg: reorder entries alphabetically
   rc: sync with Kernel
   rc: copy userspace-only maps to a separate dir
   README: Add the steps needed to syncronize with the Kernel tree
   vivid-tpg.h.patch: update to match current upstream tree
   Synchronize with the Kernel
   parse_af9035.pl: proper handle when stack is not filled
   parse_af9035.pl: add support for CMD_IR_GET
   parse_af9035.pl: add options to hide part of the messages
   parse_af9035.pl: Add firmware boot message to the parser
   parse_af9035.pl: improve IR handling
   parse_af9035.pl: add support for generic I2C read/write
   parse_af9035.pl: better handle the read data
   parse_af9035.pl: allow to hide parsing errors
   parse_af9035.pl: add support for standard I2C commands
   parse_af9035.pl: some cleanups
   parse_af9035.pl: Fix decoding order at I2C read/write
   parse_af9035.pl: Fix size on rd/wr regs prints
   parse_af9035.pl: Fix some hide conditions
   parse_af9035.pl: Improve argument handling
   libdvbv5: add experimental DTMB support
   parse_tcpdump_log.pl: simplify non-control data
   parse_tcpdump_log.pl: remove some leftovers

 Niels Ole Salscheider (1):
   qv4l2: Fix out-of-source build

 Patrick Boettcher (4):
   parse_tcpdump_log.pl: skip filtered frames and remove them from pending
   parse_tcpdump_log.pl: show transfer-direction for non-ctrl-transfers
   parse_tcpdump_log.pl: add external frame_processor-option
   parse_tcpdump_log.pl: remove --all option which was not documented and 
 not working as expected
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to 

Re: v4l-utils stable release 1.6.2

2014-11-21 Thread Gregor Jasny
I just released v4l-utils 1.6.1 and 1.6.2 with these changes:

 v4l-utils-1.6.2
 ---
 
 Hans Verkuil (5):
   v4l2-ctl: fix sliced vbi mode parsing
   v4l2-compliance: when streaming used at least 2 buffers.
   v4l2-compliance: add initial checks for VIDIOC_QUERY_EXT_CTRL
   v4l2-ctl: add support for U32 control type.
   v4l2-ctl: fix array handling
 
 
 v4l-utils-1.6.1
 ---
 
 Gregor Jasny (5):
   man: remove duplicate backslash from NAME section
   man: Use Unicode character for ellipsis and fall back to ...
   man: add generated files to .gitignore
   v4l2-compliance: Explicitely link against rt library
   v4l2-ctl: Explicitely link against rt library
 
 Hans Verkuil (1):
   qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg.
 
 Hans de Goede (2):
   rc_keymaps: allwinner: S/KEY_HOME/KEY_HOMEPAGE/
   v4lconvert: Fix decoding of jpeg data with no vertical sub-sampling
 
 Mauro Carvalho Chehab (4):
   libdvbv5: properly represent Satellite frequencies
   README: better document the package
   ir-keytable: fix a regression introduced by fe2aa5f767eba
   rc: Update the protocol name at RC6 tables
 
 Niels Ole Salscheider (1):
   qv4l2: Fix out-of-source build

Thanks,
Gregor
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media/au0828: Fix IR stop, poll to not access device during disconnect

2014-11-21 Thread Shuah Khan
au0828 IR stop and poll routines continue to access device
while usb disconnect is in progress. There is small window
between device disconnect and usb interface is set to null.
This results in filling the log with several of the following
error messages. Fix it to detect device disconnect condition
and avoid device access.

Nov 20 18:58:02 anduin kernel: [  102.949819] au0828: au0828_usb_disconnect()
Nov 20 18:58:02 anduin kernel: [  102.950046] au0828: send_control_msg() Failed 
sending control message, error -71.
Nov 20 18:58:02 anduin kernel: [  102.950052] au0828: send_control_msg() Failed 
sending control message, error -19.
Nov 20 18:58:02 anduin kernel: [  102.950056] au0828: send_control_msg() Failed 
sending control message, error -19.
Nov 20 18:58:02 anduin kernel: [  102.950061] au0828: send_control_msg() Failed 
sending control message, error -19.
Nov 20 18:58:02 anduin kernel: [  102.950065] au0828: recv_control_msg() Failed 
receiving control message, error -19.
Nov 20 18:58:02 anduin kernel: [  102.950069] au0828: recv_control_msg() Failed 
receiving control message, error -19.
Nov 20 18:58:02 anduin kernel: [  102.950072] au0828: recv_control_msg() Failed 
receiving control message, error -19.

Signed-off-by: Shuah Khan shua...@osg.samsung.com
---
 drivers/media/usb/au0828/au0828-core.c  |8 
 drivers/media/usb/au0828/au0828-input.c |   11 +--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-core.c 
b/drivers/media/usb/au0828/au0828-core.c
index bc06480..2c3d3c1 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -153,6 +153,14 @@ static void au0828_usb_disconnect(struct usb_interface 
*interface)
 
dprintk(1, %s()\n, __func__);
 
+   /* there is a small window after disconnect, before
+  dev-usbdev is NULL, for poll (e.g: IR) try to access
+  the device and fill the dmesg with error messages.
+  Set the status so poll routines can check and avoid
+  access after disconnect.
+   */
+   dev-dev_state = DEV_DISCONNECTED;
+
au0828_rc_unregister(dev);
/* Digital TV */
au0828_dvb_unregister(dev);
diff --git a/drivers/media/usb/au0828/au0828-input.c 
b/drivers/media/usb/au0828/au0828-input.c
index 63995f9..c7185c1 100644
--- a/drivers/media/usb/au0828/au0828-input.c
+++ b/drivers/media/usb/au0828/au0828-input.c
@@ -129,6 +129,10 @@ static int au0828_get_key_au8522(struct au0828_rc *ir)
int prv_bit, bit, width;
bool first = true;
 
+   /* do nothing if device is disconnected */
+   if (ir-dev-dev_state == DEV_DISCONNECTED)
+   return 0;
+
/* Check IR int */
rc = au8522_rc_read(ir, 0xe1, -1, buf, 1);
if (rc  0 || !(buf[0]  (1  4))) {
@@ -255,8 +259,11 @@ static void au0828_rc_stop(struct rc_dev *rc)
 
cancel_delayed_work_sync(ir-work);
 
-   /* Disable IR */
-   au8522_rc_clear(ir, 0xe0, 1  4);
+   /* do nothing if device is disconnected */
+   if (ir-dev-dev_state != DEV_DISCONNECTED) {
+   /* Disable IR */
+   au8522_rc_clear(ir, 0xe0, 1  4);
+   }
 }
 
 static int au0828_probe_i2c_ir(struct au0828_dev *dev)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cron job: media_tree daily build: OK

2014-11-21 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sat Nov 22 04:00:19 CET 2014
git branch: test
git hash:   5937a784c3e5fe8fd1e201f42a2b1ece6c36a6c0
gcc version:i686-linux-gcc (GCC) 4.9.1
sparse version: v0.5.0-35-gc1c3f96
smatch version: 0.4.1-3153-g7d56ab3
host hardware:  x86_64
host os:3.17-2.slh.2-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12.23-i686: OK
linux-3.13.11-i686: OK
linux-3.14.9-i686: OK
linux-3.15.2-i686: OK
linux-3.16-i686: OK
linux-3.17-i686: OK
linux-3.18-rc1-i686: OK
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12.23-x86_64: OK
linux-3.13.11-x86_64: OK
linux-3.14.9-x86_64: OK
linux-3.15.2-x86_64: OK
linux-3.16-x86_64: OK
linux-3.17-x86_64: OK
linux-3.18-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html