]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Mon, 26 Nov 2012 12:58:33 +0000 (10:58 -0200)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork:
  videobuf2-dma-contig: Only support if HAVE_GENERIC_DMA_COHERENT

11 years agovideobuf2-dma-contig: Only support if HAVE_GENERIC_DMA_COHERENT
Mauro Carvalho Chehab [Mon, 26 Nov 2012 11:41:09 +0000 (09:41 -0200)]
videobuf2-dma-contig: Only support if HAVE_GENERIC_DMA_COHERENT

As reported by Stephen:

> After merging the v4l-dvb tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> ERROR: "dma_common_get_sgtable" [drivers/media/v4l2-core/videobuf2-dma-contig.ko] undefined!
>
> Caused by commit 9ef2cbeb8192 ("[media] v4l: vb2-dma-contig: add support
> for DMABUF exporting").  dma_common_get_sgtable() is called from the
> inline dma_get_sgtable_attrs() and dma_get_sgtable_attrs() is "called
> from" dma_get_sgtable().  dma_common_get_sgtable() is only defined if
> ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY is set which depends on
> CONFIG_HAVE_GENERIC_DMA_COHERENT being set which it isn't for this build.

The simplest fix is to just not support DMABUF with vb2-contig, on archs
where this symbol doesn't exist. Some latter patch can rewrite it to
support this outside -arm.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Sun, 25 Nov 2012 20:03:20 +0000 (18:03 -0200)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (87 commits)
  [media] v4l: s5p-mfc: support for dmabuf exporting
  [media] v4l: s5p-tv: mixer: support for dmabuf exporting
  [media] v4l: s5p-fimc: support for dmabuf exporting
  [media] v4l: vb2-dma-contig: align buffer size to PAGE_SIZE
  [media] v4l: vb2-dma-contig: fail if user ptr buffer is not correctly aligned
  [media] v4l: vb2-dma-contig: add reference counting for a device from allocator context
  [media] v4l: vb2-dma-contig: add support for DMABUF exporting
  [media] v4l: vb2: add buffer exporting via dmabuf
  [media] Documentation: media: description of DMABUF exporting in V4L2
  [media] v4l: add buffer exporting via dmabuf
  [media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call
  [media] v4l: s5p-fimc: support for dmabuf importing
  [media] v4l: s5p-tv: mixer: support for dmabuf importing
  [media] v4l: mem2mem_testdev: add support for dmabuf importing
  [media] v4l: uvc: add support for DMABUF importing
  [media] v4l: vivi: support for dmabuf importing
  [media] v4l: vb2-vmalloc: add support for dmabuf importing
  [media] v4l: vb2-dma-contig: add support for dma_buf importing
  [media] v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator
  [media] v4l: vb2: add prepare/finish callbacks to allocators
  ...

11 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Sun, 25 Nov 2012 19:25:29 +0000 (17:25 -0200)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] rtl28xxu: 0ccd:00d7 TerraTec Cinergy T Stick+
  [media] rtl28xxu: 1d19:1102 Dexatek DK mini DVB-T Dongle
  [media] mt9v022: fix the V4L2_CID_EXPOSURE control
  [media] mx2_camera: fix missing unlock on error in mx2_start_streaming()
  [media] media: omap1_camera: fix const cropping related warnings
  [media] media: mx1_camera: use the default .set_crop() implementation
  [media] media: mx2_camera: fix const cropping related warnings
  [media] media: mx3_camera: fix const cropping related warnings
  [media] media: pxa_camera: fix const cropping related warnings
  [media] media: sh_mobile_ceu_camera: fix const cropping related warnings
  [media] media: sh_vou: fix const cropping related warnings
  [media] adv7604: restart STDI once if format is not found
  [media] adv7604: use presets where possible
  [media] adv7604: Replace prim_mode by mode
  [media] adv7604: cleanup references
  [media] dvb_usb_v2: switch interruptible mutex to normal
  [media] dvb_usb_v2: fix pid_filter callback error logging

11 years ago[media] v4l: s5p-mfc: support for dmabuf exporting
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:28 +0000 (11:32 -0300)]
[media] v4l: s5p-mfc: support for dmabuf exporting

This patch enhances s5p-mfc with support for DMABUF exporting via
VIDIOC_EXPBUF ioctl.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: s5p-tv: mixer: support for dmabuf exporting
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:27 +0000 (11:32 -0300)]
[media] v4l: s5p-tv: mixer: support for dmabuf exporting

This patch enhances s5p-tv with support for DMABUF exporting via
VIDIOC_EXPBUF ioctl.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: s5p-fimc: support for dmabuf exporting
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:26 +0000 (11:32 -0300)]
[media] v4l: s5p-fimc: support for dmabuf exporting

