cron job: media_tree daily build: OK

2015-07-09 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:   Fri Jul 10 04:00:17 CEST 2015
git branch: test
git hash:   8783b9c50400c6279d7c3b716637b98e83d3c933
gcc version:i686-linux-gcc (GCC) 5.1.0
sparse version: v0.5.0-44-g40791b9
smatch version: 0.4.1-3153-g7d56ab3
host hardware:  x86_64
host os:4.0.0-3.slh.1-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-bf561: 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.7-i686: OK
linux-3.17.8-i686: OK
linux-3.18.7-i686: OK
linux-3.19-i686: OK
linux-4.0-i686: OK
linux-4.1.1-i686: OK
linux-4.2-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.7-x86_64: OK
linux-3.17.8-x86_64: OK
linux-3.18.7-x86_64: OK
linux-3.19-x86_64: OK
linux-4.0-x86_64: OK
linux-4.1.1-x86_64: OK
linux-4.2-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: ERRORS

Detailed results are available here:

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

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Friday.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


[RFC v04] Driver for Toshiba TC358743 HDMI to CSI-2 bridge

2015-07-09 Thread matrandg
From: Mats Randgaard matra...@cisco.com

The driver is tested on our hardware and all the implemented features
works as expected.

Missing features:
- CEC support
- HDCP repeater support
- IR support

Signed-off-by: Mats Randgaard matra...@cisco.com

diff --git a/MAINTAINERS b/MAINTAINERS
index 8133cef..fb98b8d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10303,6 +10303,13 @@ F: drivers/char/toshiba.c
 F: include/linux/toshiba.h
 F: include/uapi/linux/toshiba.h
 
+TOSHIBA TC358743 DRIVER
+M: Mats Randgaard matra...@cisco.com
+L: linux-media@vger.kernel.org
+S: Maintained
+F: drivers/media/i2c/tc358743*
+F: include/media/tc358743.h
+
 TMIO MMC DRIVER
 M: Ian Molton i...@mnementh.co.uk
 L: linux-...@vger.kernel.org
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 71ee8f5..3308706 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -286,6 +286,15 @@ config VIDEO_SAA711X
  To compile this driver as a module, choose M here: the
  module will be called saa7115.
 
+config VIDEO_TC358743
+   tristate Toshiba TC358743 decoder
+   depends on VIDEO_V4L2  I2C
+   ---help---
+ Support for the Toshiba TC358743 HDMI to MIPI CSI-2 bridge
+
+ To compile this driver as a module, choose M here: the
+ module will be called tc358743.
+
 config VIDEO_TVP514X
tristate Texas Instruments TVP514x video decoder
depends on VIDEO_V4L2  I2C
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index f165fae..07db257 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -78,3 +78,4 @@ obj-$(CONFIG_VIDEO_AK881X)+= ak881x.o
 obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
 obj-$(CONFIG_VIDEO_ML86V7667)  += ml86v7667.o
 obj-$(CONFIG_VIDEO_OV2659) += ov2659.o
