About my patch to increase max exposure value on pac207

2011-09-22 Thread Marco Diego Aurélio Mesquita
Hi!

Is there any news on the patch I sent to increase max exposure value
on pac207 based webcams[1]? This one has been waiting for a long time
and I really would like to get it merged.

[1] http://patchwork.linuxtv.org/patch/6850/
--
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 2/4] v4l: add documentation for selection API

2011-09-22 Thread Laurent Pinchart
Hi Tomasz,

Thanks for the patch, and sorry for the late reply.

On Wednesday 31 August 2011 14:28:21 Tomasz Stanislawski wrote:
> This patch adds a documentation for VIDIOC_{G/S}_SELECTION ioctl. Moreover,
> the patch adds the description of modeling of composing, cropping and
> scaling features in V4L2. Finally, some examples are presented.
> 
> Signed-off-by: Tomasz Stanislawski 
> Signed-off-by: Kyungmin Park 

The documentation looks very good. Thank you for your great work. Just a couple
of small comments below, mostly about typo fixes.

[snip]

> diff --git a/Documentation/DocBook/media/v4l/selection-api.xml
> b/Documentation/DocBook/media/v4l/selection-api.xml new file mode 100644
> index 000..d9fd57d8
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/selection-api.xml
> @@ -0,0 +1,278 @@
> +
> +
> +  Cropping, composing and scaling
> +
> +Some video capture devices can sample a subsection of a picture and
> +shrink or enlarge it to an image of arbitrary size. Next, the devices can
> +insert the image into larger one. Some video output devices can crop part of 
> an
> +input image, scale it up or down and insert it at an arbitrary scan line and
> +horizontal offset into a video signal. We call these abilities cropping,
> +scaling and composing.
> +
> +On a video capture device the source is a video
> +signal, and the cropping target determine the area actually sampled. The sink
> +is an image stored in a memory buffer.  The composing area specify which part

s/specify/specifies/

> +of the buffer is actually written by the hardware. 

s/written/written to/

> +On a video output device the source is an image 
> in a
> +memory buffer, and the cropping target is a part of an image to shown on a

s/shown/show/ or s/shown/be shown/

> +display. The sink is the display or the graphics screen. The application may
> +select the part of display where the image should be displayed. The size and
> +position of such a window is controlled by compose target.

s/compose target/the compose target/

> +Rectangles for all cropping and composing targets are defined even if 
> the
> +device does not support neither cropping nor composing. Their size and 
> position

s/does not support/supports/ or s/neither cropping nor/cropping or/

> +will be fixed in such a case. If the device does not support scaling then the
> +cropping and composing rectangles have the same size.
> +
> +
> +  Selection targets
> +
> +  
> + Cropping and composing targets
> + 
> +   
> + 
> +   
> +   
> + Targets used by a cropping, composing and scaling
> +process
> +   
> + 
> +  
> +
> +
> +  
> +
> +  Configuration
> +
> +Applications can use the selection
> +API to select an area in a video signal or a buffer, and to query for
> +default settings and hardware limits.
> +
> +Video hardware can have various cropping, composing and scaling
> +limitations. It may only scale up or down, support only discrete scaling
> +factors, or have different scaling abilities in horizontal and vertical
> +direction. Also it may not support scaling at all. At the same time the

s/horizontal and vertical direction/the horizontal and vertical directions/

> +cropping/composing rectangles may have to be aligned, and both the source and
> +the sink may have arbitrary upper and lower size limits. Therefore, as usual,
> +drivers are expected to adjust the requested parameters and return the actual
> +values selected. An application can control the rounding behaviour using 
>  +linkend="v4l2-sel-flags"> constraint flags .
> +
> +   
> +
> +   Configuration of video capture
> +
> +See the figure  for examples of 
> the

s/the figure/figure/

> +selection targets available for a video capture device. The targets should be
> +configured according to the pipeline configuration rules for a capture 
> device.

Do we have such rules written somewhere ?

> +It means that the cropping targets must be configured in prior to the 
> composing
> +targets.
> +
> +The range of coordinates of the top left corner, width and height of a
> +area which can be sampled is given by the  V4L2_SEL_CROP_BOUNDS

s/a area which/areas that/

> + target. To support a wide range of hardware this specification 
> does
> +not define an origin or units.
> +
> +The top left corner, width and height of the source rectangle, that is
> +the area actually sampled, is given by  V4L2_SEL_CROP_ACTIVE

s/by/by the/

> + target. It uses the same coordinate system as 
> +V4L2_SEL_CROP_BOUNDS . The active cropping area must lie 
> completely
> +inside the capture boundaries. The driver may further adjust the requested 
> size
> +and/or position according to hardware limitations.
> +
> +Each capture device has a default source rectangle, given by the
> + V4L2_SEL_CROP_DEFAULT  target. The center of this
> +rectangle shall align with the center of the active picture area of the video
> +signal, and cover what the driver writer 

Re: [PATCH v2 2/2] v4l: Add v4l2 subdev driver for S5K6AAFX sensor

2011-09-22 Thread Sakari Ailus
Hi Sylwester,

I have a few additional comments below, they don't depend on my earlier
ones.

On Wed, Sep 21, 2011 at 07:45:07PM +0200, Sylwester Nawrocki wrote:
> This driver exposes preview mode operation of the S5K6AAFX sensor with
> embedded SoC ISP. It uses one of the five user predefined configuration
> register sets. There is yet no support for capture (snapshot) operation.
> Following controls are supported:
> manual/auto exposure and gain, power line frequency (anti-flicker),
> saturation, sharpness, brightness, contrast, white balance temperature,
> color effects, horizontal/vertical image flip, frame interval.
> 
> Signed-off-by: Sylwester Nawrocki 
> Signed-off-by: Kyungmin Park 
> ---
>  drivers/media/video/Kconfig  |7 +
>  drivers/media/video/Makefile |1 +
>  drivers/media/video/s5k6aa.c | 1482 
> ++
>  include/media/s5k6aa.h   |   51 ++
>  4 files changed, 1541 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/media/video/s5k6aa.c
>  create mode 100644 include/media/s5k6aa.h
> 
> diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
> index 9da6044..ccc8172 100644
> --- a/drivers/media/video/Kconfig
> +++ b/drivers/media/video/Kconfig
> @@ -496,6 +496,13 @@ config VIDEO_TCM825X
> This is a driver for the Toshiba TCM825x VGA camera sensor.
> It is used for example in Nokia N800.
>  
> +config VIDEO_S5K6AA
> + tristate "Samsung S5K6AAFX sensor support"
> + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> + ---help---
> +   This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M
> +   camera sensor with an embedded SoC image signal processor.
> +
>  comment "Flash devices"
>  
>  config VIDEO_ADP1653
> diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
> index f52a771..526cb32 100644
> --- a/drivers/media/video/Makefile
> +++ b/drivers/media/video/Makefile
> @@ -71,6 +71,7 @@ obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
>  obj-$(CONFIG_VIDEO_SR030PC30)+= sr030pc30.o
>  obj-$(CONFIG_VIDEO_NOON010PC30)  += noon010pc30.o
>  obj-$(CONFIG_VIDEO_M5MOLS)   += m5mols/
> +obj-$(CONFIG_VIDEO_S5K6AA)   += s5k6aa.o
>  obj-$(CONFIG_VIDEO_ADP1653)  += adp1653.o
>  
>  obj-$(CONFIG_SOC_CAMERA_IMX074)  += imx074.o
> diff --git a/drivers/media/video/s5k6aa.c b/drivers/media/video/s5k6aa.c
> new file mode 100644
> index 000..43b7dac
> --- /dev/null
> +++ b/drivers/media/video/s5k6aa.c
> @@ -0,0 +1,1482 @@
> +/*
> + * Driver for Samsung S5K6AAFX SXGA 1/6" 1.3M CMOS Image Sensor
> + * with embedded SoC ISP.
> + *
> + * Copyright (C) 2011, Samsung Electronics Co., Ltd.
> + * Author: Sylwester Nawrocki 
> + *
> + * Based on a driver authored by Dongsoo Nathaniel Kim.
> + * Copyright (C) 2009, Dongsoo Nathaniel Kim 
> + *
> + * 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.
> + *
> + * TODO:
> + *   - add set/get_crop operations
> + *   - add capture (snapshot) mode support
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +static int debug;
> +module_param(debug, int, 0644);
> +
> +#define DRIVER_NAME  "S5K6AA"
> +
> +/* The token to indicate array termination */
> +#define S5K6AA_TERM  0x
> +#define S5K6AA_OUT_WIDTH_DEF 640
> +#define S5K6AA_OUT_HEIGHT_DEF480
> +#define S5K6AA_WIN_WIDTH_MAX 1280
> +#define S5K6AA_WIN_HEIGHT_MAX1024
> +#define S5K6AA_WIN_WIDTH_MIN 8
> +#define S5K6AA_WIN_HEIGHT_MIN8
> +
> +/*
> + * H/W register Interface (0xD000 - 0xDFFF)
> + */
> +#define AHB_MSB_ADDR_PTR 0xfcfc
> +#define GEN_REG_OFFSH0xd000
> +#define REG_SW_RESET 0x0010
> +#define REG_SW_LOAD_COMPLETE 0x0014
> +#define REG_CMDWR_ADDRH  0x0028
> +#define REG_CMDWR_ADDRL  0x002a
> +#define REG_CMDRD_ADDRH  0x002c
> +#define REG_CMDRD_ADDRL  0x002e
> +
> +#define REG_CMDBUF0_ADDR 0x0f12
> +#define REG_CMDBUF1_ADDR 0x0f10
> +
> +/*
> + * Host S/W Register interface (0x7000 - 0x70002000)
> + * The value of the two most significant address bytes is 0x7000,
> + * (HOST_SWIF_OFFS_H). The register addresses below specify 2 LSBs.
> + */
> +#define HOST_SWIF_OFFSH  0x7000
> +
> +/* Initialization parameters */
> +/* Master clock frequency in KHz */
> +#define REG_I_INCLK_FREQ_L   0x01b8
> +#define REG_I_INCLK_FREQ_H   0x01ba
> +#define REG_I_USE_NPVI_CLOCKS0x01c6
> +#define REG_I_USE_NMIPI_CLOC