This patch enhances s5p-fimc with support for DMABUF exporting via
VIDIOC_EXPBUF ioctl.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: align buffer size to PAGE_SIZE
Tomasz Stanislawski [Tue, 9 Oct 2012 17:07:41 +0000 (14:07 -0300)]
[media] v4l: vb2-dma-contig: align buffer size to PAGE_SIZE

Most operations on DMA and DMABUF framework require the size of a buffer to be
page aligned. This patch guarantees the requirement is satisfied for all
vb2-dma-contig buffers.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: fail if user ptr buffer is not correctly aligned
Marek Szyprowski [Tue, 12 Jun 2012 13:18:16 +0000 (10:18 -0300)]
[media] v4l: vb2-dma-contig: fail if user ptr buffer is not correctly aligned

The DMA transfer must be aligned to a specific value. If userptr is not aligned
to DMA requirements then unexpected corruptions of the memory may occur before
or after a buffer.  To prevent such situations, all unligned userptr buffers
are rejected at VIDIOC_QBUF.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: add reference counting for a device from allocator context
Tomasz Stanislawski [Tue, 7 Aug 2012 16:19:49 +0000 (13:19 -0300)]
[media] v4l: vb2-dma-contig: add reference counting for a device from allocator context

This patch adds taking reference to the device for MMAP buffers.
Such buffers, may be exported using DMABUF mechanism. If the driver that
created a queue is unloaded then the queue is released, the device might be
released too.  However, buffers cannot be released if they are referenced by
DMABUF descriptor(s). The device pointer kept in a buffer must be valid for the
whole buffer's lifetime. Therefore MMAP buffers should take a reference to the
device to avoid risk of dangling pointers.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: add support for DMABUF exporting
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:25 +0000 (11:32 -0300)]
[media] v4l: vb2-dma-contig: add support for DMABUF exporting

This patch adds support for exporting a dma-contig buffer using
DMABUF interface.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2: add buffer exporting via dmabuf
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:24 +0000 (11:32 -0300)]
[media] v4l: vb2: add buffer exporting via dmabuf

This patch adds extension to videobuf2-core. It allow to export an mmap buffer
as a DMABUF file descriptor.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation: media: description of DMABUF exporting in V4L2
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:22 +0000 (11:32 -0300)]
[media] Documentation: media: description of DMABUF exporting in V4L2

This patch adds description and usage examples for exporting
DMABUF file descriptor in V4L2.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: add buffer exporting via dmabuf
Tomasz Stanislawski [Thu, 14 Jun 2012 14:32:23 +0000 (11:32 -0300)]
[media] v4l: add buffer exporting via dmabuf

This patch adds extension to V4L2 api. A new ioctl VIDIOC_EXPBUF is added.  The
ioctl is used to export an mmap buffer as a DMABUF file descriptor.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call
Marek Szyprowski [Thu, 14 Jun 2012 14:32:21 +0000 (11:32 -0300)]
[media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call

Let mmap method to use dma_mmap_coherent call.  Moreover, this patch removes
vb2_mmap_pfn_range from videobuf2 helpers as it was suggested by Laurent
Pinchart.  The function is no longer used in vb2 code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: s5p-fimc: support for dmabuf importing
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:49 +0000 (10:37 -0300)]
[media] v4l: s5p-fimc: support for dmabuf importing

This patch enhances s5p-fimc with support for DMABUF importing via
V4L2_MEMORY_DMABUF memory type.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: s5p-tv: mixer: support for dmabuf importing
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:48 +0000 (10:37 -0300)]
[media] v4l: s5p-tv: mixer: support for dmabuf importing

This patch enhances s5p-tv with support for DMABUF importing via
V4L2_MEMORY_DMABUF memory type.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: mem2mem_testdev: add support for dmabuf importing
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:49 +0000 (10:37 -0300)]
[media] v4l: mem2mem_testdev: add support for dmabuf importing

This patch enhances mem2mem_testdev device with support for DMABUF importing
via V4L2_MEMORY_DMABUF memory type.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: uvc: add support for DMABUF importing
Tomasz Stanislawski [Fri, 19 Oct 2012 11:54:43 +0000 (08:54 -0300)]
[media] v4l: uvc: add support for DMABUF importing

This patch enhances UVC with support for DMABUF importing via
V4L2_MEMORY_DMABUF memory type.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vivi: support for dmabuf importing
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:47 +0000 (10:37 -0300)]
[media] v4l: vivi: support for dmabuf importing