+obj-$(CONFIG_VIDEO_TC358743)   += tc358743.o
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
new file mode 100644
index 000..34d4f32
--- /dev/null
+++ b/drivers/media/i2c/tc358743.c
@@ -0,0 +1,1778 @@
+/*
+ * tc358743 - Toshiba HDMI to CSI-2 bridge
+ *
+ * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. All rights
+ * reserved.
+ *
+ * This program is free software; you may redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+/*
+ * References (c = chapter, p = page):
+ * REF_01 - Toshiba, TC358743XBG (H2C), Functional Specification, Rev 0.60
+ * REF_02 - Toshiba, TC358743XBG_HDMI-CSI_Tv11p_nm.xls
+ */
+
+#include linux/kernel.h
+#include linux/module.h
+#include linux/slab.h
+#include linux/i2c.h
+#include linux/delay.h
+#include linux/videodev2.h
+#include linux/workqueue.h
+#include linux/v4l2-dv-timings.h
+#include linux/hdmi.h
+#include media/v4l2-dv-timings.h
+#include media/v4l2-device.h
+#include media/v4l2-ctrls.h
+#include media/tc358743.h
+
+#include tc358743_regs.h
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, debug level (0-3));
+
+MODULE_DESCRIPTION(Toshiba TC358743 HDMI to CSI-2 bridge driver);
+MODULE_AUTHOR(Ramakrishnan Muthukrishnan r...@rkrishnan.org);
+MODULE_AUTHOR(Mikhail Khelik mkhe...@cisco.com);
+MODULE_AUTHOR(Mats Randgaard matra...@cisco.com);
+MODULE_LICENSE(GPL);
+
+#define EDID_NUM_BLOCKS_MAX 8
+#define EDID_BLOCK_SIZE 128
+
+static const struct v4l2_dv_timings_cap tc358743_timings_cap = {
+   .type = V4L2_DV_BT_656_1120,
+   /* keep this initialization for compatibility with GCC  4.4.6 */
+   .reserved = { 0 },
+   /* Pixel clock from REF_01 p. 20. Min/max height/width are unknown */
+   V4L2_INIT_BT_TIMINGS(1, 1, 1, 1, 0, 16500,
+   V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_DMT |
+   V4L2_DV_BT_STD_GTF | V4L2_DV_BT_STD_CVT,
+   V4L2_DV_BT_CAP_PROGRESSIVE |
+   V4L2_DV_BT_CAP_REDUCED_BLANKING |
+   V4L2_DV_BT_CAP_CUSTOM)
+};
+
+struct tc358743_state {
+   struct tc358743_platform_data pdata;
+   struct v4l2_subdev sd;
+   struct media_pad pad;
+   struct v4l2_ctrl_handler hdl;
+   struct i2c_client *i2c_client;
+   /* CONFCTL is modified in both process context and interrupt context */
+   struct mutex confctl_mutex;
+
+   /* controls */
+   struct v4l2_ctrl *detect_tx_5v_ctrl;
+   struct v4l2_ctrl 

[RFC v04] Driver for Toshiba TC358743

2015-07-09 Thread matrandg
From: Mats Randgaard matra...@cisco.com

Improvements based on feedback from Hans Verkuil:
- Use functions in linux/hdmi.h to print AVI info frames
- Replace private format change event with V4L2_EVENT_SOURCE_CHANGE
- Rewrite set_fmt/get_fmt
- Remove V4L2_SUBDEV_FL_HAS_DEVNODE

Other improvements since the previous version:
- Protect CONFCTL with a mutex since it is written in both process
  context and interrupt context
- Restructure and describe the platform data
- Replace the register that is verified in the probe function with the
  read-only register CHIPID

Mats Randgaard (1):
  Driver for Toshiba TC358743 HDMI to CSI-2 bridge

 MAINTAINERS|7 +
 drivers/media/i2c/Kconfig  |9 +
 drivers/media/i2c/Makefile |1 +
 drivers/media/i2c/tc358743.c   | 1778 
 drivers/media/i2c/tc358743_regs.h  |  681 ++
 include/media/tc358743.h   |  131 +++
 include/uapi/linux/v4l2-controls.h |4 +
 7 files changed, 2611 insertions(+)
 create mode 100644 drivers/media/i2c/tc358743.c
 create mode 100644 drivers/media/i2c/tc358743_regs.h
 create mode 100644 include/media/tc358743.h

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


Re: [PATCH 0/10 v6] Helper to abstract vma handling in media layer

2015-07-09 Thread Jan Kara
  Hello,

  Hans, did you have a chance to look at these patches? I have tested them
with the vivid driver but it would be good if you could run them through
your standard testing procedure as well. Andrew has updated the patches in
his tree but some ack from you would be welcome...

Honza
On Thu 18-06-15 16:08:30, Jan Kara wrote:
   Hello,
 
 I'm sending the sixth version of my patch series to abstract vma handling from
 the various media drivers. Since the previous version I have added a patch to
 move mm helpers into a separate file and behind a config option. I also
 changed patch pushing mmap_sem down in videobuf2 core to avoid lockdep warning
 and NULL dereference Hans found in his testing. I've also included small
 fixups Andrew was carrying.
 
 After this patch set drivers have to know much less details about vmas, their
 types, and locking. Also quite some code is removed from them. As a bonus
 drivers get automatically VM_FAULT_RETRY handling. The primary motivation for
 this series is to remove knowledge about mmap_sem locking from as many places 
 a
 possible so that we can change it with reasonable effort.
 
 The core of the series is the new helper get_vaddr_frames() which is given a
 virtual address and it fills in PFNs / struct page pointers (depending on VMA
 type) into the provided array. If PFNs correspond to normal pages it also 
 grabs
 references to these pages. The difference from get_user_pages() is that this
 function can also deal with pfnmap, and io mappings which is what the media
 drivers need.
 
 I have tested the patches with vivid driver so at least vb2 code got some
 exposure. Conversion of other drivers was just compile-tested (for x86 so e.g.
 exynos driver which is only for Samsung platform is completely untested).
 
 Andrew, can you please update the patches in mm three? Thanks!
 
   Honza
 
 Changes since v5:
 * Moved mm helper into a separate file and behind a config option
 * Changed the first patch pushing mmap_sem down in videobuf2 core to avoid
   possible deadlock
 
 Changes since v4:
 * Minor cleanups and fixes pointed out by Mel and Vlasta
 * Added Acked-by tags
 
 Changes since v3:
 * Added include linux/vmalloc.h into mm/gup.c as it's needed for some archs
 * Fixed error path for exynos driver
 
 Changes since v2:
 * Renamed functions and structures as Mel suggested
 * Other minor changes suggested by Mel
 * Rebased on top of 4.1-rc2
 * Changed functions to get pointer to array of pages / pfns to perform
   conversion if necessary. This fixes possible issue in the omap I may have
   introduced in v2 and generally makes the API less errorprone.
-- 
Jan Kara j...@suse.cz
SUSE Labs, CR
--
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 0/10 v6] Helper to abstract vma handling in media layer