[PATCH 4/4] omap3isp: Fix memory leaks in initialization error paths

2011-09-22 Thread Laurent Pinchart
Make sure all modules init functions clean up after themselves in case
of error.

Signed-off-by: Laurent Pinchart 
Reported-by: Guennadi Liakhovetski 
---
 drivers/media/video/omap3isp/ispccdc.c|   19 ---
 drivers/media/video/omap3isp/ispccp2.c|   22 +-
 drivers/media/video/omap3isp/ispcsi2.c|   15 +--
 drivers/media/video/omap3isp/isppreview.c |   27 +--
 drivers/media/video/omap3isp/ispresizer.c |   27 +--
 drivers/media/video/omap3isp/ispstat.c|   11 ++-
 6 files changed, 74 insertions(+), 47 deletions(-)

diff --git a/drivers/media/video/omap3isp/ispccdc.c 
b/drivers/media/video/omap3isp/ispccdc.c
index 0a68207..329085c 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -,15 +,21 @@ static int ccdc_init_entities(struct isp_ccdc_device 
*ccdc)
 
ret = omap3isp_video_init(&ccdc->video_out, "CCDC");
if (ret < 0)
-   return ret;
+   goto error_video;
 
/* Connect the CCDC subdev to the video node. */
ret = media_entity_create_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF,
&ccdc->video_out.video.entity, 0, 0);
if (ret < 0)
-   return ret;
+   goto error_link;
 
return 0;
+
+error_link:
+   omap3isp_video_cleanup(&ccdc->video_out);
+error_video:
+   media_entity_cleanup(me);
+   return ret;
 }
 
 /*
@@ -2244,6 +2250,7 @@ static int ccdc_init_entities(struct isp_ccdc_device 
*ccdc)
 int omap3isp_ccdc_init(struct isp_device *isp)
 {
struct isp_ccdc_device *ccdc = &isp->isp_ccdc;
+   int ret;
 
spin_lock_init(&ccdc->lock);
init_waitqueue_head(&ccdc->wait);
@@ -2272,7 +2279,13 @@ int omap3isp_ccdc_init(struct isp_device *isp)
ccdc->update = OMAP3ISP_CCDC_BLCLAMP;
ccdc_apply_controls(ccdc);
 
-   return ccdc_init_entities(ccdc);
+   ret = ccdc_init_entities(ccdc);
+   if (ret < 0) {
+   mutex_destroy(&ccdc->ioctl_lock);
+   return ret;
+   }
+
+   return 0;
 }
 
 /*
diff --git a/drivers/media/video/omap3isp/ispccp2.c 
b/drivers/media/video/omap3isp/ispccp2.c
index 883a282..904ca8c 100644
--- a/drivers/media/video/omap3isp/ispccp2.c
+++ b/drivers/media/video/omap3isp/ispccp2.c
@@ -1125,15 +1125,21 @@ static int ccp2_init_entities(struct isp_ccp2_device 
*ccp2)
 
ret = omap3isp_video_init(&ccp2->video_in, "CCP2");
if (ret < 0)
-   return ret;
+   goto error_video;
 
/* Connect the video node to the ccp2 subdev. */
ret = media_entity_create_link(&ccp2->video_in.video.entity, 0,
   &ccp2->subdev.entity, CCP2_PAD_SINK, 0);
if (ret < 0)
-   return ret;
+   goto error_link;
 
return 0;
+
+error_link:
+   omap3isp_video_cleanup(&ccp2->video_in);
+error_video:
+   media_entity_cleanup(&ccp2->subdev.entity);
+   return ret;
 }
 
 /*
@@ -1171,15 +1177,13 @@ int omap3isp_ccp2_init(struct isp_device *isp)
}
 
ret = ccp2_init_entities(ccp2);
-   if (ret < 0)
-   goto out;
+   if (ret < 0) {
+   regulator_put(ccp2->vdds_csib);
+   return ret;
+   }
 
ccp2_reset(ccp2);
-out:
-   if (ret)
-   omap3isp_ccp2_cleanup(isp);
-
-   return ret;
+   return 0;
 }
 
 /*
diff --git a/drivers/media/video/omap3isp/ispcsi2.c 
b/drivers/media/video/omap3isp/ispcsi2.c
index 2c9bffc..0c5f1cb 100644
--- a/drivers/media/video/omap3isp/ispcsi2.c
+++ b/drivers/media/video/omap3isp/ispcsi2.c
@@ -1259,15 +1259,21 @@ static int csi2_init_entities(struct isp_csi2_device 
*csi2)
 
ret = omap3isp_video_init(&csi2->video_out, "CSI2a");
if (ret < 0)
-   return ret;
+   goto error_video;
 
/* Connect the CSI2 subdev to the video node. */
ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE,
   &csi2->video_out.video.entity, 0, 0);
if (ret < 0)
-   return ret;
+   goto error_link;
 