This patch enhances VIVI driver with a support for importing a buffer
from DMABUF file descriptors.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-vmalloc: add support for dmabuf importing
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:46 +0000 (10:37 -0300)]
[media] v4l: vb2-vmalloc: add support for dmabuf importing

This patch adds support for importing DMABUF files for
vmalloc allocator in Videobuf2.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: add support for dma_buf importing
Sumit Semwal [Thu, 14 Jun 2012 13:37:45 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: add support for dma_buf importing

This patch makes changes for adding dma-contig as a dma_buf user. It provides
function implementations for the {attach, detach, map, unmap}_dmabuf()
mem_ops of DMABUF memory type.
[author of the original patch]
[integration with refactored dma-contig allocator]

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator
Marek Szyprowski [Thu, 14 Jun 2012 13:37:44 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator

Add prepare/finish callbacks to vb2-dma-contig allocator.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2: add prepare/finish callbacks to allocators
Marek Szyprowski [Thu, 14 Jun 2012 13:37:43 +0000 (10:37 -0300)]
[media] v4l: vb2: add prepare/finish callbacks to allocators

This patch adds support for prepare/finish callbacks in VB2 allocators. These
callback are used for buffer flushing.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: add support for scatterlist in userptr mode
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:42 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: add support for scatterlist in userptr mode

This patch introduces usage of dma_map_sg to map memory behind
a userspace pointer to a device as dma-contiguous mapping.
This patch contains some of the code kindly provided by Marek Szyprowski
<m.szyprowski@samsung.com> and Kamil Debski <k.debski@samsung.com> and Andrzej
Pietrasiewicz <andrzej.p@samsung.com>. Kind thanks for bug reports from Laurent
Pinchart <laurent.pinchart@ideasonboard.com> and Seung-Woo Kim
<sw0312.kim@samsung.com>.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: reorder functions
Laurent Pinchart [Thu, 14 Jun 2012 13:37:41 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: reorder functions

Group functions by buffer type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: remove reference of alloc_ctx from a buffer
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:40 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: remove reference of alloc_ctx from a buffer

This patch removes a reference to alloc_ctx from an instance of a DMA
contiguous buffer. It helps to avoid a risk of a dangling pointer if the
context is released while the buffer is still valid. Moreover it removes one
dereference step while accessing a device structure.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2-dma-contig: shorten vb2_dma_contig prefix to vb2_dc
Laurent Pinchart [Thu, 14 Jun 2012 13:37:39 +0000 (10:37 -0300)]
[media] v4l: vb2-dma-contig: shorten vb2_dma_contig prefix to vb2_dc

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb: remove warnings about MEMORY_DMABUF
Sumit Semwal [Thu, 14 Jun 2012 13:37:38 +0000 (10:37 -0300)]
[media] v4l: vb: remove warnings about MEMORY_DMABUF

Adding DMABUF memory type causes videobuf to complain about not using it
in some switch cases. This patch removes these warnings.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2: add support for shared buffer (dma_buf)
Sumit Semwal [Thu, 14 Jun 2012 13:37:37 +0000 (10:37 -0300)]
[media] v4l: vb2: add support for shared buffer (dma_buf)

This patch adds support for DMABUF memory type in videobuf2. It calls relevant
APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations.
For this version, the support is for videobuf2 as a user of the shared buffer;
so the allocation of the buffer is done outside of V4L2. [A sample allocator of
dma-buf shared buffer is given at [1]]
[1]: Rob Clark's DRM:
   https://github.com/robclark/kernel-omap4/commits/drmplane-dmabuf
   [original work in the PoC for buffer sharing]

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation: media: description of DMABUF importing in V4L2
Tomasz Stanislawski [Thu, 14 Jun 2012 13:37:36 +0000 (10:37 -0300)]
[media] Documentation: media: description of DMABUF importing in V4L2

This patch adds description and usage examples for importing
DMABUF file descriptor in V4L2.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Add DMABUF as a memory type
Sumit Semwal [Thu, 14 Jun 2012 13:37:35 +0000 (10:37 -0300)]
[media] v4l: Add DMABUF as a memory type

Adds DMABUF memory type to v4l framework. Also adds the related file
descriptor in v4l2_plane and v4l2_buffer.
   [original work in the PoC for buffer sharing]

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] siano: fix build with allmodconfig
Mauro Carvalho Chehab [Fri, 23 Nov 2012 15:48:39 +0000 (13:48 -0200)]
[media] siano: fix build with allmodconfig

As reported by Stephen:

        After merging the v4l-dvb tree, today's linux-next build (x86_64
        allmodconfig) failed like this:

        ERROR: "sms_ir_exit" [drivers/media/common/siano/smsmdtv.ko] undefined!
        ERROR: "sms_ir_event" [drivers/media/common/siano/smsmdtv.ko] undefined!
        ERROR: "sms_ir_init" [drivers/media/common/siano/smsmdtv.ko] undefined!

The smsir file should be part of the smsmdtv core, if RC is defined.
Fix it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoRevert "[media] siano: fix build with allmodconfig"
Mauro Carvalho Chehab [Fri, 23 Nov 2012 15:46:50 +0000 (13:46 -0200)]
Revert "[media] siano: fix build with allmodconfig"

This reverts commit 6ee28d94c9bfa0640a7c94c289ca0df239d90a0d.

The patch got some alien code there, not sure why. Revert it to apply
it properly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ds3000: remove useless 'locking'
Rémi Cardona [Fri, 28 Sep 2012 11:59:27 +0000 (08:59 -0300)]
[media] ds3000: remove useless 'locking'

Since b9bf2eafaad9c1ef02fb3db38c74568be601a43a, the function
ds3000_firmware_ondemand() is called only once during init. This
locking scheme may have been useful when the firmware was loaded at
each tune.
Furthermore, it looks like this 'lock' was put in to prevent concurrent
access (and not recursion as the comments suggest). However, this open-
coded mechanism is anything but race-free and should have used a proper
mutex.

Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ds3000: Declare MODULE_FIRMWARE usage
Rémi Cardona [Fri, 28 Sep 2012 11:59:26 +0000 (08:59 -0300)]
[media] ds3000: Declare MODULE_FIRMWARE usage

Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx25821: Replace kmemdup for kstrdup and clean up
Peter Senna Tschudin [Mon, 17 Sep 2012 07:04:57 +0000 (04:04 -0300)]
[media] cx25821: Replace kmemdup for kstrdup and clean up

Replace kmemdup for kstrdup and cleanup related code.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx25821: fix error return code and clean up
Peter Senna Tschudin [Mon, 17 Sep 2012 07:04:56 +0000 (04:04 -0300)]
[media] cx25821: fix error return code and clean up

The function cx25821_sram_channel_setup_upstream_audio always return zero,
so the return value is not saved any more.
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return...
Peter Senna Tschudin [Sat, 8 Sep 2012 13:01:58 +0000 (10:01 -0300)]
[media] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

While here, replace strlen()+kmemdup() to kstrdup().

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: walter harms <wharms@bfs.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/usb/hdpvr/hdpvr-core.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:48 +0000 (11:23 -0300)]
[media] drivers/media/usb/hdpvr/hdpvr-core.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/usb/tm6000/tm6000-video.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:49 +0000 (11:23 -0300)]
[media] drivers/media/usb/tm6000/tm6000-video.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/radio/radio-cadet.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:52 +0000 (11:23 -0300)]
[media] drivers/media/radio/radio-cadet.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci/dm1105/dm1105.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:55 +0000 (11:23 -0300)]
[media] drivers/media/pci/dm1105/dm1105.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci/ngene/ngene-core.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:54 +0000 (11:23 -0300)]
[media] drivers/media/pci/ngene/ngene-core.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci/cx25821/cx25821-video-upstream.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:56 +0000 (11:23 -0300)]
[media] drivers/media/pci/cx25821/cx25821-video-upstream.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci/ttpci/budget-av.c: fix error return code
Peter Senna Tschudin [Thu, 6 Sep 2012 14:23:53 +0000 (11:23 -0300)]
[media] drivers/media/pci/ttpci/budget-av.c: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vpif_display: protect dma_queue by a spin_lock
Hans Verkuil [Fri, 16 Nov 2012 15:03:07 +0000 (12:03 -0300)]
[media] vpif_display: protect dma_queue by a spin_lock