2015-07-09 Thread Hans Verkuil
On 07/09/2015 01:48 PM, Jan Kara wrote:
   Hello,
 
   Hans, did you have a chance to look at these patches? I have tested them
 with the vivid driver but it would be good if you could run them through
 your standard testing procedure as well. Andrew has updated the patches in
 his tree but some ack from you would be welcome...

I've planned a 'patch day' for Monday. So hopefully you'll see a pull request
by then.

Regards,

Hans

 
   Honza
 On Thu 18-06-15 16:08:30, Jan Kara wrote:
   Hello,

 I'm sending the sixth version of my patch series to abstract vma handling 
 from
 the various media drivers. Since the previous version I have added a patch to
 move mm helpers into a separate file and behind a config option. I also
 changed patch pushing mmap_sem down in videobuf2 core to avoid lockdep 
 warning
 and NULL dereference Hans found in his testing. I've also included small
 fixups Andrew was carrying.

 After this patch set drivers have to know much less details about vmas, their
 types, and locking. Also quite some code is removed from them. As a bonus
 drivers get automatically VM_FAULT_RETRY handling. The primary motivation for
 this series is to remove knowledge about mmap_sem locking from as many 
 places a
 possible so that we can change it with reasonable effort.

 The core of the series is the new helper get_vaddr_frames() which is given a
 virtual address and it fills in PFNs / struct page pointers (depending on VMA
 type) into the provided array. If PFNs correspond to normal pages it also 
 grabs
 references to these pages. The difference from get_user_pages() is that this
 function can also deal with pfnmap, and io mappings which is what the media
 drivers need.

 I have tested the patches with vivid driver so at least vb2 code got some
 exposure. Conversion of other drivers was just compile-tested (for x86 so 
 e.g.
 exynos driver which is only for Samsung platform is completely untested).

 Andrew, can you please update the patches in mm three? Thanks!

  Honza

 Changes since v5:
 * Moved mm helper into a separate file and behind a config option
 * Changed the first patch pushing mmap_sem down in videobuf2 core to avoid
   possible deadlock

 Changes since v4:
 * Minor cleanups and fixes pointed out by Mel and Vlasta
 * Added Acked-by tags

 Changes since v3:
 * Added include linux/vmalloc.h into mm/gup.c as it's needed for some archs
 * Fixed error path for exynos driver

 Changes since v2:
 * Renamed functions and structures as Mel suggested
 * Other minor changes suggested by Mel
 * Rebased on top of 4.1-rc2
 * Changed functions to get pointer to array of pages / pfns to perform
   conversion if necessary. This fixes possible issue in the omap I may have
   introduced in v2 and generally makes the API less errorprone.

--
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 08/10] [media] coda: use event class to deduplicate v4l2 trace events

2015-07-09 Thread Philipp Zabel
Trace events with exactly the same parameters and trace output, such as
coda_enc_pic_run and coda_enc_pic_done, are supposed to use the
DECLARE_EVENT_CLASS and DEFINE_EVENT macros instead of duplicated
TRACE_EVENT macro calls.
This patch changes the order of parameters to coda_dec_rot_done and adds
a timestamp so it can share an event class with coda_bit_queue.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c |  2 +-
 drivers/media/platform/coda/trace.h| 89 ++
 2 files changed, 26 insertions(+), 65 deletions(-)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index ac4dcb1..226ce4a 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -1978,7 +1978,7 @@ static void coda_finish_decode(struct coda_ctx *ctx)
dst_buf-v4l2_buf.timecode = meta-timecode;
dst_buf-v4l2_buf.timestamp = meta-timestamp;
 
-   trace_coda_dec_rot_done(ctx, meta, dst_buf);
+   trace_coda_dec_rot_done(ctx, dst_buf, meta);
 