return 0;
+
+error_link:
+   omap3isp_video_cleanup(&csi2->video_out);
+error_video:
+   media_entity_cleanup(&csi2->subdev.entity);
+   return ret;
 }
 
 /*
@@ -1289,7 +1295,7 @@ int omap3isp_csi2_init(struct isp_device *isp)
 
ret = csi2_init_entities(csi2a);
if (ret < 0)
-   goto fail;
+   return ret;
 
if (isp->revision == ISP_REVISION_15_0) {
csi2c->isp = isp;
@@ -1302,9 +1308,6 @@ int omap3isp_csi2_init(struct isp_device *isp)
}
 
return 0;
-fail:
-   omap3isp_csi2_cleanup(isp);
-   return ret;
 }
 
 /*
diff --git a/drivers/media/video/omap3isp/isppreview.c 
b/drivers/media/video/omap3isp/isppreview.c
index 

[PATCH 2/4] omap3isp: Move *_init_entities() functions to the init/cleanup section

2011-09-22 Thread Laurent Pinchart
Group all init/cleanup functions together to make the code more
readable.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/video/omap3isp/ispccdc.c|   62 
 drivers/media/video/omap3isp/ispccp2.c|  112 ++--
 drivers/media/video/omap3isp/ispcsi2.c|   84 +++---
 drivers/media/video/omap3isp/isppreview.c |   94 
 drivers/media/video/omap3isp/ispresizer.c |   90 
 drivers/media/video/omap3isp/ispstat.c|   36 +-
 6 files changed, 239 insertions(+), 239 deletions(-)

diff --git a/drivers/media/video/omap3isp/ispccdc.c 
b/drivers/media/video/omap3isp/ispccdc.c
index 4e4bf48..9ed4d8a 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2150,6 +2150,37 @@ static const struct media_entity_operations 
ccdc_media_ops = {
.link_setup = ccdc_link_setup,
 };
 
+void omap3isp_ccdc_unregister_entities(struct isp_ccdc_device *ccdc)
+{
+   v4l2_device_unregister_subdev(&ccdc->subdev);
+   omap3isp_video_unregister(&ccdc->video_out);
+}
+
+int omap3isp_ccdc_register_entities(struct isp_ccdc_device *ccdc,
+   struct v4l2_device *vdev)
+{
+   int ret;
+
+   /* Register the subdev and video node. */
+   ret = v4l2_device_register_subdev(vdev, &ccdc->subdev);
+   if (ret < 0)
+   goto error;
+
+   ret = omap3isp_video_register(&ccdc->video_out, vdev);
+   if (ret < 0)
+   goto error;
+
+   return 0;
+
+error:
+   omap3isp_ccdc_unregister_entities(ccdc);
+   return ret;
+}
+
+/* 
-
+ * ISP CCDC initialisation and cleanup
+ */
+
 /*
  * ccdc_init_entities - Initialize V4L2 subdev and media entity
  * @ccdc: ISP CCDC module
@@ -2202,37 +2233,6 @@ static int ccdc_init_entities(struct isp_ccdc_device 
*ccdc)
return 0;
 }
 
-void omap3isp_ccdc_unregister_entities(struct isp_ccdc_device *ccdc)
-{
-   v4l2_device_unregister_subdev(&ccdc->subdev);
-   omap3isp_video_unregister(&ccdc->video_out);
-}
-
-int omap3isp_ccdc_register_entities(struct isp_ccdc_device *ccdc,
-   struct v4l2_device *vdev)
-{
-   int ret;
-
-   /* Register the subdev and video node. */
-   ret = v4l2_device_register_subdev(vdev, &ccdc->subdev);
-   if (ret < 0)
-   goto error;
-
-   ret = omap3isp_video_register(&ccdc->video_out, vdev);
-   if (ret < 0)
-   goto error;
-
-   return 0;
-
-error:
-   omap3isp_ccdc_unregister_entities(ccdc);
-   return ret;
-}
-
-/* 
-
- * ISP CCDC initialisation and cleanup
- */
-
 /*
  * omap3isp_ccdc_init - CCDC module initialization.
  * @dev: Device pointer specific to the OMAP3 ISP.
diff --git a/drivers/media/video/omap3isp/ispccp2.c 
b/drivers/media/video/omap3isp/ispccp2.c
index b8e0863..883a282 100644
--- a/drivers/media/video/omap3isp/ispccp2.c
+++ b/drivers/media/video/omap3isp/ispccp2.c
@@ -1032,6 +1032,48 @@ static const struct media_entity_operations 
ccp2_media_ops = {
 };
 
 /*
+ * omap3isp_ccp2_unregister_entities - Unregister media entities: subdev
+ * @ccp2: Pointer to ISP CCP2 device
+ */
+void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2)
+{
+   v4l2_device_unregister_subdev(&ccp2->subdev);
+   omap3isp_video_unregister(&ccp2->video_in);
+}
+
+/*
+ * omap3isp_ccp2_register_entities - Register the subdev media entity
+ * @ccp2: Pointer to ISP CCP2 device
+ * @vdev: Pointer to v4l device
+ * return negative error code or zero on success
+ */
+
+int omap3isp_ccp2_register_entities(struct isp_ccp2_device *ccp2,
+   struct v4l2_device *vdev)
+{
+   int ret;
+
+   /* Register the subdev and video nodes. */
+   ret = v4l2_device_register_subdev(vdev, &ccp2->subdev);
+   if (ret < 0)
+   goto error;
+
+   ret = omap3isp_video_register(&ccp2->video_in, vdev);
+   if (ret < 0)
+   goto error;
+
+   return 0;
+
+error:
+   omap3isp_ccp2_unregister_entities(ccp2);
+   return ret;
+}
+
+/* 
-
+ * ISP ccp2 initialisation and cleanup
+ */
+
+/*
  * ccp2_init_entities - Initialize ccp2 subdev and media entity.
  * @ccp2: Pointer to ISP CCP2 device
  * return negative error code or zero on success
@@ -1095,62 +1137,6 @@ static int ccp2_init_entities(struct isp_ccp2_device 
*ccp2)
 }
 
 /*
- * omap3isp_ccp2_unregister_entities - Unregister media entities: subdev
- * @ccp2: Pointer to ISP CCP2 device
- */
-void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2)
-{
-   v4l2_device_unregister_subdev(&ccp2->subdev);
-   omap3isp_video_unregister(&ccp2->video_in);
-}
-
-/*
- * omap3isp_ccp2_register_entities - Register the subdev media entity
- 

[PATCH 3/4] omap3isp: Add missing mutex_destroy() calls

2011-09-22 Thread Laurent Pinchart
Mutexes must be destroyed with mutex_destroy(). Add missing calls in the
modules cleanup handlers.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/video/omap3isp/isp.c  |2 ++
 drivers/media/video/omap3isp/ispccdc.c  |2 ++
 drivers/media/video/omap3isp/ispstat.c  |1 +
 drivers/media/video/omap3isp/ispvideo.c |2 ++
 4 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap3isp/isp.c 
b/drivers/media/video/omap3isp/isp.c
index fda4be0..7b5ab42 100644
--- a/drivers/media/video/omap3isp/isp.c
+++ b/drivers/media/video/omap3isp/isp.c
@@ -2183,6 +2183,8 @@ error:
regulator_put(isp->isp_csiphy2.vdd);
regulator_put(isp->isp_csiphy1.vdd);
platform_set_drvdata(pdev, NULL);
+
+   mutex_destroy(&isp->isp_mutex);
kfree(isp);
 
return ret;
diff --git a/drivers/media/video/omap3isp/ispccdc.c 
b/drivers/media/video/omap3isp/ispccdc.c
index 9ed4d8a..0a68207 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2295,4 +2295,6 @@ void omap3isp_ccdc_cleanup(struct isp_device *isp)
 
if (ccdc->fpc.fpcaddr != 0)
iommu_vfree(isp->iommu, ccdc->fpc.fpcaddr);
+
+   mutex_destroy(&ccdc->ioctl_lock);
 }
diff --git a/drivers/media/video/omap3isp/ispstat.c 
b/drivers/media/video/omap3isp/ispstat.c
index 253b32f..786f9b0 100644
--- a/drivers/media/video/omap3isp/ispstat.c
+++ b/drivers/media/video/omap3isp/ispstat.c
@@ -1086,6 +1086,7 @@ int omap3isp_stat_init(struct ispstat *stat, const char 
*name,
 void omap3isp_stat_cleanup(struct ispstat *stat)
 {
media_entity_cleanup(&stat->subdev.entity);
+   mutex_destroy(&stat->ioctl_lock);
isp_stat_bufs_free(stat);
kfree(stat->buf);
 }
diff --git a/drivers/media/video/omap3isp/ispvideo.c 
b/drivers/media/video/omap3isp/ispvideo.c
index 910c745..927d496 100644
--- a/drivers/media/video/omap3isp/ispvideo.c
+++ b/drivers/media/video/omap3isp/ispvideo.c
@@ -1328,6 +1328,8 @@ int omap3isp_video_init(struct isp_video *video, const 
char *name)
 void omap3isp_video_cleanup(struct isp_video *video)
 {
media_entity_cleanup(&video->video.entity);
+   mutex_destroy(&video->stream_lock);
+   mutex_destroy(&video->mutex);
 }
 
 int omap3isp_video_register(struct isp_video *video, struct v4l2_device *vdev)
-- 
1.7.3.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


[PATCH 1/4] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()

2011-09-22 Thread Laurent Pinchart
The media_entity_cleanup() function belong to the module cleanup
handlers, not the entity registration handlers. Move it there.

Create a omap3isp_video_cleanup() function to cleanup the video node
entity, and call it from the module cleanup handlers.

Rename omap3isp_stat_free() to omap3isp_stat_cleanup().

Signed-off-by: Laurent Pinchart 
---
 drivers/media/video/omap3isp/ispccdc.c |5 +++--
 drivers/media/video/omap3isp/ispccp2.c |5 +++--
 drivers/media/video/omap3isp/ispcsi2.c |6 --
 drivers/media/video/omap3isp/isph3a_aewb.c |2 +-
 drivers/media/video/omap3isp/isph3a_af.c   |2 +-
 drivers/media/video/omap3isp/isphist.c |2 +-
 drivers/media/video/omap3isp/isppreview.c  |9 ++---
 drivers/media/video/omap3isp/ispresizer.c  |7 +--
 drivers/media/video/omap3isp/ispstat.c |4 ++--
 drivers/media/video/omap3isp/ispstat.h |2 +-
 drivers/media/video/omap3isp/ispvideo.c|9 ++---
 drivers/media/video/omap3isp/ispvideo.h|1 +
 12 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/drivers/media/video/omap3isp/ispccdc.c 
b/drivers/media/video/omap3isp/ispccdc.c
index 40b141c..4e4bf48 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -2204,8 +2204,6 @@ static int ccdc_init_entities(struct isp_ccdc_device 
*ccdc)
 
 void omap3isp_ccdc_unregister_entities(struct isp_ccdc_device *ccdc)
 {
-   media_entity_cleanup(&ccdc->subdev.entity);
-
v4l2_device_unregister_subdev(&ccdc->subdev);
omap3isp_video_unregister(&ccdc->video_out);
 }
@@ -2285,6 +2283,9 @@ void omap3isp_ccdc_cleanup(struct isp_device *isp)
 {
struct isp_ccdc_device *ccdc = &isp->isp_ccdc;
 
+   omap3isp_video_cleanup(&ccdc->video_out);
+   media_entity_cleanup(&ccdc->subdev.entity);
+
/* Free LSC requests. As the CCDC is stopped there's no active request,
 * so only the pending request and the free queue need to be handled.
 */
diff --git a/drivers/media/video/omap3isp/ispccp2.c 
b/drivers/media/video/omap3isp/ispccp2.c
index fa1d09b..b8e0863 100644
--- a/drivers/media/video/omap3isp/ispccp2.c
+++ b/drivers/media/video/omap3isp/ispccp2.c
@@ -1100,8 +1100,6 @@ static int ccp2_init_entities(struct isp_ccp2_device 
*ccp2)
  */
 void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2)
 {
-   media_entity_cleanup(&ccp2->subdev.entity);
-
v4l2_device_unregister_subdev(&ccp2->subdev);
omap3isp_video_unregister(&ccp2->video_in);
 }
@@ -1146,6 +1144,9 @@ void omap3isp_ccp2_cleanup(struct isp_device *isp)
 {
struct isp_ccp2_device *ccp2 = &isp->isp_ccp2;
 
+   omap3isp_video_cleanup(&ccp2->video_in);
+   media_entity_cleanup(&ccp2->subdev.entity);
+
regulator_put(ccp2->vdds_csib);
 }
 
diff --git a/drivers/media/video/omap3isp/ispcsi2.c 
b/drivers/media/video/omap3isp/ispcsi2.c
index 69161a6..5612e95 100644
--- a/drivers/media/video/omap3isp/ispcsi2.c
+++ b/drivers/media/video/omap3isp/ispcsi2.c
@@ -1241,8 +1241,6 @@ static int csi2_init_entities(struct isp_csi2_device 
*csi2)
 
 void omap3isp_csi2_unregister_entities(struct isp_csi2_device *csi2)
 {
-   media_entity_cleanup(&csi2->subdev.entity);
-
v4l2_device_unregister_subdev(&csi2->subdev);
omap3isp_video_unregister(&csi2->video_out);
 }