The dma_queue list is accessed by both the interrupt handler and by normal
code. It needs to be protected by a lock to prevent possible list corruption.
Corruption has been observed in 'real-life' conditions. Adding this lock made
it go away.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vpif_capture: protect dma_queue by a spin_lock
Hans Verkuil [Fri, 16 Nov 2012 15:03:06 +0000 (12:03 -0300)]
[media] vpif_capture: protect dma_queue by a spin_lock

The dma_queue list is accessed by both the interrupt handler and by normal
code. It needs to be protected by a lock to prevent possible list corruption.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] davinci: vpif: fix return value check for vb2_dma_contig_init_ctx()
Wei Yongjun [Thu, 15 Nov 2012 12:18:17 +0000 (09:18 -0300)]
[media] davinci: vpif: fix return value check for vb2_dma_contig_init_ctx()

In case of error, the function vb2_dma_contig_init_ctx() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
[prabhakar.lad@ti.com: reword commit header]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] davinci: vpif_display: fix return type check for v4l2_subdev_call()
Wei Yongjun [Tue, 30 Oct 2012 12:49:38 +0000 (09:49 -0300)]
[media] davinci: vpif_display: fix return type check for v4l2_subdev_call()

The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().
The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[prabhakar.lad@ti.com: reword commit messaage]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] davinci: vpif_capture: fix return type check for v4l2_subdev_call()
Wei Yongjun [Tue, 30 Oct 2012 12:45:00 +0000 (09:45 -0300)]
[media] davinci: vpif_capture: fix return type check for v4l2_subdev_call()