switch (q_data_dst-fourcc) {
case V4L2_PIX_FMT_YUV420:
diff --git a/drivers/media/platform/coda/trace.h 
b/drivers/media/platform/coda/trace.h
index 781bf72..d9099a0 100644
--- a/drivers/media/platform/coda/trace.h
+++ b/drivers/media/platform/coda/trace.h
@@ -48,7 +48,7 @@ TRACE_EVENT(coda_bit_done,
TP_printk(minor = %d, ctx = %d, __entry-minor, __entry-ctx)
 );
 
-TRACE_EVENT(coda_enc_pic_run,
+DECLARE_EVENT_CLASS(coda_buf_class,
TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf),
 
TP_ARGS(ctx, buf),
@@ -69,28 +69,17 @@ TRACE_EVENT(coda_enc_pic_run,
  __entry-minor, __entry-index, __entry-ctx)
 );
 
-TRACE_EVENT(coda_enc_pic_done,
+DEFINE_EVENT(coda_buf_class, coda_enc_pic_run,
TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf),
+   TP_ARGS(ctx, buf)
+);
 
-   TP_ARGS(ctx, buf),
-
-   TP_STRUCT__entry(
-   __field(int, minor)
-   __field(int, index)
-   __field(int, ctx)
-   ),
-
-   TP_fast_assign(
-   __entry-minor = ctx-fh.vdev-minor;
-   __entry-index = buf-v4l2_buf.index;
-   __entry-ctx = ctx-idx;
-   ),
-
-   TP_printk(minor = %d, index = %d, ctx = %d,
- __entry-minor, __entry-index, __entry-ctx)
+DEFINE_EVENT(coda_buf_class, coda_enc_pic_done,
+   TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf),
+   TP_ARGS(ctx, buf)
 );
 
-TRACE_EVENT(coda_bit_queue,
+DECLARE_EVENT_CLASS(coda_buf_meta_class,
TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf,
 struct coda_buffer_meta *meta),
 
@@ -117,7 +106,13 @@ TRACE_EVENT(coda_bit_queue,
  __entry-ctx)
 );
 
-TRACE_EVENT(coda_dec_pic_run,
+DEFINE_EVENT(coda_buf_meta_class, coda_bit_queue,
+   TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf,
+struct coda_buffer_meta *meta),
+   TP_ARGS(ctx, buf, meta)
+);
+
+DECLARE_EVENT_CLASS(coda_meta_class,
TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta),
 
TP_ARGS(ctx, meta),
@@ -140,54 +135,20 @@ TRACE_EVENT(coda_dec_pic_run,
  __entry-minor, __entry-start, __entry-end, __entry-ctx)
 );
 
-TRACE_EVENT(coda_dec_pic_done,
+DEFINE_EVENT(coda_meta_class, coda_dec_pic_run,
TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta),
-
-   TP_ARGS(ctx, meta),
-
-   TP_STRUCT__entry(
-   __field(int, minor)
-   __field(int, start)
-   __field(int, end)
-   __field(int, ctx)
-   ),
-
-   TP_fast_assign(
-   __entry-minor = ctx-fh.vdev-minor;
-   __entry-start = meta-start;
-   __entry-end = meta-end;
-   __entry-ctx = ctx-idx;
-   ),
-
-   TP_printk(minor = %d, start = 0x%x, end = 0x%x, ctx = %d,
- __entry-minor, __entry-start, __entry-end, __entry-ctx)
+   TP_ARGS(ctx, meta)
 );
 
-TRACE_EVENT(coda_dec_rot_done,
-   TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta,
-struct vb2_buffer *buf),
-
-   TP_ARGS(ctx, meta, buf),
-
-   TP_STRUCT__entry(
-   __field(int, minor)
-   __field(int, start)
-   __field(int, end)
-   __field(int, index)
-   __field(int, ctx)
-   ),
-
-   TP_fast_assign(
-   __entry-minor = ctx-fh.vdev-minor;
-   __entry-start = meta-start;
-   __entry-end = meta-end;
-   __entry-index = buf-v4l2_buf.index;
-   __entry-ctx = ctx-idx;
-   ),
+DEFINE_EVENT(coda_meta_class, coda_dec_pic_done,
+   TP_PROTO(struct coda_ctx *ctx, struct coda_buffer_meta *meta),
+   TP_ARGS(ctx, meta)
+);
 
-   TP_printk(minor = %d, start = 0x%x, end = 0x%x, 

[PATCH 04/10] [media] coda: keep buffers on the queue in bitstream end mode

2015-07-09 Thread Philipp Zabel
In stream end mode the hardware will read the bitstream to its end,
overshooting the write pointer. Do not write additional data into
the bitstream in this mode.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 47fc2f1..0f8dcea 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -228,6 +228,9 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool 
streaming)
struct coda_buffer_meta *meta;
u32 start;
 