@@ -1277,6 +1275,10 @@ error:
  */
 void omap3isp_csi2_cleanup(struct isp_device *isp)
 {
+   struct isp_csi2_device *csi2a = &isp->isp_csi2a;
+
+   omap3isp_video_cleanup(&csi2a->video_out);
+   media_entity_cleanup(&csi2a->subdev.entity);
 }
 
 /*
diff --git a/drivers/media/video/omap3isp/isph3a_aewb.c 
b/drivers/media/video/omap3isp/isph3a_aewb.c
index 8068cef..a3c76bf 100644
--- a/drivers/media/video/omap3isp/isph3a_aewb.c
+++ b/drivers/media/video/omap3isp/isph3a_aewb.c
@@ -370,5 +370,5 @@ void omap3isp_h3a_aewb_cleanup(struct isp_device *isp)
 {
kfree(isp->isp_aewb.priv);
kfree(isp->isp_aewb.recover_priv);
-   omap3isp_stat_free(&isp->isp_aewb);
+   omap3isp_stat_cleanup(&isp->isp_aewb);
 }
diff --git a/drivers/media/video/omap3isp/isph3a_af.c 
b/drivers/media/video/omap3isp/isph3a_af.c
index ba54d0a..58e0bc4 100644
--- a/drivers/media/video/omap3isp/isph3a_af.c
+++ b/drivers/media/video/omap3isp/isph3a_af.c
@@ -425,5 +425,5 @@ void omap3isp_h3a_af_cleanup(struct isp_device *isp)
 {
kfree(isp->isp_af.priv);
kfree(isp->isp_af.recover_priv);
-   omap3isp_stat_free(&isp->isp_af);
+   omap3isp_stat_cleanup(&isp->isp_af);
 }
diff --git a/drivers/media/video/omap3isp/isphist.c 
b/drivers/media/video/omap3isp/isphist.c
index 1743856..1163907 100644
--- a/drivers/media/video/omap3isp/isphist.c
+++ b/drivers/media/video/omap3isp/isphist.c
@@ -516,5 +516,5 @@ void omap3isp_hist_cleanup(struct isp_device *isp)
if (HIST_USING_DMA(&isp->isp_hist))
omap_free_dma(isp->isp_hist.dma_ch);
kfree(isp->isp_hist.priv);
-

[PATCH 0/4] OMAP3 ISP memory leaks fix in error paths

2011-09-22 Thread Laurent Pinchart
Hi everybody,

Guennadi reported that the OMAP3 ISP driver was missing clean up in init
functions error paths. These 4 patches attempt to address the issue. Guennadi,
as you reported the problem, could you be so kind to check whether the patches
fix it ? :-)

Laurent Pinchart (4):
  omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
  omap3isp: Move *_init_entities() functions to the init/cleanup
section
  omap3isp: Add missing mutex_destroy() calls
  omap3isp: Fix memory leaks in initialization error paths

 drivers/media/video/omap3isp/isp.c |2 +
 drivers/media/video/omap3isp/ispccdc.c |   84 +++
 drivers/media/video/omap3isp/ispccp2.c |  125 ++-
 drivers/media/video/omap3isp/ispcsi2.c |   91 +++--
 drivers/media/video/omap3isp/isph3a_aewb.c |2 +-
 drivers/media/video/omap3isp/isph3a_af.c   |2 +-
 drivers/media/video/omap3isp/isphist.c |2 +-
 drivers/media/video/omap3isp/isppreview.c  |  108 
 drivers/media/video/omap3isp/ispresizer.c  |  104 ---
 drivers/media/video/omap3isp/ispstat.c |   52 +++-
 drivers/media/video/omap3isp/ispstat.h |2 +-
 drivers/media/video/omap3isp/ispvideo.c|   11 ++-
 drivers/media/video/omap3isp/ispvideo.h|1 +
 13 files changed, 317 insertions(+), 269 deletions(-)

-- 
Regards

Laurent Pinchart

--
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: WARNINGS

2011-09-22 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:Thu Sep 22 19:00:18 CEST 2011
git hash:e553000a14ead0e265a8aa4d241c7b3221e233e3
gcc version:  i686-linux-gcc (GCC) 4.6.1
host hardware:x86_64
host os:  3.0-4.slh.3-amd64

linux-git-armv5: WARNINGS
linux-git-armv5-davinci: WARNINGS
linux-git-armv5-ixp: WARNINGS
linux-git-armv5-omap2: WARNINGS
linux-git-i686: WARNINGS
linux-git-m32r: OK
linux-git-mips: WARNINGS
linux-git-powerpc64: WARNINGS
linux-git-x86_64: WARNINGS
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: WARNINGS
linux-2.6.33-i686: WARNINGS
linux-2.6.34-i686: WARNINGS
linux-2.6.35.3-i686: WARNINGS
linux-2.6.36-i686: WARNINGS
linux-2.6.37-i686: WARNINGS
linux-2.6.38.2-i686: WARNINGS
linux-2.6.39.1-i686: WARNINGS
linux-3.0-i686: WARNINGS
linux-3.1-rc1-i686: WARNINGS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: WARNINGS
linux-2.6.33-x86_64: WARNINGS
linux-2.6.34-x86_64: WARNINGS
linux-2.6.35.3-x86_64: WARNINGS
linux-2.6.36-x86_64: WARNINGS
linux-2.6.37-x86_64: WARNINGS
linux-2.6.38.2-x86_64: WARNINGS
linux-2.6.39.1-x86_64: WARNINGS
linux-3.0-x86_64: WARNINGS
linux-3.1-rc1-x86_64: WARNINGS
spec-git: WARNINGS
sparse: ERRORS

Detailed results are available here:

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

Full logs are available here:

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

The V4L-DVB specification 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


Re: [PATCH v4 1/2] v4l2: Add polarity flag definitons for parallel bus FIELD signal

2011-09-22 Thread Laurent Pinchart
Hi Sylwester,

Thanks for the patch.

On Thursday 22 September 2011 18:42:30 Sylwester Nawrocki wrote:
> FIELD signal is used for indicating frame field type to the frame grabber
> in interlaced scan mode, as specified in ITU-R BT.601 standard.
> In normal operation mode FIELD = 0 selects Field1 (odd) and FIELD = 1
> selects Field2 (even). When the FIELD signal is inverted it's the other
> way around.
> 
> Add corresponding flags for configuring the FIELD signal polarity,
> V4L2_MBUS_FIELD_EVEN_HIGH for the standard (non-inverted) case and
> V4L2_MBUS_FIELD_EVEN_LOW for inverted case.
> 
> Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for
> the hardware that uses [HV]REF signals.
> 
> Signed-off-by: Sylwester Nawrocki 
> Signed-off-by: Kyungmin Park 

Acked-by: Laurent Pinchart 

> ---
>  include/media/v4l2-mediabus.h |   12 ++--
>  1 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
> index 6114007..83ae07e 100644
> --- a/include/media/v4l2-mediabus.h
> +++ b/include/media/v4l2-mediabus.h
> @@ -22,8 +22,12 @@
>   */
>  #define V4L2_MBUS_MASTER (1 << 0)
>  #define V4L2_MBUS_SLAVE  (1 << 1)
> -/* Which signal polarities it supports */
> -/* Note: in BT.656 mode HSYNC and VSYNC are unused */
> +/*
> + * Signal polarity flags
> + * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused
> + * V4L2_MBUS_[HV]SYNC* flags should be also used for specifying
> + * configuration of hardware that uses [HV]REF signals
> + */
>  #define V4L2_MBUS_HSYNC_ACTIVE_HIGH  (1 << 2)
>  #define V4L2_MBUS_HSYNC_ACTIVE_LOW   (1 << 3)
>  #define V4L2_MBUS_VSYNC_ACTIVE_HIGH  (1 << 4)
> @@ -32,6 +36,10 @@
>  #define V4L2_MBUS_PCLK_SAMPLE_FALLING(1 << 7)
>  #define V4L2_MBUS_DATA_ACTIVE_HIGH   (1 << 8)
>  #define V4L2_MBUS_DATA_ACTIVE_LOW(1 << 9)
> +/* FIELD = 0/1 - Field1 (odd)/Field2 (even) */
> +#define V4L2_MBUS_FIELD_EVEN_HIGH(1 << 10)
> +/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
> +#define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11)
> 
>  /* Serial flags */
>  /* How many lanes the client can use */

-- 
Regards,

Laurent Pinchart
--
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 v4 2/2] s5p-fimc: Convert to use generic media bus polarity flags

2011-09-22 Thread Sylwester Nawrocki
Switch to generic media bus signal polarity flags and allow
configuring the FIELD signal polarity.

Signed-off-by: Sylwester Nawrocki 
Signed-off-by: Kyungmin Park 
---
 drivers/media/video/s5p-fimc/fimc-reg.c  |   14 +-
 drivers/media/video/s5p-fimc/regs-fimc.h |1 +
 include/media/s5p_fimc.h |7 +--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c 
b/drivers/media/video/s5p-fimc/fimc-reg.c
index 2a1ae51..20e664e 100644
--- a/drivers/media/video/s5p-fimc/fimc-reg.c
+++ b/drivers/media/video/s5p-fimc/fimc-reg.c
@@ -533,20 +533,24 @@ int fimc_hw_set_camera_polarity(struct fimc_dev *fimc,
u32 cfg = readl(fimc->regs + S5P_CIGCTRL);
 
cfg &= ~(S5P_CIGCTRL_INVPOLPCLK | S5P_CIGCTRL_INVPOLVSYNC |
-S5P_CIGCTRL_INVPOLHREF | S5P_CIGCTRL_INVPOLHSYNC);
+S5P_CIGCTRL_INVPOLHREF | S5P_CIGCTRL_INVPOLHSYNC |
+S5P_CIGCTRL_INVPOLFIELD);
 