The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().
The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[prabhakar.lad@ti.com: reword commit message]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: Don't warn during link validation when encountering a V4L2 devnode
Laurent Pinchart [Sat, 20 Oct 2012 20:47:22 +0000 (17:47 -0300)]
[media] v4l: Don't warn during link validation when encountering a V4L2 devnode

v4l2_subdev_link_validate_get_format() retrieves the remote pad format
depending on the entity type and prints a warning if the entity type is
not supported. The type check doesn't take the subtype into account, and
thus always prints a warning for device node types, even when supported.
Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: 0ccd:00d7 TerraTec Cinergy T Stick+
Andrew Karpow [Tue, 6 Nov 2012 23:01:16 +0000 (20:01 -0300)]
[media] rtl28xxu: 0ccd:00d7 TerraTec Cinergy T Stick+

added usb-id as driver supports the stick

Signed-off-by: Andrew Karpow <andy@mailbox.tu-berlin.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: 1d19:1102 Dexatek DK mini DVB-T Dongle
Antti Palosaari [Tue, 6 Nov 2012 19:03:35 +0000 (16:03 -0300)]
[media] rtl28xxu: 1d19:1102 Dexatek DK mini DVB-T Dongle

Add new USB ID as driver supports it.

Reported-by: Hubert Lin <hubertwslin@gmail.com>
Tested-by: Hubert Lin <hubertwslin@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v022: set y_skip_top field to zero as default
Anatolij Gustschin [Thu, 27 Sep 2012 22:05:27 +0000 (19:05 -0300)]
[media] mt9v022: set y_skip_top field to zero as default

Set "y_skip_top" to zero and revise comment as I do not see this line
corruption on two different mt9v022 setups. The first read-out line
is perfectly fine. Add mt9v022 platform data configuring y_skip_top
for platforms that have issues with the first read-out line. Set
y_skip_top to 1 for pcm990 board.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v022: support required register settings in snapshot mode
Anatolij Gustschin [Thu, 27 Sep 2012 22:52:42 +0000 (19:52 -0300)]
[media] mt9v022: support required register settings in snapshot mode

Some camera systems cannot operate mt9v022 in normal mode and use
only the snapshot mode. The TechNote for mt9v022 (TN0960) and mt9v024
(TN-09-225) describes required register settings when configuring the
snapshot operation. The snapshot mode requires that certain automatic
functions of the image sensor should be disabled or set to fixed values.
According to the TechNote bit 2 and bit 9 in the register 0x20 must be
set in snapshot mode and unset for normal operation. This applies for
mt9v022 Rev.3 and mt9v024. Add required reg. 0x20 settings dependent on
sensor chip version.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v022: add v4l2 controls for blanking
Anatolij Gustschin [Thu, 27 Sep 2012 22:03:45 +0000 (19:03 -0300)]
[media] mt9v022: add v4l2 controls for blanking

Add controls for horizontal and vertical blanking. Also add an error
message for case that the control handler init failed. Since setting
the blanking registers is done by controls now, we shouldn't change
these registers outside of the control function. Use v4l2_ctrl_s_ctrl()
to set them.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ov2640: add support for V4L2_MBUS_FMT_YUYV8_2X8, V4L2_MBUS_FMT_RGB565_2X8_BE
Frank Schäfer [Sun, 23 Sep 2012 18:28:45 +0000 (15:28 -0300)]
[media] ov2640: add support for V4L2_MBUS_FMT_YUYV8_2X8, V4L2_MBUS_FMT_RGB565_2X8_BE

This is the result of experimenting with the SpeedLink VAD Laplace webcam.
The register sequence for V4L2_MBUS_FMT_YUYV8_2X8 has been identified by
analyzing USB-logs of this device running on MS Windows.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] V4L: soc_camera: allow reading from video device if supported
Anatolij Gustschin [Fri, 24 Aug 2012 14:36:11 +0000 (11:36 -0300)]
[media] V4L: soc_camera: allow reading from video device if supported