+   if (ctx-bit_stream_param  CODA_BIT_STREAM_END_FLAG)
+   return;
+
while (v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx)  0) {
/*
 * Only queue a single JPEG into the bitstream buffer, except
-- 
2.1.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 02/10] [media] coda: fix mvcol buffer for MPEG4 decoding

2015-07-09 Thread Philipp Zabel
The mvcol buffer is allocated at the end of the first internal buffer.
This patch fixes an out of bounds array access.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 9fbff24..47fc2f1 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -384,7 +384,7 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx,
/* mvcol buffer for mpeg4 */
if ((dev-devtype-product != CODA_DX6) 
(ctx-codec-src_fourcc == V4L2_PIX_FMT_MPEG4))
-   coda_parabuf_write(ctx, 97, ctx-internal_frames[i].paddr +
+   coda_parabuf_write(ctx, 97, ctx-internal_frames[0].paddr +
ysize + ysize/4 + ysize/4);
 
return 0;
-- 
2.1.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 03/10] [media] coda: fix bitstream preloading for MPEG4 decoding

2015-07-09 Thread Philipp Zabel
All decoder instances using the BIT processor should preload buffers
into the bitstream ring buffer, including MPEG4 decoding. Fix this
by explicitly stating the above condition instead of listing all
relevant input formats.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index 58f6548..3259ea6 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1244,9 +1244,7 @@ static int coda_start_streaming(struct vb2_queue *q, 
unsigned int count)
 
q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
if (q-type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
-   if (q_data_src-fourcc == V4L2_PIX_FMT_H264 ||
-   (q_data_src-fourcc == V4L2_PIX_FMT_JPEG 
-ctx-dev-devtype-product == CODA_7541)) {
+   if (ctx-inst_type == CODA_INST_DECODER  ctx-use_bit) {
/* copy the buffers that were queued before streamon */
mutex_lock(ctx-bitstream_mutex);
coda_fill_bitstream(ctx, false);
-- 
2.1.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 09/10] [media] coda: reuse src_bufs in coda_job_ready

2015-07-09 Thread Philipp Zabel
The v4l2_m2m_num_src_bufs_ready() function is called in multiple places
in coda_cob_ready, and there already is a variable src_bufs that is
assigned to its result. Move it to the beginning and use it everywhere.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-common.c | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index b265edd..267fda7 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -888,14 +888,14 @@ static void coda_pic_run_work(struct work_struct *work)
 static int coda_job_ready(void *m2m_priv)
 {
struct coda_ctx *ctx = m2m_priv;
+   int src_bufs = v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx);
 
/*
 * For both 'P' and 'key' frame cases 1 picture
 * and 1 frame are needed. In the decoder case,
 * the compressed frame can be in the bitstream.
 */
-   if (!v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx) 
-   ctx-inst_type != CODA_INST_DECODER) {
+   if (!src_bufs  ctx-inst_type != CODA_INST_DECODER) {
v4l2_dbg(1, coda_debug, ctx-dev-v4l2_dev,
 not ready: not enough video buffers.\n);
return 0;
@@ -911,9 +911,8 @@ static int coda_job_ready(void *m2m_priv)
struct list_head *meta;
bool stream_end;
int num_metas;
-   int src_bufs;
 
-   if (ctx-hold  !v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx)) 
{
+   if (ctx-hold  !src_bufs) {
v4l2_dbg(1, coda_debug, ctx-dev-v4l2_dev,
 %d: not ready: on hold for more buffers.\n,
 ctx-idx);
@@ -927,8 +926,6 @@ static int coda_job_ready(void *m2m_priv)
list_for_each(meta, ctx-buffer_meta_list)
num_metas++;
 
-   src_bufs = v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx);
-
if (!stream_end  (num_metas + src_bufs)  2) {
v4l2_dbg(1, coda_debug, ctx-dev-v4l2_dev,
 %d: not ready: need 2 buffers available (%d, 
%d)\n,
@@ -937,8 +934,8 @@ static int coda_job_ready(void *m2m_priv)
}
 
 
-   if (!v4l2_m2m_num_src_bufs_ready(ctx-fh.m2m_ctx) 
-   !stream_end  (coda_get_bitstream_payload(ctx)  512)) {
+   if (!src_bufs  !stream_end 
+   (coda_get_bitstream_payload(ctx)  512)) {
v4l2_dbg(1, coda_debug, ctx-dev-v4l2_dev,
 %d: not ready: not enough bitstream data 
(%d).\n,
 ctx-idx, coda_get_bitstream_payload(ctx));
-- 
2.1.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 06/10] [media] coda: reset stream end in stop_streaming

2015-07-09 Thread Philipp Zabel
Otherwise a restarted stream won't queue buffers.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-common.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index de0e245..8b91bda 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1378,6 +1378,9 @@ static void coda_stop_streaming(struct vb2_queue *q)
ctx-runcounter = 0;
ctx-aborting = 0;
}
+
+   if (!ctx-streamon_out  !ctx-streamon_cap)
+   ctx-bit_stream_param = ~CODA_BIT_STREAM_END_FLAG;
 }
 
 static const struct vb2_ops coda_qops = {
-- 
2.1.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 10/10] [media] coda: rework meta counting and add separate lock

2015-07-09 Thread Philipp Zabel
Keep count of number of buffer meta structures in the list and use
a separate spinlock for operations on this counted list instead
of reusing the bitstream mutex in some places and none at all in
others.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c| 16 ++--
 drivers/media/platform/coda/coda-common.c | 21 +
 drivers/media/platform/coda/coda.h|  2 ++
 3 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 226ce4a..25910cc 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -226,6 +226,7 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool 
streaming)
 {
struct vb2_buffer *src_buf;
struct coda_buffer_meta *meta;
+   unsigned long flags;
u32 start;
 
if (ctx-bit_stream_param  CODA_BIT_STREAM_END_FLAG)
@@ -274,8 +275,13 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool 
streaming)
meta-start = start;
meta-end = ctx-bitstream_fifo.kfifo.in 
ctx-bitstream_fifo.kfifo.mask;
+   spin_lock_irqsave(ctx-buffer_meta_lock,
+ flags);
list_add_tail(meta-list,
  ctx-buffer_meta_list);
+   ctx-num_metas++;
+   spin_unlock_irqrestore(ctx-buffer_meta_lock,
+  flags);
 
trace_coda_bit_queue(ctx, src_buf, meta);
}
@@ -1665,6 +1671,7 @@ static int coda_prepare_decode(struct coda_ctx *ctx)
struct coda_dev *dev = ctx-dev;
struct coda_q_data *q_data_dst;
struct coda_buffer_meta *meta;
+   unsigned long flags;
u32 reg_addr, reg_stride;
 
dst_buf = v4l2_m2m_next_dst_buf(ctx-fh.m2m_ctx);
@@ -1743,6 +1750,7 @@ static int coda_prepare_decode(struct coda_ctx *ctx)
coda_write(dev, ctx-iram_info.axi_sram_use,
CODA7_REG_BIT_AXI_SRAM_USE);
 
+   spin_lock_irqsave(ctx-buffer_meta_lock, flags);
meta = list_first_entry_or_null(ctx-buffer_meta_list,
struct coda_buffer_meta, list);
 
@@ -1762,6 +1770,7 @@ static int coda_prepare_decode(struct coda_ctx *ctx)
kfifo_in(ctx-bitstream_fifo, buf, pad);
}
}
+   spin_unlock_irqrestore(ctx-buffer_meta_lock, flags);
 