-   if (cam->flags & FIMC_CLK_INV_PCLK)
+   if (cam->flags & V4L2_MBUS_PCLK_SAMPLE_FALLING)
cfg |= S5P_CIGCTRL_INVPOLPCLK;
 
-   if (cam->flags & FIMC_CLK_INV_VSYNC)
+   if (cam->flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
cfg |= S5P_CIGCTRL_INVPOLVSYNC;
 
-   if (cam->flags & FIMC_CLK_INV_HREF)
+   if (cam->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
cfg |= S5P_CIGCTRL_INVPOLHREF;
 
-   if (cam->flags & FIMC_CLK_INV_HSYNC)
+   if (cam->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
cfg |= S5P_CIGCTRL_INVPOLHSYNC;
 
+   if (cam->flags & V4L2_MBUS_FIELD_EVEN_LOW)
+   cfg |= S5P_CIGCTRL_INVPOLFIELD;
+
writel(cfg, fimc->regs + S5P_CIGCTRL);
 
return 0;
diff --git a/drivers/media/video/s5p-fimc/regs-fimc.h 
b/drivers/media/video/s5p-fimc/regs-fimc.h
index 94d2302..c8e3b94 100644
--- a/drivers/media/video/s5p-fimc/regs-fimc.h
+++ b/drivers/media/video/s5p-fimc/regs-fimc.h
@@ -61,6 +61,7 @@
 #define S5P_CIGCTRL_CSC_ITU601_709 (1 << 5)
 #define S5P_CIGCTRL_INVPOLHSYNC(1 << 4)
 #define S5P_CIGCTRL_SELCAM_MIPI(1 << 3)
+#define S5P_CIGCTRL_INVPOLFIELD(1 << 1)
 #define S5P_CIGCTRL_INTERLACE  (1 << 0)
 
 /* Window offset 2 */
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index 2b58904..688fb3f 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -19,11 +19,6 @@ enum cam_bus_type {
FIMC_LCD_WB, /* FIFO link from LCD mixer */
 };
 
-#define FIMC_CLK_INV_PCLK  (1 << 0)
-#define FIMC_CLK_INV_VSYNC (1 << 1)
-#define FIMC_CLK_INV_HREF  (1 << 2)
-#define FIMC_CLK_INV_HSYNC (1 << 3)
-
 struct i2c_board_info;
 
 /**
@@ -37,7 +32,7 @@ struct i2c_board_info;
  * @i2c_bus_num: i2c control bus id the sensor is attached to
  * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
  * @clk_id: index of the SoC peripheral clock for sensors
- * @flags: flags defining bus signals polarity inversion (High by default)
+ * @flags: the parallel bus flags defining signals polarity (V4L2_MBUS_*)
  */
 struct s5p_fimc_isp_info {
struct i2c_board_info *board_info;
-- 
1.7.6.3

--
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 v4 1/2] v4l2: Add polarity flag definitons for parallel bus FIELD signal

2011-09-22 Thread Sylwester Nawrocki
FIELD signal is used for indicating frame field type to the frame grabber
in interlaced scan mode, as specified in ITU-R BT.601 standard.
In normal operation mode FIELD = 0 selects Field1 (odd) and FIELD = 1
selects Field2 (even). When the FIELD signal is inverted it's the other
way around.

Add corresponding flags for configuring the FIELD signal polarity,
V4L2_MBUS_FIELD_EVEN_HIGH for the standard (non-inverted) case and
V4L2_MBUS_FIELD_EVEN_LOW for inverted case.

Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for
the hardware that uses [HV]REF signals.

Signed-off-by: Sylwester Nawrocki 
Signed-off-by: Kyungmin Park 
---
 include/media/v4l2-mediabus.h |   12 ++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 6114007..83ae07e 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -22,8 +22,12 @@
  */
 #define V4L2_MBUS_MASTER   (1 << 0)
 #define V4L2_MBUS_SLAVE(1 << 1)
-/* Which signal polarities it supports */
-/* Note: in BT.656 mode HSYNC and VSYNC are unused */
+/*
+ * Signal polarity flags
+ * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused
+ * V4L2_MBUS_[HV]SYNC* flags should be also used for specifying
+ * configuration of hardware that uses [HV]REF signals
+ */
 #define V4L2_MBUS_HSYNC_ACTIVE_HIGH(1 << 2)
 #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3)
 #define V4L2_MBUS_VSYNC_ACTIVE_HIGH(1 << 4)
@@ -32,6 +36,10 @@
 #define V4L2_MBUS_PCLK_SAMPLE_FALLING  (1 << 7)
 #define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8)
 #define V4L2_MBUS_DATA_ACTIVE_LOW  (1 << 9)
+/* FIELD = 0/1 - Field1 (odd)/Field2 (even) */
+#define V4L2_MBUS_FIELD_EVEN_HIGH  (1 << 10)
+/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
+#define V4L2_MBUS_FIELD_EVEN_LOW   (1 << 11)
 
 /* Serial flags */
 /* How many lanes the client can use */
-- 
1.7.6.3

--
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 v4 0/2] v4l: Add media bus FIELD signal polarity flags

2011-09-22 Thread Sylwester Nawrocki
Hi all,

This is an updated version of the change set adding support for FIELD signal
polarity configuration through the parallel media bus flags.
The second patch just converts s5p-fimc driver to use generic flags.

If there is no further comments I'd like to send Mauro a pull request for these
patches.

Changes since v1:
 - dropped V4L2_MBUS_HREF* definitions, added comment on usage of
   V4L2_MBUS_[HV]SYNC* flags for [HV]REF signals
 - added V4L2_MBUS_FIELD*
 - modified the second patch to use HSYNC flags only

Changes since v2/3:
 - renamed V4L2_MBUS_FIELD_ACTIVE_[HIGH/LOW] to V4L2_MBUS_FIELD_EVEN_[HIGH/LOW]
   and updated the comments

Sylwester Nawrocki (2):
  v4l2: Add polarity flag definitons for parallel bus FIELD signal
  s5p-fimc: Convert to use generic media bus polarity flags

 drivers/media/video/s5p-fimc/fimc-reg.c  |   14 +-
 drivers/media/video/s5p-fimc/regs-fimc.h |1 +
 include/media/s5p_fimc.h |7 +--
 include/media/v4l2-mediabus.h|   12 ++--
 4 files changed, 21 insertions(+), 13 deletions(-)


Thanks,
--
Sylwester Nawrocki
Samsung Poland R&D Center
--
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


Soft lockup in mb86a16_search()

2011-09-22 Thread David Howells

My mythtv receiver machine crashes when I start mythbackend with a soft lockup
warning in mb86a16_search().  Shortly thereafter the machine becomes
unresponsive and has to be reset.  Relevant highlights of dmesg attached
below.

The kernel is Fedora 15's kernel-2.6.40.4-5.fc15.x86_64.

David
---
IR Sony protocol handler initialized
dib0700: loaded with support for 20 different device-types
dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T)
lirc_dev: IR Remote Control driver registered, major 250 
IR LIRC bridge handler initialized
DVB: registering adapter 1 frontend 0 (DiBcom 3000MC/P)...
MT2060: successfully identified (IF1 = 1257)
DVB: registering adapter 0 frontend 0 (Fujitsu MB86A16 DVB-S)...
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T)
DVB: registering adapter 2 frontend 0 (DiBcom 3000MC/P)...
MT2060: successfully identified (IF1 = 1243)
input: IR-receiver inside an USB DVB receiver as 
/devices/pci:00/:00:1e.0/:05:00.2/usb3/3-1/rc/rc0/input3
rc0: IR-receiver inside an USB DVB receiver as 
/devices/pci:00/:00:1e.0/:05:00.2/usb3/3-1/rc/rc0
dvb-usb: schedule remote query interval to 50 msecs.
dvb-usb: Hauppauge Nova-T 500 Dual DVB-T successfully initialized and connected.
dib0700: rc submit urb failed