Try reading on video device. If the camera bus driver supports reading
we can try it and return the result. Also add a debug line.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mx1_camera: mark the driver BROKEN
Shawn Guo [Fri, 21 Sep 2012 02:05:10 +0000 (23:05 -0300)]
[media] media: mx1_camera: mark the driver BROKEN

The mx1_camera driver has been broken for a few release cycles since
commit 6bd0812 (dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c).
It seems there is no one even compile tested it since then, as doing
so will end up with the following error.
  CC      drivers/media/platform/soc_camera/mx1_camera.o
In file included from drivers/media/platform/soc_camera/mx1_camera.c:44:0:
arch/arm/mach-imx/include/mach/dma-mx1-mx2.h:8:25: fatal error: mach/dma-v1.h: No such file or directory
It seems there is no one being interested in bringing it back to
work [1] so far.  Let's mark it BROKEN.
[1] https://lkml.org/lkml/2012/2/9/171

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v022: fix the V4L2_CID_EXPOSURE control
Anatolij Gustschin [Thu, 27 Sep 2012 22:04:34 +0000 (19:04 -0300)]
[media] mt9v022: fix the V4L2_CID_EXPOSURE control

Since the MT9V022_TOTAL_SHUTTER_WIDTH register is controlled in manual
mode by V4L2_CID_EXPOSURE control, it shouldn't be written directly in
mt9v022_s_crop(). In manual mode this register should be set to the
V4L2_CID_EXPOSURE control value. Changing this register directly and
outside of the actual control function means that the register value
is not in sync with the corresponding control value. Thus, the following
problem is observed:
    - setting this control initially succeeds
    - VIDIOC_S_CROP ioctl() overwrites the MT9V022_TOTAL_SHUTTER_WIDTH
      register
    - setting this control to the same value again doesn't
      result in setting the register since the control value
      was previously cached and doesn't differ
Remove MT9V022_TOTAL_SHUTTER_WIDTH register setting in mt9v022_s_crop()
and add a comment explaining why it is not needed in manual mode.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mx2_camera: fix missing unlock on error in mx2_start_streaming()
Wei Yongjun [Mon, 22 Oct 2012 05:27:28 +0000 (02:27 -0300)]
[media] mx2_camera: fix missing unlock on error in mx2_start_streaming()

Add the missing unlock on the error handle path in function
mx2_start_streaming().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: omap1_camera: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:57:17 +0000 (07:57 -0300)]
[media] media: omap1_camera: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in omap1_camera. Fix them by adjusting a function declaration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mx1_camera: use the default .set_crop() implementation
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:48:26 +0000 (07:48 -0300)]
[media] media: mx1_camera: use the default .set_crop() implementation

.set_crop() implementation in mx1_camera is identical with the default.
Remove the copy to switch to using the default stab.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mx2_camera: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:46:52 +0000 (07:46 -0300)]
[media] media: mx2_camera: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in mx2_camera. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: mx3_camera: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:39:06 +0000 (07:39 -0300)]
[media] media: mx3_camera: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in mx3_camera. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: pxa_camera: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:27:30 +0000 (07:27 -0300)]
[media] media: pxa_camera: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in pxa_camera.c. Fix them by adjusting a function declaration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: sh_mobile_ceu_camera: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 09:59:58 +0000 (06:59 -0300)]
[media] media: sh_mobile_ceu_camera: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in sh_mobile_ceu_camera. Fix them by cleanly separating writable
and read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: sh_vou: fix const cropping related warnings
Guennadi Liakhovetski [Fri, 28 Sep 2012 10:28:58 +0000 (07:28 -0300)]
[media] media: sh_vou: fix const cropping related warnings

A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in sh_vou. Fix them by cleanly separating writable and
read-only variables in cropping operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7604: restart STDI once if format is not found
Hans Verkuil [Tue, 16 Oct 2012 13:12:55 +0000 (10:12 -0300)]
[media] adv7604: restart STDI once if format is not found

The STDI block may measure wrong values, especially for lcvs and lcf. If the
driver can not find any valid timing, the STDI block is restarted to measure
the video timings again. The function will return an error, but the restart of
STDI will generate a new STDI interrupt and the format detection process will
restart.

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7604: use presets where possible
Hans Verkuil [Tue, 16 Oct 2012 13:02:05 +0000 (10:02 -0300)]
[media] adv7604: use presets where possible