coda_kfifo_sync_to_device_full(ctx);
 
@@ -1783,6 +1792,7 @@ static void coda_finish_decode(struct coda_ctx *ctx)
struct vb2_buffer *dst_buf;
struct coda_buffer_meta *meta;
unsigned long payload;
+   unsigned long flags;
int width, height;
int decoded_idx;
int display_idx;
@@ -1908,11 +1918,13 @@ static void coda_finish_decode(struct coda_ctx *ctx)
} else {
val = coda_read(dev, CODA_RET_DEC_PIC_FRAME_NUM) - 1;
val -= ctx-sequence_offset;
-   mutex_lock(ctx-bitstream_mutex);
+   spin_lock_irqsave(ctx-buffer_meta_lock, flags);
if (!list_empty(ctx-buffer_meta_list)) {
meta = list_first_entry(ctx-buffer_meta_list,
  struct coda_buffer_meta, list);
list_del(meta-list);
+   ctx-num_metas--;
+   spin_unlock_irqrestore(ctx-buffer_meta_lock, flags);
/*
 * Clamp counters to 16 bits for comparison, as the HW
 * counter rolls over at this point for h.264. This
@@ -1929,13 +1941,13 @@ static void coda_finish_decode(struct coda_ctx *ctx)
ctx-frame_metas[decoded_idx] = *meta;
kfree(meta);
} else {
+   spin_unlock_irqrestore(ctx-buffer_meta_lock, flags);
v4l2_err(dev-v4l2_dev, empty timestamp list!\n);
memset(ctx-frame_metas[decoded_idx], 0,
   sizeof(struct coda_buffer_meta));
ctx-frame_metas[decoded_idx].sequence = val;
ctx-sequence_offset++;
}
-   mutex_unlock(ctx-bitstream_mutex);
 
trace_coda_dec_pic_done(ctx, ctx-frame_metas[decoded_idx]);
 
diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index 267fda7..367b6ba 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -908,9 +908,9 @@ static int coda_job_ready(void *m2m_priv)

[PATCH 01/10] [media] coda: clamp frame sequence counters to 16 bit

2015-07-09 Thread Philipp Zabel
From: Lucas Stach l.st...@pengutronix.de

This is already done for one side of the comparison with the expectation
that the HW counter rolls over at the 16 bit boundary. This is true when
decoding a h.264 stream, but doesn't hold for at least MJPEG. As we don't
know the exact wrap-around point for this format just clamp the HW counter
to the same 16 bits. This should be enough to detect most of the errors
and saves us from doing different comparisons based on the decoded format.

Signed-off-by: Lucas Stach l.st...@pengutronix.de
Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 109797b..9fbff24 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -1902,7 +1902,14 @@ static void coda_finish_decode(struct coda_ctx *ctx)
meta = list_first_entry(ctx-buffer_meta_list,
  struct coda_buffer_meta, list);
list_del(meta-list);
-   if (val != (meta-sequence  0x)) {
+   /*
+* Clamp counters to 16 bits for comparison, as the HW
+* counter rolls over at this point for h.264. This
+* may be different for other formats, but using 16 bits
+* should be enough to detect most errors and saves us
+* from doing different things based on the format.
+*/
+   if ((val  0x) != (meta-sequence  0x)) {
v4l2_err(dev-v4l2_dev,
 sequence number mismatch (%d(%d) != 
%d)\n,
 val, ctx-sequence_offset,
-- 
2.1.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 07/10] [media] coda: drop custom list of pixel format descriptions

2015-07-09 Thread Philipp Zabel
Since commit ba3002045f80 ([media] v4l2-ioctl: fill in the description
for VIDIOC_ENUM_FMT), all pixel formats are assigned their description
in a central place. We can now drop the custom list.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-common.c | 75 +++
 1 file changed, 7 insertions(+), 68 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index 8b91bda..b265edd 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -61,11 +61,6 @@ int coda_debug;
 module_param(coda_debug, int, 0644);
 MODULE_PARM_DESC(coda_debug, Debug level (0-2));
 
-struct coda_fmt {
-   char *name;
-   u32 fourcc;
-};
-
 void coda_write(struct coda_dev *dev, u32 data, u32 reg)
 {
v4l2_dbg(2, coda_debug, dev-v4l2_dev,
@@ -111,40 +106,6 @@ void coda_write_base(struct coda_ctx *ctx, struct 
coda_q_data *q_data,
coda_write(ctx-dev, base_cr, reg_y + 8);
 }
 
-/*
- * Array of all formats supported by any version of Coda:
- */
-static const struct coda_fmt coda_formats[] = {
-   {
-   .name = YUV 4:2:0 Planar, YCbCr,
-   .fourcc = V4L2_PIX_FMT_YUV420,
-   },
-   {
-   .name = YUV 4:2:0 Planar, YCrCb,
-   .fourcc = V4L2_PIX_FMT_YVU420,
-   },
-   {
-   .name = YUV 4:2:0 Partial interleaved Y/CbCr,
-   .fourcc = V4L2_PIX_FMT_NV12,
-   },
-   {
-   .name = YUV 4:2:2 Planar, YCbCr,
-   .fourcc = V4L2_PIX_FMT_YUV422P,
-   },
-   {
-   .name = H264 Encoded Stream,
-   .fourcc = V4L2_PIX_FMT_H264,
-   },
-   {
-   .name = MPEG4 Encoded Stream,
-   .fourcc = V4L2_PIX_FMT_MPEG4,
-   },
-   {
-   .name = JPEG Encoded Images,
-   .fourcc = V4L2_PIX_FMT_JPEG,
-   },
-};
-
 #define CODA_CODEC(mode, src_fourcc, dst_fourcc, max_w, max_h) \
{ mode, src_fourcc, dst_fourcc, max_w, max_h }
 
@@ -261,40 +222,23 @@ static const struct coda_video_device 
*coda9_video_devices[] = {
coda_bit_decoder,
 };
 
-static bool coda_format_is_yuv(u32 fourcc)
+/*
+ * Normalize all supported YUV 4:2:0 formats to the value used in the codec
+ * tables.
+ */
+static u32 coda_format_normalize_yuv(u32 fourcc)
 {
switch (fourcc) {
case V4L2_PIX_FMT_YUV420:
case V4L2_PIX_FMT_YVU420:
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_YUV422P:
-   return true;
+   return V4L2_PIX_FMT_YUV420;
default:
-   return false;
+   return fourcc;
}
 }
 
-static const char *coda_format_name(u32 fourcc)
-{
-   int i;
-
-   for (i = 0; i  ARRAY_SIZE(coda_formats); i++) {
-   if (coda_formats[i].fourcc == fourcc)
-   return coda_formats[i].name;
-   }
-
-   return NULL;
-}
-
-/*
- * Normalize all supported YUV 4:2:0 formats to the value used in the codec
- * tables.
- */
-static u32 coda_format_normalize_yuv(u32 fourcc)
-{
-   return coda_format_is_yuv(fourcc) ? V4L2_PIX_FMT_YUV420 : fourcc;
-}
-
 static const struct coda_codec *coda_find_codec(struct coda_dev *dev,
int src_fourcc, int dst_fourcc)
 {
@@ -396,7 +340,6 @@ static int coda_enum_fmt(struct file *file, void *priv,
struct video_device *vdev = video_devdata(file);
const struct coda_video_device *cvd = to_coda_video_device(vdev);
const u32 *formats;
-   const char *name;
 
if (f-type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
formats = cvd-src_formats;
@@ -408,11 +351,7 @@ static int coda_enum_fmt(struct file *file, void *priv,
if (f-index = CODA_MAX_FORMATS || formats[f-index] == 0)
return -EINVAL;
 
-   name = coda_format_name(formats[f-index]);
-   strlcpy(f-description, name, sizeof(f-description));
f-pixelformat = formats[f-index];
-   if (!coda_format_is_yuv(formats[f-index]))
-   f-flags |= V4L2_FMT_FLAG_COMPRESSED;
 
return 0;
 }
-- 
2.1.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 05/10] [media] coda: avoid calling SEQ_END twice

2015-07-09 Thread Philipp Zabel
Allow coda_seq_end_work to be called multiple times, move the setting
of ctx-initialized from coda_start/stop_streaming() into
coda_start_encoding/decoding and coda_seq_end_work, respectively,
and skip the SEQ_END command in coda_seq_end_work if the context is
already deinitialized before.

Signed-off-by: Philipp Zabel p.za...@pengutronix.de
---
 drivers/media/platform/coda/coda-bit.c| 8 
 drivers/media/platform/coda/coda-common.c | 4 +---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 0f8dcea..ac4dcb1 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -999,6 +999,7 @@ static int coda_start_encoding(struct coda_ctx *ctx)
ret = -EFAULT;
goto out;
}
+   ctx-initialized = 1;
 
if (dst_fourcc != V4L2_PIX_FMT_JPEG) {
if (dev-devtype-product == CODA_960)
@@ -1329,6 +1330,9 @@ static void coda_seq_end_work(struct work_struct *work)
mutex_lock(ctx-buffer_mutex);
mutex_lock(dev-coda_mutex);
 
+   if (ctx-initialized == 0)
+   goto out;
+
v4l2_dbg(1, coda_debug, dev-v4l2_dev,
 %d: %s: sent command 'SEQ_END' to coda\n, ctx-idx,
 __func__);
@@ -1342,6 +1346,9 @@ static void coda_seq_end_work(struct work_struct *work)
 
coda_free_framebuffers(ctx);
 
+   ctx-initialized = 0;
+
+out:
mutex_unlock(dev-coda_mutex);
mutex_unlock(ctx-buffer_mutex);
 }
@@ -1499,6 +1506,7 @@ static int __coda_start_decoding(struct coda_ctx *ctx)
coda_write(dev, 0, CODA_REG_BIT_BIT_STREAM_PARAM);
return -ETIMEDOUT;
}
+   ctx-initialized = 1;
 
/* Update kfifo out pointer from coda bitstream read pointer */
coda_kfifo_sync_from_device(ctx);
diff --git a/drivers/media/platform/coda/coda-common.c 
b/drivers/media/platform/coda/coda-common.c
index 3259ea6..de0e245 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1313,7 +1313,6 @@ static int coda_start_streaming(struct vb2_queue *q, 
unsigned int count)
goto err;
}
 
-   ctx-initialized = 1;
return ret;
 
 err:
@@ -1376,7 +1375,6 @@ static void coda_stop_streaming(struct vb2_queue *q)
mutex_unlock(ctx-bitstream_mutex);
kfifo_init(ctx-bitstream_fifo,
ctx-bitstream.vaddr, ctx-bitstream.size);
-   ctx-initialized = 0;
ctx-runcounter = 0;
ctx-aborting = 0;
}
@@ -1767,7 +1765,7 @@ static int coda_release(struct file *file)
v4l2_m2m_ctx_release(ctx-fh.m2m_ctx);
 
/* In case the instance was not running, we still need to call SEQ_END 
*/
-   if (ctx-initialized  ctx-ops-seq_end_work) {
+   if (ctx-ops-seq_end_work) {
queue_work(dev-workqueue, ctx-seq_end_work);
flush_work(ctx-seq_end_work);
}
-- 
2.1.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


[GIT FIXES FOR v4.2] Videobuf 2 QUEUED behaviour revert, new state for requeuing

2015-07-09 Thread Sakari Ailus
Hi Mauro,

Here's the videobuf2 fix for reverting the VB2_BUF_STATE_QUEUED behaviour in
vb2_buffer_done() to what it was before v4.1. VB2_BUF_STATE_REQUEUEING can
be used as an argument to vb2_buffer_done() for returning the buffer back to
the driver if needed (as in cobalt driver).

Please pull.


The following changes since commit 8783b9c50400c6279d7c3b716637b98e83d3c933:

  [media] SMI PCIe IR driver for DVBSky cards (2015-07-06 08:26:16 -0300)

are available in the git repository at:

  ssh://linuxtv.org/git/sailus/media_tree.git vb2-fix

for you to fetch changes up to aae5225b63d0eee9e725a032c3f3f1811f5119a5:

  vb2: Only requeue buffers immediately once streaming is started (2015-07-09 
17:46:27 +0300)


Sakari Ailus (1):
  vb2: Only requeue buffers immediately once streaming is started

 drivers/media/pci/cobalt/cobalt-irq.c|  2 +-
 drivers/media/v4l2-core/videobuf2-core.c | 25 +
 include/media/videobuf2-core.h   |  2 ++
 3 files changed, 20 insertions(+), 9 deletions(-)

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
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