usbcore: registered new interface driver dvb_usb_dib0700
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_write: writing to [0x08],Reg[0x16],Data[0x80]
mb86a16_write: writing to [0x08],Reg[0x1e],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x20],Data[0x04]
mb86a16_set_fe: freq=0 Mhz, symbrt=0 Ksps
mb86a16_write: writing to [0x08],Reg[0x32],Data[0x02]
mb86a16_write: writing to [0x08],Reg[0x06],Data[0xdf]
mb86a16_write: writing to [0x08],Reg[0x0a],Data[0x3d]
mb86a16_write: writing to [0x08],Reg[0x2b],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x2c],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x58],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x59],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x08],Data[0x16]
mb86a16_write: writing to [0x08],Reg[0x2f],Data[0x21]
mb86a16_write: writing to [0x08],Reg[0x39],Data[0x38]
mb86a16_write: writing to [0x08],Reg[0x3d],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x3e],Data[0x1c]
mb86a16_write: writing to [0x08],Reg[0x3f],Data[0x20]
mb86a16_write: writing to [0x08],Reg[0x40],Data[0x1e]
mb86a16_write: writing to [0x08],Reg[0x41],Data[0x23]
mb86a16_write: writing to [0x08],Reg[0x54],Data[0xff]
mb86a16_write: writing to [0x08],Reg[0x00],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x2d],Data[0x1a]
mb86a16_write: writing to [0x08],Reg[0x49],Data[0x7a]
mb86a16_write: writing to [0x08],Reg[0x2a],Data[0x26]
mb86a16_write: writing to [0x08],Reg[0x36],Data[0x06]
mb86a16_write: writing to [0x08],Reg[0x33],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x03],Data[0x17]
mb86a16_write: writing to [0x08],Reg[0x04],Data[0x00]
mb86a16_write: writing to [0x08],Reg[0x05],Data[0x00]
BUG: soft lockup - CPU#1 stuck for 22s! [kdvb-ad-0-fe-0:2831]
Modules linked in: sunrpc cpufreq_ondemand acpi_cpufreq mperf w83627ehf 
hwmon_vid coretemp rc_dib0700_rc5 xfs mb86a16 mt2060 ir_lirc_codec lirc_dev 
dvb_usb_dib0700 dib7000p ir_sony_decoder dib0090 dib7000m dib0070 dvb_usb 
dib8000 dib9000 dib3000mc dibx000_common ir_jvc_decoder ir_rc6_decoder iTCO_wdt 
atl1e i2c_i801 iTCO_vendor_support ir_rc5_decoder microcode mantis mantis_core 
dvb_core ir_nec_decoder asus_atk0110 rc_core ipv6 pata_acpi ata_generic 
pata_jmicron nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core

Re: Patches at patchwork.linuxtv.org (127 patches)

2011-09-22 Thread Mauro Carvalho Chehab
Em 22-09-2011 12:26, Pawel Osciak escreveu:
> Hi Mauro,
> 
> On Wed, Sep 21, 2011 at 13:44, Mauro Carvalho Chehab  
> wrote:
>> Em 21-09-2011 17:40, Mauro Carvalho Chehab escreveu:
>>
>>== Waiting for Pawel Osiak  review ==
>>
>> Jul,14 2011: videobuf2: call buf_finish() on unprocessed buffers 
>>http://patchwork.linuxtv.org/patch/7443   Jonathan Corbet 
>> 
>>
> 
> Thanks for your work on this!

Anytime!

> This patch needs rework, waiting for Jon to submit v2, or I can submit
> it myself if he doesn't mind. 

Ok, marking it with "changes requested" status.

Btw, there is a typo in my e-mail
> address, should be pa...@osciak.com.

Yes, I noticed. Fixed on my script.

Thank you!
Mauro

--
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: cx231xx: DMA problem on ARM

2011-09-22 Thread Thomas Petazzoni
Le Thu, 22 Sep 2011 11:09:22 -0400,
Devin Heitmueller  a écrit :

> Ok, that is a good start.  I would definitely submit that as a patch
> (including your Signed-off-by line).

Sure, we will definitely do this.

> Regarding the outstanding issue, I believe I did see that and fixed
> it.  Please look the history for the various cx231xx files surrounding
> the time of the ".dont_use_port_3 = 1" fix.  If I recall, that patch
> was actually part of a series of two or three patches which were
> required for that device to work properly.  I believe the other patch
> needed included an extra 10ms msleep call to ensure the hardware is
> powered up fully before issuing certain i2c commands (which are what
> are causing the -71 errors).

I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a,
which ensures a 10ms msleep call. We don't have this patch, but as with
CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not
sure this patch will have a huge impact. But we will try.

Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it
doesn't seem to be related to our problem. But we will also try with
that one.

> If you cannot find it, let me know and I will dig around my archives
> and find it for you (I'm actually at work right now so it would be
> inopportune for me to do it right this minute).

 :-)

Thanks for your very quick feedback!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
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: Patches at patchwork.linuxtv.org (127 patches)

2011-09-22 Thread Pawel Osciak
Hi Mauro,

On Wed, Sep 21, 2011 at 13:44, Mauro Carvalho Chehab  wrote:
> Em 21-09-2011 17:40, Mauro Carvalho Chehab escreveu:
>
>                == Waiting for Pawel Osiak  review ==
>
> Jul,14 2011: videobuf2: call buf_finish() on unprocessed buffers              
>       http://patchwork.linuxtv.org/patch/7443   Jonathan Corbet 
> 
>

Thanks for your work on this!
This patch needs rework, waiting for Jon to submit v2, or I can submit
it myself if he doesn't mind. Btw, there is a typo in my e-mail
address, should be pa...@osciak.com.

-- 
Best regards,
Pawel Osciak
--
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


[GIT PULL] Selection API and fixes for v3.2

2011-09-22 Thread Marek Szyprowski
Hello Mauro,

I've collected pending selection API patches together with pending
videobuf2 and Samsung driver fixes to a single git branch. Please pull
them to your media tree.

Best regards,
Marek Szyprowski
Samsung Poland R&D Center

The following changes since commit 699cc1962c85351689c27dd46e598e4204fdd105:

  [media] TT-budget S2-3200 cannot tune on HB13E DVBS2 transponder (2011-09-21 
17:06:56 -0300)

are available in the git repository at:
  git://git.infradead.org/users/kmpark/linux-2.6-samsung for_mauro

Hatim Ali (1):
  s5p-tv: Add PM_RUNTIME dependency

Marek Szyprowski (1):
  staging: dt3155v4l: fix build break

Michael Olbrich (1):
  v4l: mem2mem: add wait_{prepare,finish} ops to m2m_testdev

Scott Jiang (1):
  vb2: add vb2_get_unmapped_area in vb2 core

Sylwester Nawrocki (1):
  m5mols: Remove superfluous irq field from the platform data struct

Tomasz Stanislawski (6):
  v4l: add support for selection api
  v4l: add documentation for selection API
  v4l: emulate old crop API using extended crop/compose API
  v4l: s5p-tv: mixer: add support for selection API
  s5p-tv: hdmi: use DVI mode
  s5p-tv: fix mbus configuration

 Documentation/DocBook/media/constraints.png.b64|  134 +
 Documentation/DocBook/media/selection.png.b64  | 2937 
 Documentation/DocBook/media/v4l/common.xml |4 +-
 Documentation/DocBook/media/v4l/selection-api.xml  |  278 ++
 Documentation/DocBook/media/v4l/v4l2.xml   |1 +
 .../DocBook/media/v4l/vidioc-g-selection.xml   |  281 ++
 drivers/media/video/m5mols/m5mols_core.c   |6 +-
 drivers/media/video/mem2mem_testdev.c  |   14 +
 drivers/media/video/s5p-tv/Kconfig |2 +-
 drivers/media/video/s5p-tv/hdmi_drv.c  |   15 +-
 drivers/media/video/s5p-tv/mixer.h |   14 +-
 drivers/media/video/s5p-tv/mixer_grp_layer.c   |  157 +-
 drivers/media/video/s5p-tv/mixer_reg.c |   11 +-
 drivers/media/video/s5p-tv/mixer_video.c   |  339 ++-
 drivers/media/video/s5p-tv/mixer_vp_layer.c|  108 +-
 drivers/media/video/s5p-tv/regs-hdmi.h |4 +
 drivers/media/video/s5p-tv/regs-mixer.h|1 +
 drivers/media/video/s5p-tv/sdo_drv.c   |1 +
 drivers/media/video/v4l2-compat-ioctl32.c  |2 +
 drivers/media/video/v4l2-ioctl.c   |  114 +-
 drivers/media/video/videobuf2-core.c   |   31 +
 drivers/staging/dt3155v4l/dt3155v4l.c  |4 +-
 include/linux/videodev2.h  |   46 +
 include/media/m5mols.h |4 +-
 include/media/v4l2-ioctl.h |4 +
 include/media/videobuf2-core.h |7 +
 26 files changed, 4292 insertions(+), 227 deletions(-)
 create mode 100644 Documentation/DocBook/media/constraints.png.b64
 create mode 100644 Documentation/DocBook/media/selection.png.b64
 create mode 100644 Documentation/DocBook/media/v4l/selection-api.xml
 create mode 100644 Documentation/DocBook/media/v4l/vidioc-g-selection.xml
--
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: cx231xx: DMA problem on ARM

2011-09-22 Thread Devin Heitmueller
On Thu, Sep 22, 2011 at 10:45 AM, Thomas Petazzoni
 wrote:
> Hello,
>
> Le Wed, 21 Sep 2011 08:04:52 -0400,
> Devin Heitmueller  a écrit :
>
>> I ran into the same issue on em28xx in the past (which is what those
>> parts of cx231xx are based on).  Yes, just adding
>> URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
>> try that out, and assuming it works feel free to submit a patch which
>> can be included upstream.
>
> So, we did try with URB_NO_TRANSFER_DMA_MAP, and now, we don't have the
> BUG_ON() assertion anymore, but instead a large set of error messages:
>
> [  325.856231] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  325.858398] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  325.860656] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  326.144073] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  326.151245] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
> [  326.151763] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
> [  396.907318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  396.912048] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  396.977355] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  396.987091] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  456.665252] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  456.675292] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  456.714508] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.718811] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.719635] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
> [  456.729522] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
> [  456.750427] cx231xx #0:  setPowerMode::mode = 48, No Change req.
> [  456.756317] cx231xx #0: cannot change alt number to 3 (error=-71)
> [  456.778625] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.782745] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.786987] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.791381] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.795501] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.795532] cx231xx #0: cx231xx_set_decoder_video_input: adjust_ref_count 
> :Failed to setAFE input mux - errCode [-71]!
> [  456.841491] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.845642] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.849792] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.854003] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.858123] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.862274] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.866394] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.870513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.875030] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.879150] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.883239] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.887390] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.891632] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.895751] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.83] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.904174] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.914825] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.919036] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.924499] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.936920] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.941131] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.946655] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.960144] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.968658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.984344] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  456.999572] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.004577] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.015014] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.019561] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.029083] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.033264] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.039031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
> [  457.043121] 