Use predefined video timings (prim_mode/vid_std) when available as recommended
by Analog Devices (http://ez.analog.com/message/48267#48267).
Also remove 720p30 support since the ADV7604 can't handle that.
(http://ez.analog.com/message/61488#61488)

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: sn9c102 incorrectly blocks FMT_SN9C10X
Alan Cox [Thu, 25 Oct 2012 13:39:33 +0000 (10:39 -0300)]
[media] v4l2: sn9c102 incorrectly blocks FMT_SN9C10X

Missing break

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] pvr2: fix minor storage
Alan Cox [Thu, 25 Oct 2012 13:38:21 +0000 (10:38 -0300)]
[media] pvr2: fix minor storage

This should have break statements in it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7604: convert struct i2c_msg initialization to C99 format
Shubhrajyoti D [Thu, 25 Oct 2012 04:02:36 +0000 (01:02 -0300)]
[media] adv7604: convert struct i2c_msg initialization to C99 format

Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7604: Replace prim_mode by mode
Hans Verkuil [Tue, 16 Oct 2012 09:40:45 +0000 (06:40 -0300)]
[media] adv7604: Replace prim_mode by mode

Changes the way the primary mode is handled:
- Remove it from platform_data since it doesn't belong there.
- Add a new mode enum for use with s_routing.
- Collapse the two HDMI modes into one HDMI mode: when setting up the
  timings manually we do not need to select HDMI_COMP mode. That's only
  needed when selecting a preset.
This patch prepares for the next step where we switch to using the presets
where available.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7604: cleanup references
Hans Verkuil [Tue, 16 Oct 2012 08:46:21 +0000 (05:46 -0300)]
[media] adv7604: cleanup references

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] winbond-cir: add carrier detection
Sean Young [Wed, 24 Oct 2012 20:22:42 +0000 (17:22 -0300)]
[media] winbond-cir: add carrier detection

The winbond hardware has a counter for leading edges, which increases as
they are received. As we read raw IR from a fifo in an interrupt handler,
we cannot correlate them to specific IR pulses so we simply count all
pulses and edges until we go idle and disable the receiver.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] winbond-cir: increase IR receiver resolution
Sean Young [Wed, 24 Oct 2012 20:22:41 +0000 (17:22 -0300)]
[media] winbond-cir: increase IR receiver resolution

This is needed for carrier reporting.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] winbond-cir: fix idle mode
Sean Young [Wed, 24 Oct 2012 20:22:40 +0000 (17:22 -0300)]
[media] winbond-cir: fix idle mode

The receiver is never disabled by idle mode since rxstate never gets set
to RXSTATE_ACTIVE, so we keep on getting interrupts after the first IR
activity ends. Note that ir_raw_event_reset() already calls
ir_raw_event_handle().

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stkwebcam: Fix sparse warning on undeclared symbol
Ezequiel Garcia [Thu, 1 Nov 2012 11:42:00 +0000 (08:42 -0300)]
[media] stkwebcam: Fix sparse warning on undeclared symbol

The sparse warning is:
"drivers/media/usb/stkwebcam/stk-webcam.c:59:5:
warning: symbol 'first_init' was not declared. Should it be static?"
Declare variable 'first_init' as static and local to the function.
Found by Hans Verkuil's daily build. Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMAINTAINERS: add entries for some RC devices
Sean Young [Mon, 19 Nov 2012 13:32:53 +0000 (10:32 -0300)]
MAINTAINERS: add entries for some RC devices

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMAINTAINERS: Add entry for Davinci video drivers
Lad, Prabhakar [Mon, 19 Nov 2012 08:48:21 +0000 (05:48 -0300)]
MAINTAINERS: Add entry for Davinci video drivers

This patch adds an entry in MAINTAINERS file for
TI Davinci media drivers.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMAINTAINERS: add an entry for radio-mr800 driver
Alexey Klimov [Fri, 16 Nov 2012 20:43:59 +0000 (17:43 -0300)]
MAINTAINERS: add an entry for radio-mr800 driver

This patch adds MAINTAINERS entry for radio-mr800 usb radio driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMAINTAINERS: Add entry for S3C24XX/S3C64XX SoC CAMIF driver
Sylwester Nawrocki [Thu, 15 Nov 2012 21:05:15 +0000 (18:05 -0300)]
MAINTAINERS: Add entry for S3C24XX/S3C64XX SoC CAMIF driver

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMAINTAINERS: Update maintainer for smiapp and adp1653 drivers
Sakari Ailus [Mon, 12 Nov 2012 21:14:39 +0000 (18:14 -0300)]
MAINTAINERS: Update maintainer for smiapp and adp1653 drivers