Re: cx231xx: DMA problem on ARM

2011-09-22 Thread Thomas Petazzoni
Hello,

Le Wed, 21 Sep 2011 08:04:52 -0400,
Devin Heitmueller  a écrit :

> I ran into the same issue on em28xx in the past (which is what those
> parts of cx231xx are based on).  Yes, just adding
> URB_NO_TRANSFER_DMA_MAP should result in it starting to work.  Please
> try that out, and assuming it works feel free to submit a patch which
> can be included upstream.

So, we did try with URB_NO_TRANSFER_DMA_MAP, and now, we don't have the
BUG_ON() assertion anymore, but instead a large set of error messages:

[  325.856231] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  325.858398] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  325.860656] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  326.144073] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  326.151245] cx231xx #0: cx231xx_initialize_stream_xfer: set video registers
[  326.151763] cx231xx #0: cx231xx_start_stream():: ep_mask = 8
[  396.907318] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  396.912048] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  396.977355] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  396.987091] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  456.665252] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  456.675292] cx231xx #0: cannot change alt number to 3 (error=-71)
[  456.714508] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.718811] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.719635] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8
[  456.729522] cx231xx #0: can't change interface 3 alt no. to 0 (err=-71)
[  456.750427] cx231xx #0:  setPowerMode::mode = 48, No Change req.
[  456.756317] cx231xx #0: cannot change alt number to 3 (error=-71)
[  456.778625] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.782745] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.786987] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.791381] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.795501] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.795532] cx231xx #0: cx231xx_set_decoder_video_input: adjust_ref_count 
:Failed to setAFE input mux - errCode [-71]!
[  456.841491] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.845642] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.849792] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.854003] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.858123] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.862274] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.866394] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.870513] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.875030] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.879150] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.883239] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.887390] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.891632] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.895751] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.83] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.904174] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.914825] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.919036] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.924499] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.936920] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.941131] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.946655] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.960144] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.968658] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.984344] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  456.999572] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.004577] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.015014] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.019561] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.029083] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.033264] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.039031] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.043121] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.047332] cx231xx #0: UsbInterface::sendCommand, failed with status --71
[  457.051513] cx231xx #0: UsbInterface::sendCommand,

Re: Patches at patchwork.linuxtv.org (127 patches)

2011-09-22 Thread Mauro Carvalho Chehab
Em 22-09-2011 03:17, Hans Verkuil escreveu:
> On Wednesday, September 21, 2011 22:44:20 Mauro Carvalho Chehab wrote:
>> Em 21-09-2011 17:40, Mauro Carvalho Chehab escreveu:
>>> As announced on Sept, 18, we moved our patch queue to patchwork.linuxtv.org.
>>>
>>> As we were without access to the old patchwork instance, I simply sent all
>>> emails I had locally stored on my local mahine to the new instance and 
>>> reviewed
>>> all patches again. Basically, for old patches, I basically did some 
>>> scripting
>>> that were marking old patches as "superseded", if they didn't apply anymore.
>>> I also preserved the patches that were marked as "under review" from 
>>> patchwork
>>> time, using some scripting and a local control file.
>>>
>>> So, we're basically close to what we had before kernel.org troubles (except 
>>> for
>>> a series of patches that I've already applied today).
>>>
>>> My intention is to finish review all patches marked as "new" until the end 
>>> of this
>>> week, and set a new tree for linux-next with our stuff (as the old one were 
>>> at
>>> git.kernel.org).
>>>
>>> Please let me know if something is missed or if some patch from the list 
>>> bellow
>>> is obsolete and can be marked with a different status.
>>>
>>> Thanks!
>>> Mauro
>>>
>>>
>>> == New patches == 
>>
>> Gah! forgot to update the URL on my script. the patch list with the right 
>> URL is:
>>
> 
> 
>>  == Patches for Hans Verkuil  check == 
>>
>> Aug, 3 2010: [1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors 
>> occur.  http://patchwork.linuxtv.org/patch/4064   Mats Randgaard 
>> 
>> Aug, 3 2010: [2/2] TVP7002: Changed register values. 
>>http://patchwork.linuxtv.org/patch/4063   Mats Randgaard 
>> 
> 
> As already mentioned earlier in an email, these two can be merged. So:
> 
> Acked-by: Hans Verkuil 

Applied, thanks!

Mauro
--
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: Patches at patchwork.linuxtv.org (127 patches)

2011-09-22 Thread Mauro Carvalho Chehab
Em 22-09-2011 05:21, Guennadi Liakhovetski escreveu:
> On Wed, 21 Sep 2011, Mauro Carvalho Chehab wrote:
> 
>> Em 21-09-2011 17:40, Mauro Carvalho Chehab escreveu:
>>> As announced on Sept, 18, we moved our patch queue to patchwork.linuxtv.org.
>>>
>>> As we were without access to the old patchwork instance, I simply sent all
>>> emails I had locally stored on my local mahine to the new instance and 
>>> reviewed
>>> all patches again. Basically, for old patches, I basically did some 
>>> scripting
>>> that were marking old patches as "superseded", if they didn't apply anymore.
>>> I also preserved the patches that were marked as "under review" from 
>>> patchwork
>>> time, using some scripting and a local control file.
>>>
>>> So, we're basically close to what we had before kernel.org troubles (except 
>>> for
>>> a series of patches that I've already applied today).
>>>
>>> My intention is to finish review all patches marked as "new" until the end 
>>> of this
>>> week, and set a new tree for linux-next with our stuff (as the old one were 
>>> at
>>> git.kernel.org).
>>>
>>> Please let me know if something is missed or if some patch from the list 
>>> bellow
>>> is obsolete and can be marked with a different status.
>>>
>>> Thanks!
>>> Mauro
>>>
>>>
>>> == New patches == 
>>
>> Gah! forgot to update the URL on my script. the patch list with the right 
>> URL is:
>>
>>  == New patches == 
> 
> 
> 
>> Sep, 6 2011: [v2] at91: add code to initialize and manage the ISI_MCK for 
>> Atmel ISI http://patchwork.linuxtv.org/patch/7780   Josh Wu 
>> 
> 
> More work is needed on this one


Patches updated,
Thanks!
Mauro
--
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: Patches at patchwork.linuxtv.org (127 patches)

2011-09-22 Thread Guennadi Liakhovetski
On Wed, 21 Sep 2011, Mauro Carvalho Chehab wrote:

> Em 21-09-2011 17:40, Mauro Carvalho Chehab escreveu:
> > As announced on Sept, 18, we moved our patch queue to patchwork.linuxtv.org.
> > 
> > As we were without access to the old patchwork instance, I simply sent all
> > emails I had locally stored on my local mahine to the new instance and 
> > reviewed
> > all patches again. Basically, for old patches, I basically did some 
> > scripting
> > that were marking old patches as "superseded", if they didn't apply anymore.
> > I also preserved the patches that were marked as "under review" from 
> > patchwork
> > time, using some scripting and a local control file.
> > 
> > So, we're basically close to what we had before kernel.org troubles (except 
> > for
> > a series of patches that I've already applied today).
> > 
> > My intention is to finish review all patches marked as "new" until the end 
> > of this
> > week, and set a new tree for linux-next with our stuff (as the old one were 
> > at
> > git.kernel.org).
> > 
> > Please let me know if something is missed or if some patch from the list 
> > bellow
> > is obsolete and can be marked with a different status.
> > 
> > Thanks!
> > Mauro
> > 
> > 
> > == New patches == 
> 
> Gah! forgot to update the URL on my script. the patch list with the right URL 
> is:
> 
>   == New patches == 



> Sep, 6 2011: [v2] at91: add code to initialize and manage the ISI_MCK for 
> Atmel ISI http://patchwork.linuxtv.org/patch/7780   Josh Wu 
> 

More work is needed on this one

> Sep, 6 2011: [1/2,v5] media: Add support for arbitrary resolution 
>   http://patchwork.linuxtv.org/patch/7782   Bastian Hecht 
> 

I'll push the newest version of this one

> Sep,21 2011: [1/2] V4L: soc-camera: add a function to lookup xlate by 
> mediabus code http://patchwork.linuxtv.org/patch/7909   Guennadi Liakhovetski 
> >
> Sep,21 2011: [2/2] V4L: sh_mobile_ceu_camera: simplify scaling and cropping 
> algorit http://patchwork.linuxtv.org/patch/7910   Guennadi Liakhovetski 
> >

I think, these are for 3.3, unless 3.2 is sufficiently delayed

>   == Patches waiting for Guennadi Liakhovetski 
>  review == 
> 
> Jul,10 2011: [1/3] Add 8-bit and 16-bit YCrCb media bus pixel codes   
>   http://patchwork.linuxtv.org/patch/7423   Christian Gmeiner 
> 

I didn't recognise this one as needing my review, but I agree with Laurent 
in his reply to patch 2/3, that these new formats are not needed.

> Jul,12 2011: [1/5] mt9m111: set inital return values to zero  
>   http://patchwork.linuxtv.org/patch/7433   Michael Grzeschik 
> 

Is dropped as per my comment

> Jul,12 2011: [3/5] mt9m111: move lastpage to struct mt9m111 for multi 
> instances http://patchwork.linuxtv.org/patch/7435   Michael Grzeschik 
> 

Will be in my pull request

> Jul,12 2011: [5/5] mt9m111: make use of testpattern   
>   http://patchwork.linuxtv.org/patch/7434   Michael Grzeschik 
> 

is rejested in its present form

> Jun,24 2011: media: initial driver for ov5642 CMOS sensor 
>   http://patchwork.linuxtv.org/patch/7327   Bastian Hecht 
> 

is in the mainline as of 3.1-rc1

> Jul, 6 2011: [REVIEW] adv7175 mbus support
>   http://patchwork.linuxtv.org/patch/7410   Christian Gmeiner 
> 

that wasn't even marked as "[PATCH]," was more of an RFC

> Jul,10 2011: [1/9] stringify: add HEX_STRING()
>   http://patchwork.linuxtv.org/patch/160Randy Dunlap 
> 

wow, that's a weird one;-) no idea how it ended up on your list at all

> Jul,12 2011: [2/5] mt9m111: fix missing return value check mt9m111_reg_clear  
>   http://patchwork.linuxtv.org/patch/7432   Michael Grzeschik 
> 

in 3.1-rc1

> Jul,12 2011: [v4,4/5] mt9m111: rewrite set_pixfmt 
>   http://patchwork.linuxtv.org/patch/7436   Michael Grzeschik 
> 

ditto

> Aug,24 2011: media i.MX27 camera: remove legacy dma support   
>   http://patchwork.linuxtv.org/patch/298Sascha Hauer 
> 

Expecting v2.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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 linux-media from AVerTV Ultra PCI-E RDS

2011-09-22 Thread TRUMPETISTO
Hello linux-media!

I am a user Ubuntu and tuner AVerTV Ultra PCI-E RDS.
But I discovered that AVerTV Ultra PCI-E RDS does not support in Linux.
AVerTV Ultra PCI-E RDS is a new tuner yet.

On the Internet I saw that this problem is not my just only.
I beg to correct this situation please. Thank you in advance.

Here is his page on the manufacturer's site: 
http://www.avermedia.com/avertv/Product/ProductDetail.aspx?Id=471&tab=APDriver

Best regards Valentine
--
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 v3 2/2] at91: add Atmel ISI and ov2640 support on sam9m10/sam9g45 board.