And the smiapp-pll which is in a way part of the smiapp driver.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media:davinci: clk - {prepare/unprepare} for common clk
Murali Karicheri [Mon, 22 Oct 2012 14:41:36 +0000 (11:41 -0300)]
[media] media:davinci: clk - {prepare/unprepare} for common clk

As a first step towards migrating davinci platforms to use common clock
framework, replace all instances of clk_enable() with clk_prepare_enable()
and clk_disable() with clk_disable_unprepare().
Also fixes some issues related to clk clean up in the driver

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: vpbe: set device capabilities
Lad, Prabhakar [Mon, 22 Oct 2012 12:27:14 +0000 (09:27 -0300)]
[media] media: davinci: vpbe: set device capabilities

set device_caps and also change the driver and
bus_info to proper values as per standard.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: vpbe: migrate driver to videobuf2
Lad, Prabhakar [Mon, 22 Oct 2012 12:27:13 +0000 (09:27 -0300)]
[media] media: davinci: vpbe: migrate driver to videobuf2

This patch migrates VPBE display driver to videobuf2 framework.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: vpbe: fix build warning
Lad, Prabhakar [Fri, 9 Nov 2012 08:59:32 +0000 (05:59 -0300)]
[media] media: davinci: vpbe: fix build warning

Warnings were generated because of the following commit changed data type for
address pointer
195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add  __iomem annotation to fix following warnings
drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
 argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
 void *’ but argument is of type ‘long unsigned int’
This patch stores the ioremap_nocache() returned address in a
void __iomem * instead of a unsigned long and passes the same to
readl/writel functions which fixes the above warnings.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l, smiapp, smiapp-pll, adp1653: Update contact information
Sakari Ailus [Sun, 28 Oct 2012 09:44:17 +0000 (06:44 -0300)]
[media] v4l, smiapp, smiapp-pll, adp1653: Update contact information

Update contact information to correspond my e-mail address changes.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media: Use dev_ printks in go7007/go7007-fw.c
YAMANE Toshiaki [Mon, 5 Nov 2012 10:38:46 +0000 (07:38 -0300)]
[media] staging/media: Use dev_ printks in go7007/go7007-fw.c

fixed below checkpatch warning.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7113.c
YAMANE Toshiaki [Mon, 5 Nov 2012 10:38:12 +0000 (07:38 -0300)]
[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7113.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Staging/media: fixed spacing coding style in go7007/wis-saa7113.c
YAMANE Toshiaki [Mon, 5 Nov 2012 10:36:48 +0000 (07:36 -0300)]
[media] Staging/media: fixed spacing coding style in go7007/wis-saa7113.c

fixed below checkpatch error.
- ERROR: that open brace { should be on the previous line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7115.c
YAMANE Toshiaki [Mon, 5 Nov 2012 10:36:26 +0000 (07:36 -0300)]
[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7115.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Staging/media: fixed spacing coding style in go7007/wis-saa7115.c
YAMANE Toshiaki [Mon, 5 Nov 2012 10:35:45 +0000 (07:35 -0300)]
[media] Staging/media: fixed spacing coding style in go7007/wis-saa7115.c

fixed below checkpatch error.
- ERROR: that open brace { should be on the previous line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Staging/media: Use dev_ printks in go7007/wis-ov7640.c
YAMANE Toshiaki [Fri, 2 Nov 2012 11:09:29 +0000 (08:09 -0300)]
[media] Staging/media: Use dev_ printks in go7007/wis-ov7640.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Staging/media: fixed spacing coding style in go7007/wis-ov7640.c
YAMANE Toshiaki [Fri, 2 Nov 2012 11:08:41 +0000 (08:08 -0300)]
[media] Staging/media: fixed spacing coding style in go7007/wis-ov7640.c

fixed below checkpatch error.
- ERROR: that open brace { should be on the previous line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca-sonixb: Add USB-id for Genius Eye 310
Hans de Goede [Sun, 4 Nov 2012 20:12:10 +0000 (17:12 -0300)]
[media] gspca-sonixb: Add USB-id for Genius Eye 310

Reported through:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046608
https://bugzilla.kernel.org/show_bug.cgi?id=48111

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add an entry for the pwc webcam driver
Hans de Goede [Sun, 4 Nov 2012 20:05:59 +0000 (17:05 -0300)]
[media] MAINTAINERS: Add an entry for the pwc webcam driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add entries for the radioShark and radioShark2 drivers
Hans de Goede [Sun, 4 Nov 2012 20:03:58 +0000 (17:03 -0300)]
[media] MAINTAINERS: Add entries for the radioShark and radioShark2 drivers

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>