2011-09-22 Thread Guennadi Liakhovetski
On Thu, 22 Sep 2011, Josh Wu wrote:

> This patch
> 1. add ISI_MCK parent setting code when add ISI device.
> 2. add ov2640 support on board file.
> 3. define isi_mck clock in sam9g45 chip file.
> 
> Signed-off-by: Josh Wu 
> ---
>  arch/arm/mach-at91/at91sam9g45.c |3 +
>  arch/arm/mach-at91/at91sam9g45_devices.c |  105 
> +-
>  arch/arm/mach-at91/board-sam9m10g45ek.c  |   85 -
>  arch/arm/mach-at91/include/mach/board.h  |3 +-

Personally, I think, it would be better to separate this into two patches 
at least: one for at91 core and one for the specific board, but that's up 
to arch maintainers to decide.

You also want to patch arch/arm/mach-at91/at91sam9263_devices.c, don't 
you?

>  4 files changed, 193 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91sam9g45.c 
> b/arch/arm/mach-at91/at91sam9g45.c
> index e04c5fb..5e23d6d 100644
> --- a/arch/arm/mach-at91/at91sam9g45.c
> +++ b/arch/arm/mach-at91/at91sam9g45.c
> @@ -201,6 +201,7 @@ static struct clk *periph_clocks[] __initdata = {
>   // irq0
>  };
>  
> +static struct clk pck1;

Hm, it really doesn't need any initialisation, not even for the .type 
field? .type=0 doesn't seem to be valid.

>  static struct clk_lookup periph_clocks_lookups[] = {
>   /* One additional fake clock for ohci */
>   CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
> @@ -215,6 +216,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
>   CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
>   CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
>   CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
> + /* ISI_MCK, which is provided by programmable clock(PCK1) */
> + CLKDEV_CON_DEV_ID("isi_mck", "atmel_isi.0", &pck1),
>  };
>  
>  static struct clk_lookup usart_clocks_lookups[] = {
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c 
> b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 600bffb..82eeac8 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -16,7 +16,7 @@
>  #include 
>  #include 
>  #include 
> -
> +#include 
>  #include 
>  #include 
>  
> @@ -28,6 +28,8 @@
>  #include 
>  #include 
>  
> +#include 
> +
>  #include "generic.h"
>  
>  
> @@ -863,6 +865,107 @@ void __init at91_add_device_ac97(struct 
> ac97c_platform_data *data)
>  void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
>  #endif
>  
> +/* 
> + *  Image Sensor Interface
> + *  */
> +#if defined(CONFIG_VIDEO_ATMEL_ISI) || defined(CONFIG_VIDEO_ATMEL_ISI_MODULE)
> +static u64 isi_dmamask = DMA_BIT_MASK(32);
> +static struct isi_platform_data isi_data;
> +
> +struct resource isi_resources[] = {
> + [0] = {
> + .start  = AT91SAM9G45_BASE_ISI,
> + .end= AT91SAM9G45_BASE_ISI + SZ_16K - 1,
> + .flags  = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start  = AT91SAM9G45_ID_ISI,
> + .end= AT91SAM9G45_ID_ISI,
> + .flags  = IORESOURCE_IRQ,
> + },
> +};
> +
> +static struct platform_device at91sam9g45_isi_device = {
> + .name   = "atmel_isi",
> + .id = 0,
> + .dev= {
> + .dma_mask   = &isi_dmamask,
> + .coherent_dma_mask  = DMA_BIT_MASK(32),
> + .platform_data  = &isi_data,
> + },
> + .resource   = isi_resources,
> + .num_resources  = ARRAY_SIZE(isi_resources),
> +};
> +
> +static int __init isi_set_clk_parent(void)
> +{
> + struct clk *pck1;
> + struct clk *plla;
> + int ret;
> +
> + /* ISI_MCK is supplied by PCK1 - set parent for it. */
> + pck1 = clk_get(NULL, "pck1");
> + if (IS_ERR(pck1)) {
> + printk(KERN_ERR "Failed to get PCK1\n");
> + ret = PTR_ERR(pck1);
> + goto err;
> + }
> +
> + plla = clk_get(NULL, "plla");
> + if (IS_ERR(plla)) {
> + printk(KERN_ERR "Failed to get PLLA\n");
> + ret = PTR_ERR(plla);
> + goto err_pck1;
> + }
> + ret = clk_set_parent(pck1, plla);
> + clk_put(plla);
> + if (ret != 0) {
> + printk(KERN_ERR "Failed to set PCK1 parent\n");
> + goto err_pck1;
> + }
> + return ret;
> +
> +err_pck1:
> + clk_put(pck1);
> +err:
> + return ret;
> +}
> +
> +void __init at91_add_device_isi(struct isi_platform_data * data)
> +{
> + if (!data)
> + return;
> + isi_data = *data;
> +
> + at91_set_A_periph(AT91_PIN_PB20, 0);/* ISI_D0 */
> + at91_set_A_periph(AT91_PIN_PB21, 0);/* ISI_D1 */
> + at91_set_A_periph(AT91_PIN_PB22, 0);/* ISI_D2 */
> + at91_set_A_periph(AT91_PIN_PB23, 0);/* ISI_D3 */
> + at91_set_A_periph(AT91_PIN_PB24, 0);/* 

[PATCH] staging: dt3155v4l: fix build break

2011-09-22 Thread Marek Szyprowski
This patch fixes build break caused by commit ba7fcb0c9549 ("[media] media: 
vb2: dma
contig allocator: use dma_addr instread of paddr").

Signed-off-by: Marek Szyprowski 
---
 drivers/staging/dt3155v4l/dt3155v4l.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dt3155v4l/dt3155v4l.c 
b/drivers/staging/dt3155v4l/dt3155v4l.c
index 05aa41c..0ede5d1 100644
--- a/drivers/staging/dt3155v4l/dt3155v4l.c
+++ b/drivers/staging/dt3155v4l/dt3155v4l.c
@@ -207,7 +207,7 @@ dt3155_start_acq(struct dt3155_priv *pd)
struct vb2_buffer *vb = pd->curr_buf;
dma_addr_t dma_addr;
 
-   dma_addr = vb2_dma_contig_plane_paddr(vb, 0);
+   dma_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
iowrite32(dma_addr, pd->regs + EVEN_DMA_START);
iowrite32(dma_addr + img_width, pd->regs + ODD_DMA_START);
iowrite32(img_width, pd->regs + EVEN_DMA_STRIDE);
@@ -374,7 +374,7 @@ dt3155_irq_handler_even(int irq, void *dev_id)
ivb = list_first_entry(&ipd->dmaq, typeof(*ivb), done_entry);
list_del(&ivb->done_entry);
ipd->curr_buf = ivb;
-   dma_addr = vb2_dma_contig_plane_paddr(ivb, 0);
+   dma_addr = vb2_dma_contig_plane_dma_addr(ivb, 0);
iowrite32(dma_addr, ipd->regs + EVEN_DMA_START);
iowrite32(dma_addr + img_width, ipd->regs + ODD_DMA_START);
iowrite32(img_width, ipd->regs + EVEN_DMA_STRIDE);
-- 
1.7.1.569.g6f426

--
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