openwrt/staging/blogic.git
12 years ago[media] media: davinci: vpif: Add return code check at vb2_queue_init()
Lad, Prabhakar [Wed, 3 Oct 2012 13:01:07 +0000 (10:01 -0300)]
[media] media: davinci: vpif: Add return code check at vb2_queue_init()

from commit with id 896f38f582730a19eb49677105b4fe4c0270b82e
it's mandatory to check the return code of vb2_queue_init().

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: davinci: vpif: display: separate out subdev from output
Lad, Prabhakar [Tue, 25 Sep 2012 11:11:49 +0000 (08:11 -0300)]
[media] media: davinci: vpif: display: separate out subdev from output

vpif_display relied on a 1-1 mapping of output and subdev. This is not
necessarily the case. Separate the two. So there is a list of subdevs
and a list of outputs. Each output refers to a subdev and has routing
information. An output does not have to have a subdev.
The initial output for each channel is set to the fist output.
Currently missing is support for associating multiple subdevs with
an output.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvp514x: s_routing should just change routing, not try to detect a signal
Hans Verkuil [Thu, 20 Sep 2012 12:06:33 +0000 (09:06 -0300)]
[media] tvp514x: s_routing should just change routing, not try to detect a signal

The s_routing function should not try to detect a signal. It is a really
bad idea to try to detect a valid video signal and return an error if
you can't. Changing input should do just that and nothing more.
Also don't power on the ADCs on s_routing, instead do that on querystd.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] davinci: move struct vpif_interface to chan_cfg
Hans Verkuil [Thu, 20 Sep 2012 12:06:32 +0000 (09:06 -0300)]
[media] davinci: move struct vpif_interface to chan_cfg

struct vpif_interface is channel specific, not subdev specific.
Move it to the channel config.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@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>
12 years ago[media] vpif_display: use a v4l2_subdev pointer to call a subdev
Hans Verkuil [Thu, 20 Sep 2012 12:06:31 +0000 (09:06 -0300)]
[media] vpif_display: use a v4l2_subdev pointer to call a subdev

This makes it easier to have outputs without subdevs.
This needs more work. The way the outputs are configured should be identical
to how inputs are configured.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: separate subdev from input
Hans Verkuil [Thu, 20 Sep 2012 12:06:30 +0000 (09:06 -0300)]
[media] vpif_capture: separate subdev from input

vpif_capture relied on a 1-1 mapping of input and subdev. This is not
necessarily the case. Separate the two. So there is a list of subdevs
and a list of inputs. Each input refers to a subdev and has routing
information. An input does not have to have a subdev.
The initial input for each channel is set to the fist input.
Currently missing is support for associating multiple subdevs with
an input.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: fix cleanup code
Hans Verkuil [Thu, 20 Sep 2012 12:06:29 +0000 (09:06 -0300)]
[media] vpif_capture: fix cleanup code

The cleanup sequence was incorrect and could cause a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_display: fix cleanup code
Hans Verkuil [Thu, 20 Sep 2012 12:06:28 +0000 (09:06 -0300)]
[media] vpif_display: fix cleanup code

The cleanup sequence was incorrect and could cause a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_display: first init subdevs, then register device nodes
Hans Verkuil [Thu, 20 Sep 2012 12:06:27 +0000 (09:06 -0300)]
[media] vpif_display: first init subdevs, then register device nodes

When device nodes are registered they must be ready for use
immediately, so make sure the subdevs are loaded first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: first init subdevs, then register device nodes
Hans Verkuil [Thu, 20 Sep 2012 12:06:26 +0000 (09:06 -0300)]
[media] vpif_capture: first init subdevs, then register device nodes

When device nodes are registered they must be ready for use
immediately, so make sure the subdevs are loaded first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: move routing info from subdev to input
Hans Verkuil [Thu, 20 Sep 2012 12:06:25 +0000 (09:06 -0300)]
[media] vpif_capture: move routing info from subdev to input

Routing information is a property of the input, not of the subdev.
One subdev may provide multiple inputs, each with its own routing
information.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@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>
12 years ago[media] vpif_capture: remove unnecessary can_route flag
Hans Verkuil [Thu, 20 Sep 2012 12:06:24 +0000 (09:06 -0300)]
[media] vpif_capture: remove unnecessary can_route flag

Calling a subdev op that isn't implemented will just return -ENOIOCTLCMD
No need to have a flag for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@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>
12 years ago[media] vpif_display: move output_id to channel_obj
Hans Verkuil [Thu, 20 Sep 2012 12:06:23 +0000 (09:06 -0300)]
[media] vpif_display: move output_id to channel_obj

The output index does not belong to video_obj, it belongs to
channel_obj. Also rename to output_idx to be consistent with
the input_idx name used in vpif_capture.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: move input_idx to channel_obj
Hans Verkuil [Thu, 20 Sep 2012 12:06:22 +0000 (09:06 -0300)]
[media] vpif_capture: move input_idx to channel_obj

input_idx does not belong to video_obj. Move it where it belongs.
Also remove the bogus code in the open() function that suddenly
changes the input to 0 for no reason.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_display: remove unused data structures
Hans Verkuil [Thu, 20 Sep 2012 12:06:21 +0000 (09:06 -0300)]
[media] vpif_display: remove unused data structures

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] vpif_capture: remove unused data structure
Hans Verkuil [Thu, 20 Sep 2012 12:06:20 +0000 (09:06 -0300)]
[media] vpif_capture: remove unused data structure

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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>
12 years ago[media] ARM: davinci: da850 evm: Add EVM specific code for VPIF to work
Manjunath Hadli [Mon, 23 Jul 2012 11:00:58 +0000 (08:00 -0300)]
[media] ARM: davinci: da850 evm: Add EVM specific code for VPIF to work

Include the expander settings to select VPIF peripheral on
UI card and add registration call in EVM init. Also add platform
data to configure display and capture devices.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ARM: davinci: da850: Add SoC related definitions for VPIF
Manjunath Hadli [Mon, 23 Jan 2012 09:17:24 +0000 (06:17 -0300)]
[media] ARM: davinci: da850: Add SoC related definitions for VPIF

Add clock, pin mux definitions and registration function for
VPIF capture and display driver on DA850/OMAP-L138 SoC.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: davinci: vpif: add check for NULL handler
Lad, Prabhakar [Thu, 27 Sep 2012 05:33:12 +0000 (02:33 -0300)]
[media] media: davinci: vpif: add check for NULL handler

for da850/omap-l138, there is no need to setup_input_channel_mode()
and set_clock(), to avoid adding dummy code in board file just returning
zero add a check in the driver itself to call the handler only if its
not NULL.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fsl-viu: fix compiler warning
Hans Verkuil [Tue, 4 Sep 2012 13:26:45 +0000 (10:26 -0300)]
[media] fsl-viu: fix compiler warning

drivers/media/platform/fsl-viu.c: In function 'vidioc_s_fbuf':
drivers/media/platform/fsl-viu.c:867:32: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This is fall-out from this commit:
commit e6eb28c2207b9397d0ab56e238865a4ee95b7ef9
Author: Hans Verkuil <hans.verkuil@cisco.com>
    [media] v4l2: make vidioc_s_fbuf const

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: mt9p031/mt9t001/mt9v032: use V4L2_CID_TEST_PATTERN for test pattern...
Lad, Prabhakar [Tue, 25 Sep 2012 12:35:43 +0000 (09:35 -0300)]
[media] media: mt9p031/mt9t001/mt9v032: use V4L2_CID_TEST_PATTERN for test pattern control

V4L2_CID_TEST_PATTERN is now a standard control.
This patch replaces the user defined control for test
pattern to make use of standard control V4L2_CID_TEST_PATTERN.

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>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: v4l2-ctrl: add a helper function to add standard control with driver...
Lad, Prabhakar [Tue, 18 Sep 2012 18:54:38 +0000 (15:54 -0300)]
[media] media: v4l2-ctrl: add a helper function to add standard control with driver specific menu

Add helper function v4l2_ctrl_new_std_menu_items(), which adds
a standard menu control, with driver specific menu.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: v4l2-ctrls: add control for test pattern
Lad, Prabhakar [Mon, 1 Oct 2012 11:17:36 +0000 (08:17 -0300)]
[media] media: v4l2-ctrls: add control for test pattern

add V4L2_CID_TEST_PATTERN of type menu, which determines
the internal test pattern selected by the device.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Implement .get_frame_desc subdev callback
Sylwester Nawrocki [Tue, 18 Sep 2012 09:18:43 +0000 (06:18 -0300)]
[media] m5mols: Implement .get_frame_desc subdev callback

.get_frame_desc can be used by host interface driver to query
properties of captured frames, e.g. required memory buffer size.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add support for V4L2_PIX_FMT_S5C_UYVY_JPG fourcc
Sylwester Nawrocki [Mon, 24 Sep 2012 14:08:45 +0000 (11:08 -0300)]
[media] s5p-fimc: Add support for V4L2_PIX_FMT_S5C_UYVY_JPG fourcc

The V4L2_PIX_FMT_S5C_YUYV_JPG image formats consists of 2 planes, the
first containing interleaved JPEG/YUYV data and the second containing
meta data describing the interleaving method.
The image data is transferred with MIPI-CSI "User Defined Byte-Based
Data 1" type and is captured to memory by FIMC DMA engine.
The meta data is transferred using MIPI-CSI2 "Embedded 8-bit non Image
Data" and it is captured in the MIPI-CSI slave device and copied to
the bridge provided buffer.
To make sure the size of allocated buffers is correct for the subdevs
configuration when VIDIOC_STREAMON ioctl is invoked, an additional
check is added at the video pipeline validation function.
Flag FMT_FLAGS_COMPRESSED indicates the buffer size must be retrieved
from a sensor subdev.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-csis: Add support for non-image data packets capture
Sylwester Nawrocki [Fri, 21 Sep 2012 18:18:41 +0000 (15:18 -0300)]
[media] s5p-csis: Add support for non-image data packets capture

MIPI-CSI has internal memory mapped buffers for the frame embedded
(non-image) data. There are two buffers, for even and odd frames which
need to be saved after an interrupt is raised. The packet data buffers
size is 4 KiB and there is no status register in the hardware where the
actual non-image data size can be read from. Hence the driver copies
whole packet data buffer into a buffer provided by the FIMC driver.
This will form a separate plane in the user buffer.
When FIMC DMA engine is stopped by the driver due the to user space
not keeping up with buffer de-queuing the MIPI-CSIS will still run,
however it must discard data which is not captured by FIMC. Which
frames are actually capture by MIPI-CSIS is determined by means of
the s_tx_buffer subdev callback. When it is not called after a single
embedded data frame has been captured and copied and before next
embedded data frame interrupt occurrs, subsequent embedded data frames
will be dropped.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: Add V4L2_PIX_FMT_S5C_UYVY_JPG fourcc definition
Sylwester Nawrocki [Wed, 3 Oct 2012 10:44:53 +0000 (07:44 -0300)]
[media] V4L: Add V4L2_PIX_FMT_S5C_UYVY_JPG fourcc definition

This patch adds definition of the Samsung S5C73M3 camera specific
image format. V4L2_PIX_FMT_S5C_UYVY_JPG is a two-planar format,
the  first plane contains interleaved UYVY and JPEG data followed
by meta-data. The second plane contains additional meta-data needed
for extracting JPEG and UYVY data stream from the first plane.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: Add V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 media bus format
Sylwester Nawrocki [Thu, 16 Feb 2012 17:23:54 +0000 (14:23 -0300)]
[media] V4L: Add V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 media bus format

This patch adds media bus pixel code for the interleaved JPEG/UYVY
image format used by S5C73MX Samsung cameras. This interleaved image
data is transferred on MIPI-CSI2 bus as User Defined Byte-based Data.
It also defines an experimental vendor and device specific media bus
formats section and adds related DocBook documentation.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: Add [get/set]_frame_desc subdev callbacks
Sylwester Nawrocki [Thu, 17 May 2012 17:33:30 +0000 (14:33 -0300)]
[media] V4L: Add [get/set]_frame_desc subdev callbacks

Add subdev callbacks for setting up parameters of the frame on media bus
that are not exposed to user space directly. This is just an initial,
mostly stub implementation. struct v4l2_mbus_frame_desc is intended
to be extended with sub-structures specific to a particular hardware media
bus. For now these new callbacks are used only to query or specify maximum
size of a compressed or hybrid (container) media bus frame in octets.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: Add s_rx_buffer subdev video operation
Sylwester Nawrocki [Thu, 13 Sep 2012 16:08:19 +0000 (13:08 -0300)]
[media] V4L: Add s_rx_buffer subdev video operation

The s_rx_buffer callback allows the host to set buffer for a data being
received by the subdev, e.g. non-image frame (meta) data. This callback
can be implemented by subdevice like a MIPI CSI2 receiver, allowing the
host driver to gather additional data into frame buffer passed to user
space.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: fix compiler warning
Hans Verkuil [Wed, 5 Sep 2012 08:10:48 +0000 (05:10 -0300)]
[media] s5p-fimc: fix compiler warning

drivers/media/platform/s5p-fimc/fimc-m2m.c:561:2: warning: passing argument 2 of 'fimc_m2m_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
drivers/media/platform/s5p-fimc/fimc-m2m.c:502:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
This is fall-out from this commit:
commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
Author: Hans Verkuil <hans.verkuil@cisco.com>
    [media] v4l2: make vidioc_s_crop const

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: fix compiler warning
Hans Verkuil [Wed, 5 Sep 2012 08:10:48 +0000 (05:10 -0300)]
[media] s5p-g2d: fix compiler warning

drivers/media/platform/s5p-g2d/g2d.c:535:2: warning: passing argument 3 of 'vidioc_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
drivers/media/platform/s5p-g2d/g2d.c:510:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
This is fall-out from this commit:
commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
Author: Hans Verkuil <hans.verkuil@cisco.com>
    [media] v4l2: make vidioc_s_crop const

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: use clk_prepare_enable and clk_disable_unprepare
Thomas Abraham [Tue, 2 Oct 2012 23:55:02 +0000 (20:55 -0300)]
[media] s5p-jpeg: use clk_prepare_enable and clk_disable_unprepare

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] technisat-usb2: add a MODULE_DEVICE_TABLE for udev autoload
Patrick Boettcher [Mon, 1 Oct 2012 07:26:15 +0000 (04:26 -0300)]
[media] technisat-usb2: add a MODULE_DEVICE_TABLE for udev autoload

This patch adds a module-device-table-entry to the
technisat-usb2-driver which will help udev to on-demand load the
driver. This was obviously forgotten during initial commit.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] davinci: vpbe: replace V4L2_OUT_CAP_CUSTOM_TIMINGS with V4L2_OUT_CAP_DV_TIMINGS
Lad, Prabhakar [Wed, 3 Oct 2012 05:25:42 +0000 (02:25 -0300)]
[media] davinci: vpbe: replace V4L2_OUT_CAP_CUSTOM_TIMINGS with V4L2_OUT_CAP_DV_TIMINGS

This patch replaces V4L2_OUT_CAP_CUSTOM_TIMINGS macro with
V4L2_OUT_CAP_DV_TIMINGS. As V4L2_OUT_CAP_CUSTOM_TIMINGS is being phased
out.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: davinci: vpbe: fix build warning
Lad, Prabhakar [Wed, 3 Oct 2012 05:13:28 +0000 (02:13 -0300)]
[media] media: davinci: vpbe: fix build warning

recent patch with commit id 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
which makes vidioc_s_crop const, was causing a following build warning,
vpbe_display.c: In function 'vpbe_display_s_crop':
vpbe_display.c:640: warning: initialization discards qualifiers from pointer target type
This patch fixes the above build warning.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ths7303: enable THS7303 for HD modes
Manjunath Hadli [Mon, 1 Oct 2012 14:46:35 +0000 (11:46 -0300)]
[media] ths7303: enable THS7303 for HD modes

add filter settings for high def modes like 1080i,
1080p,720p and others and implementing dv_timings.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dm644x: replace the obsolete preset API by the timings API
Hans Verkuil [Mon, 1 Oct 2012 14:39:46 +0000 (11:39 -0300)]
[media] dm644x: replace the obsolete preset API by the timings API

This patch replaces the preset API by the timings API, and
appropriate changes in board file.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9033: prevent unintended underflow
Hans-Frieder Vogt [Wed, 3 Oct 2012 08:25:40 +0000 (05:25 -0300)]
[media] af9033: prevent unintended underflow

As spotted by Dan Carpenter <dan.carpenter@oracle.com> (thanks!), we have
improperly used an unsigned variable in a calculation that may result in a
negative number. This may cause an unintended underflow if the interface
frequency of the tuner is > approx. 40MHz.
This patch should resolve the issue, following an approach similar to what is
used in af9013.c.

[crope@iki.fi: add Reported-by]
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: davinci: vpfe: fix build error
Lad, Prabhakar [Mon, 1 Oct 2012 11:52:48 +0000 (08:52 -0300)]
[media] media: davinci: vpfe: fix build error

recent patch with commit id 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
which makes vidioc_s_crop const, was causing a following build error.
vpfe_capture.c: In function 'vpfe_s_crop':
vpfe_capture.c:1695: error: assignment of read-only location '*crop'
vpfe_capture.c:1706: warning: passing argument 1 of
'ccdc_dev->hw_ops.set_image_window' discards qualifiers from pointer target type
vpfe_capture.c:1706: note: expected 'struct v4l2_rect *' but argument is of
type 'const struct v4l2_rect *'
make[4]: *** [drivers/media/platform/davinci/vpfe_capture.o] Error 1

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoem28xx: regression fix: use DRX-K sync firmware requests on em28xx
Mauro Carvalho Chehab [Tue, 2 Oct 2012 19:02:57 +0000 (16:02 -0300)]
em28xx: regression fix: use DRX-K sync firmware requests on em28xx

As em28xx-dvb will always be initialized asynchronously, there's
no need anymore for a separate thread to load the DRX-K firmware.

Fixes a known regression with kernel 3.6 with tda18271 driver
and asynchronous DRX-K firmware load.

Antti tested it with the following hardware:
        Hauppauge WinTV HVR 930C
        MaxMedia UB425-TC
        PCTV QuatroStick nano (520e)

Tested-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodrxk: allow loading firmware synchrousnously
Mauro Carvalho Chehab [Tue, 2 Oct 2012 19:01:15 +0000 (16:01 -0300)]
drxk: allow loading firmware synchrousnously

Due to udev-182, the firmware load was changed to be async, as
otherwise udev would give up of loading a firmware.

Add an option to return to the previous behaviour, async firmware
loads cause failures with the tda18271 driver.

Antti tested it with the following hardware:
        Hauppauge WinTV HVR 930C
        MaxMedia UB425-TC
        PCTV QuatroStick nano (520e)

Tested-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoem28xx: Make all em28xx extensions to be initialized asynchronously
Mauro Carvalho Chehab [Tue, 2 Oct 2012 18:35:27 +0000 (15:35 -0300)]
em28xx: Make all em28xx extensions to be initialized asynchronously

em28xx-dvb, em28xx-alsa and em28xx-ir are typically initialized
asyncrhronously. The exception for it is when those modules
are loaded before em28xx (or before an em28xx card insertion) or
when they're built in.

Make the extentions to always load asynchronously. That allows
having all DVB firmwares loaded synchronously with udev-182.

Antti tested it with the following hardware:
Hauppauge WinTV HVR 930C
MaxMedia UB425-TC
PCTV QuatroStick nano (520e)

Tested-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271: properly report read errors in tda18271_get_id
Michael Krufky [Tue, 2 Oct 2012 14:04:36 +0000 (11:04 -0300)]
[media] tda18271: properly report read errors in tda18271_get_id

Until now, if there is a read error in tda18271_get_id, the driver
reports "Unknown device..."  Instead, check the return value of
tda18271_read_regs and display the appropriate error message.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271: delay IR & RF calibration until init() if delay_cal is set
Michael Krufky [Tue, 2 Oct 2012 02:50:37 +0000 (23:50 -0300)]
[media] tda18271: delay IR & RF calibration until init() if delay_cal is set

if the configuration option 'delay_cal' is set, delay both IR & RF
calibration until init() is called.
both module option 'cal' or configuration option 'rf_cal_on_startup'
will override this delay. it makes no sense to mix 'delay_cal' with
'rf_cal_on_startup' as these options conflict with each other.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as tda827x maintainer
Michael Krufky [Tue, 2 Oct 2012 03:56:33 +0000 (00:56 -0300)]
[media] MAINTAINERS: add Michael Krufky as tda827x maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as tda8290 maintainer
Michael Krufky [Tue, 2 Oct 2012 03:56:28 +0000 (00:56 -0300)]
[media] MAINTAINERS: add Michael Krufky as tda8290 maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as cxusb maintainer
Michael Krufky [Tue, 2 Oct 2012 03:56:20 +0000 (00:56 -0300)]
[media] MAINTAINERS: add Michael Krufky as cxusb maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as lg2160 maintainer
Michael Krufky [Tue, 2 Oct 2012 03:56:06 +0000 (00:56 -0300)]
[media] MAINTAINERS: add Michael Krufky as lg2160 maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as lgdt3305 maintainer
Michael Krufky [Tue, 2 Oct 2012 03:56:00 +0000 (00:56 -0300)]
[media] MAINTAINERS: add Michael Krufky as lgdt3305 maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as mxl111sf maintainer
Michael Krufky [Tue, 2 Oct 2012 03:55:50 +0000 (00:55 -0300)]
[media] MAINTAINERS: add Michael Krufky as mxl111sf maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as mxl5007t maintainer
Michael Krufky [Tue, 2 Oct 2012 03:55:41 +0000 (00:55 -0300)]
[media] MAINTAINERS: add Michael Krufky as mxl5007t maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add Michael Krufky as tda18271 maintainer
Michael Krufky [Tue, 2 Oct 2012 03:55:32 +0000 (00:55 -0300)]
[media] MAINTAINERS: add Michael Krufky as tda18271 maintainer

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap
Sylwester Nawrocki [Mon, 24 Sep 2012 09:03:04 +0000 (06:03 -0300)]
[media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap

The mixer video node supports only multi-planar API so the driver
should not be setting V4L2_CAP_VIDEO_OUTPUT flags. Fix this and
also switch to device_caps. Additionally fix the VIDIOC_ENUM_FMT
ioctl handler which now works for V4L2_BUF_TYPE_CAPTURE, rather
than expected V4L2_BUF_TYPE_CAPTURE_MPLANE.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
Sachin Kamat [Fri, 28 Sep 2012 07:01:35 +0000 (04:01 -0300)]
[media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()

return statement was wrongly placed before a code that needs to be
executed. Moved the return statement to the end of the function.
Tested suspend/resume on SMDK4412 board using 3.5-rc6 kernel.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] exynos-gsc: Add missing static storage class specifiers
Sachin Kamat [Wed, 26 Sep 2012 07:18:04 +0000 (04:18 -0300)]
[media] exynos-gsc: Add missing static storage class specifiers

Fixes the following warnings:
drivers/media/platform/exynos-gsc/gsc-core.c:313:5: warning:
symbol 'get_plane_info' was not declared. Should it be static?
drivers/media/platform/exynos-gsc/gsc-core.c:746:28: warning:
symbol 'gsc_ctrl_ops' was not declared. Should it be static?
drivers/media/platform/exynos-gsc/gsc-m2m.c:102:5: warning:
symbol 'gsc_fill_addr' was not declared. Should it be static?
drivers/media/platform/exynos-gsc/gsc-m2m.c:252:16: warning:
symbol 'gsc_m2m_qops' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] exynos-gsc: Remove <linux/version.h> header file inclusion
Sachin Kamat [Wed, 26 Sep 2012 07:18:03 +0000 (04:18 -0300)]
[media] exynos-gsc: Remove <linux/version.h> header file inclusion

version.h is not needed for these files.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
Sachin Kamat [Wed, 26 Sep 2012 08:52:24 +0000 (05:52 -0300)]
[media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()

Fixes a typo in a conditional evaluation.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-tv: Fix potential NULL pointer dereference error
Sachin Kamat [Sat, 22 Sep 2012 06:39:19 +0000 (03:39 -0300)]
[media] s5p-tv: Fix potential NULL pointer dereference error

When mdev is NULL, the error print statement will try to dereference
the NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5k6aa: Fix possible NULL pointer dereference
Sylwester Nawrocki [Wed, 26 Sep 2012 08:45:21 +0000 (05:45 -0300)]
[media] s5k6aa: Fix possible NULL pointer dereference

Make sure __s5k6aa_get_crop_rect() always returns valid pointer,
as it is assumed at the callers.
crop->which is already validated when subdev set_crop and get_crop
callbacks are called from within the v4l2-core. If it ever happens
the crop operations are called directly for some reason in kernel
space, with incorrect crop->which argument, just log it with WARN
and return reference to the TRY crop.

Reported-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: optimized code related to working contextes
Andrzej Hajda [Tue, 14 Aug 2012 09:13:40 +0000 (06:13 -0300)]
[media] s5p-mfc: optimized code related to working contextes

All code setting/clearing working context bits has been moved
to separate functions. set_bit/clear_bit have been replaced by
non-atomic variants - variable is already guarded by spin_lock.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: added support for end of stream handling in MFC encoder
Andrzej Hajda [Tue, 21 Aug 2012 11:05:32 +0000 (08:05 -0300)]
[media] s5p-mfc: added support for end of stream handling in MFC encoder

s5p-mfc encoder after receiving V4L2_ENC_CMD_STOP command
will instruct MFC device to release all encoded frames.
After dequeuing last encoded frame driver will generate
V4L2_EVENT_EOS event.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Protect driver data with a mutex
Sylwester Nawrocki [Thu, 20 Sep 2012 11:16:45 +0000 (08:16 -0300)]
[media] m5mols: Protect driver data with a mutex

Without the locking the driver's data could get corrupted when the subdev
is accessed from user space and from host driver by multiple processes.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Remove unneeded control ops assignments
Sylwester Nawrocki [Thu, 20 Sep 2012 11:11:52 +0000 (08:11 -0300)]
[media] m5mols: Remove unneeded control ops assignments

Since all host drivers using this subdev are already using
the control framework these compatibility ops can be removed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Keep local copy of sensors platform data
Sylwester Nawrocki [Mon, 17 Sep 2012 09:00:48 +0000 (06:00 -0300)]
[media] s5p-fimc: Keep local copy of sensors platform data

Use a copy of sensor platform data structure, rather than referencing
external platform data from the driver. This allows to fill the local
copy with values parsed from device tree when needed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-csis: Add transmission errors logging
Sylwester Nawrocki [Wed, 5 Sep 2012 13:10:37 +0000 (10:10 -0300)]
[media] s5p-csis: Add transmission errors logging

Add hardware event/error counters which can be dumped into the kernel
log through VIDIOC_LOG_STATUS ioctl. The counters are reset  in each
s_stream(1) call. Any errors are logged after streaming is turned off.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Add missing braces around sizeof
Sachin Kamat [Fri, 17 Aug 2012 06:22:55 +0000 (03:22 -0300)]
[media] s5p-mfc: Add missing braces around sizeof

Silences the following warnings:
WARNING: sizeof *ctx should be sizeof(*ctx)
WARNING: sizeof *dev should be sizeof(*dev)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add missing braces around sizeof
Sachin Kamat [Fri, 17 Aug 2012 06:28:27 +0000 (03:28 -0300)]
[media] s5p-fimc: Add missing braces around sizeof

Silences the following warning:
WARNING: sizeof *ctx should be sizeof(*ctx)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Replace asm/* headers with linux/*
Sachin Kamat [Fri, 17 Aug 2012 06:28:26 +0000 (03:28 -0300)]
[media] s5p-fimc: Replace asm/* headers with linux/*

Silences the following warning:
WARNING: Use #include <linux/sizes.h> instead of <asm/sizes.h>

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add pipeline ops to separate FIMC-LITE module
Sylwester Nawrocki [Tue, 14 Aug 2012 13:46:58 +0000 (10:46 -0300)]
[media] s5p-fimc: Add pipeline ops to separate FIMC-LITE module

In order to reuse the FIMC-LITE module on Exynos4 and Exynos5
SoC introduce a set of callbacks for the media pipeline control
from within FIMC/FIMC-LITE video node. It lets us avoid symbol
dependencies between FIMC-LITE and the whole media device driver,
which simplifies the initialization sequences and doesn't
introduce issues preventing common kernel image for exynos4 and
exynos5 SoCs.
This patch also corrects following build errors:
drivers/built-in.o: In function `buffer_queue':
drivers/media/video/s5p-fimc/fimc-lite.c:414: undefined reference
to `fimc_pipeline_s_stream'
drivers/built-in.o: In function `fimc_lite_resume':
drivers/media/video/s5p-fimc/fimc-lite.c:1518: undefined reference
to `fimc_pipeline_initialize'
drivers/built-in.o: In function `fimc_lite_suspend':
drivers/media/video/s5p-fimc/fimc-lite.c:1544: undefined reference
to `fimc_pipeline_shutdown'
when only CONFIG_VIDEO_EXYNOS_FIMC_LITE is selected, without
CONFIG_VIDEO_S5P_FIMC.

Reported-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: Add missing braces around sizeof
Sachin Kamat [Thu, 16 Aug 2012 11:52:58 +0000 (08:52 -0300)]
[media] s5p-jpeg: Add missing braces around sizeof

Silences the following warning:
WARNING: sizeof *ctx should be sizeof(*ctx)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: fimc-lite: Propagate frame format on the subdev
Sylwester Nawrocki [Fri, 31 Aug 2012 15:50:45 +0000 (12:50 -0300)]
[media] s5p-fimc: fimc-lite: Propagate frame format on the subdev

When setting image format on subdev's sink pad there was no
propagation to the source pad. This resulted in wrong reported
format on the source pad and wrong device configuration when
used from subdev interace level only. Correct this by propagating
format from the sink to the source pad.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: fimc-lite: Correct Bayer pixel format definitions
Sylwester Nawrocki [Wed, 5 Sep 2012 13:15:06 +0000 (10:15 -0300)]
[media] s5p-fimc: fimc-lite: Correct Bayer pixel format definitions

Replace erroneous V4L2_PIX_FMT_* entries with their V4L2_MBUS_FMT_*
counterparts. This enables use of raw Bayer formats on FIMC-LITE.?
subdevs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271: make 'low-power standby mode after attach' multi-instance safe
Michael Krufky [Sat, 29 Sep 2012 19:06:23 +0000 (16:06 -0300)]
[media] tda18271: make 'low-power standby mode after attach' multi-instance safe

Ensure that unnecessary features are powered down at the end of the
attach() function on attach of the tuner's first instance. If the
configuration requires the loop thru or xtout features, they will
remain enabled.
This must *only* be done after attaching the first instance of the tuner.
If there are multiple instances of the tuner, the bridge driver will need
to maintain power managament by itself.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda18271: enter low-power standby mode at the end of tda18271_attach()
Michael Krufky [Sat, 29 Sep 2012 19:05:26 +0000 (16:05 -0300)]
[media] tda18271: enter low-power standby mode at the end of tda18271_attach()

Ensure that unnecessary features are powered down at the end of the
attach() function.  If the configuration requires the loop thru or
xtout features, they will remain enabled.
Thanks to Antti Palosaari for noticing the additional power consumption.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: fix format enumeration: don't show invalid formats
Hans Verkuil [Mon, 1 Oct 2012 10:22:06 +0000 (07:22 -0300)]
[media] ivtv: fix format enumeration: don't show invalid formats

Depending on the device node only the compressed or the uncompressed format
should be shown, not both.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: disable a bunch of ioctls that are invalid for the decoder VBI
Hans Verkuil [Wed, 5 Sep 2012 15:28:06 +0000 (12:28 -0300)]
[media] ivtv: disable a bunch of ioctls that are invalid for the decoder VBI

The VBI capture for the decoder (/dev/vbi8) is special in that it captures
the VBI stream embedded in an MPEG stream that is being decoded.
A lot of the ioctls that would normally be valid have to be disabled since
they make no sense for such a device, and v4l2-compliance will complain
about that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: fix incorrect service_set for the decoder VBI capture
Hans Verkuil [Wed, 5 Sep 2012 15:27:19 +0000 (12:27 -0300)]
[media] ivtv: fix incorrect service_set for the decoder VBI capture

Found with v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: don't allow g/s_frequency for output device nodes
Hans Verkuil [Mon, 1 Oct 2012 09:45:36 +0000 (06:45 -0300)]
[media] ivtv: don't allow g/s_frequency for output device nodes

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: fix v4l2-compliance errors for the radio device
Hans Verkuil [Mon, 1 Oct 2012 09:23:53 +0000 (06:23 -0300)]
[media] ivtv: fix v4l2-compliance errors for the radio device

- fix error code when attempting to read from write-only streams.
- fix error code when attempting to write to read-only streams.
- don't start capturing when polling on a radio node.
- give the radio node its own file operations struct.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: fix v4l2-compliance error: inconsistent std reporting
Hans Verkuil [Wed, 5 Sep 2012 11:56:55 +0000 (08:56 -0300)]
[media] ivtv: fix v4l2-compliance error: inconsistent std reporting

The tuner input has a different standard mask than a S-Video or Composite input.
Changing the standard should change tvnorms as well for all device nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: DECODER_CMD v4l2-compliance fixes
Hans Verkuil [Wed, 5 Sep 2012 11:39:48 +0000 (08:39 -0300)]
[media] ivtv: DECODER_CMD v4l2-compliance fixes

VIDIOC_DECODER_CMD didn't return EPERM when calling PAUSE or RESUME if no
decoding is in progress.
VIDIOC_G_ENC_INDEX didn't set entries_cap or return 0 if no decoding was
in progress.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] sliced vbi: subdevs shouldn't clear the full v4l2_sliced_vbi_format struct
Hans Verkuil [Wed, 5 Sep 2012 13:38:10 +0000 (10:38 -0300)]
[media] sliced vbi: subdevs shouldn't clear the full v4l2_sliced_vbi_format struct

Various subdevs cleared the full v4l2_sliced_vbi_format struct, when
only the service_set/lines fields should have been cleared.
Due to this the io_size field was wrongly cleared to 0, causing a
v4l2-compliance error.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler
Hans Verkuil [Fri, 14 Sep 2012 10:15:03 +0000 (07:15 -0300)]
[media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler

With a filter function you can control more precisely which controls
are added. This is useful in particular for radio device nodes for
combined TV/Radio cards where you want to show just the radio-specific
controls and not controls like brightness.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: [0ccd:00d3] TerraTec Cinergy T Stick RC (Rev. 3)
Antti Palosaari [Sat, 29 Sep 2012 18:28:56 +0000 (15:28 -0300)]
[media] rtl28xxu: [0ccd:00d3] TerraTec Cinergy T Stick RC (Rev. 3)

It is RTL2832U + E4000.
Thanks to Nikolai Spasov reporting and testing!

Reported-by: Nikolai Spasov <ns@codingrobot.com>
Tested-by: Nikolai Spasov <ns@codingrobot.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fc2580: use macro for 64 bit division and reminder
Gianluca Gennari [Mon, 24 Sep 2012 10:37:18 +0000 (07:37 -0300)]
[media] fc2580: use macro for 64 bit division and reminder

Fixes the following warnings on a 32 bit system with GCC 4.4.3 and kernel Ubuntu 2.6.32-43 32 bit:
WARNING: "__udivdi3" [fc2580.ko] undefined!
WARNING: "__umoddi3" [fc2580.ko] undefined!

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fc2580: silence uninitialized variable warning
Gianluca Gennari [Mon, 24 Sep 2012 11:51:01 +0000 (08:51 -0300)]
[media] fc2580: silence uninitialized variable warning

fc2580.c: In function 'fc2580_set_params':
fc2580.c:118: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fc2580: define const as UL to silence a warning
Gianluca Gennari [Mon, 24 Sep 2012 10:37:16 +0000 (07:37 -0300)]
[media] fc2580: define const as UL to silence a warning

fc2580.c: In function 'fc2580_set_params':
fc2580.c:150: warning: this decimal constant is unsigned only in ISO C90

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: do not set PCTV 290e LNA handler if fe attach fail
Antti Palosaari [Wed, 19 Sep 2012 23:52:21 +0000 (20:52 -0300)]
[media] em28xx: do not set PCTV 290e LNA handler if fe attach fail

It was a bug that could cause oops if demodulator attach was
failed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxd2820r: use static GPIO config when GPIOLIB is undefined
Antti Palosaari [Fri, 17 Aug 2012 00:07:23 +0000 (21:07 -0300)]
[media] cxd2820r: use static GPIO config when GPIOLIB is undefined

It is fallback condition as GPIOLIB seems to be disabled by default.
Better solution is needed, maybe GPIOLIB could be enabled by default?

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: implement FE set_lna() callback
Antti Palosaari [Fri, 20 Jul 2012 01:28:56 +0000 (22:28 -0300)]
[media] em28xx: implement FE set_lna() callback

Make LNA run-time switching possible for PCTV nanoStick T2 290e!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: Add stk1160 driver
Ezequiel Garcia [Mon, 1 Oct 2012 15:41:16 +0000 (12:41 -0300)]
[media] MAINTAINERS: Add stk1160 driver

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add modules I am responsible
Antti Palosaari [Mon, 1 Oct 2012 15:28:46 +0000 (12:28 -0300)]
[media] MAINTAINERS: add modules I am responsible

All those are media modules, mostly digital television drivers.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: fix overlay support
Hans Verkuil [Tue, 4 Sep 2012 13:08:01 +0000 (10:08 -0300)]
[media] v4l2-ioctl.c: fix overlay support

The vidioc_overlay op needs an unsigned int, not an unsigned int pointer.
So we need a small function that dereferences the unsigned int pointer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media/radio/shark2: Fix build error caused by missing dependencies
Arnd Bergmann [Wed, 22 Aug 2012 17:57:01 +0000 (14:57 -0300)]
[media] media/radio/shark2: Fix build error caused by missing dependencies

Without this patch, building rand-0y2jSKT results in:

WARNING: drivers/usb/musb/musb_hdrc.o(.devinit.text+0x9b8): Section mismatch in reference from the function musb_init_controller() to the function .init.text:dma_controller_create()
The function __devinit musb_init_controller() references
a function __init dma_controller_create().
If dma_controller_create is only used by musb_init_controller then
annotate dma_controller_create with a matching annotation.

ERROR: "snd_tea575x_init" [drivers/media/radio/radio-shark.ko] undefined!
ERROR: "snd_tea575x_exit" [drivers/media/radio/radio-shark.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Fix second memory bank alignment
Kamil Debski [Fri, 20 Jul 2012 14:28:03 +0000 (11:28 -0300)]
[media] s5p-mfc: Fix second memory bank alignment

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Fix setup of initial links to FIMC entities
Sylwester Nawrocki [Thu, 16 Aug 2012 17:06:41 +0000 (14:06 -0300)]
[media] s5p-fimc: Fix setup of initial links to FIMC entities

This patch fixes regression introduced in commit
4af813108b880e96a4b8b01e162f950a4aaa2475. Missing pointers
to the sensor subdevs are restored along with subdev callback
notifications to a corresponding FIMC instance driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode
Sylwester Nawrocki [Tue, 7 Aug 2012 07:58:35 +0000 (04:58 -0300)]
[media] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode

Fixes following warnings on 64-bit architectures:

m5mols.h: In function 'm5mols_set_ctrl_mode':
m5mols.h:326:15: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]

m5mols.h: In function 'm5mols_get_ctrl_mode':
m5mols.h:331:9: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

drivers/media/i2c/m5mols/m5mols_controls.c:466:2: warning: cast
from pointer to integer of different size

Cc: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Add missing free_irq() on error path
Sylwester Nawrocki [Thu, 16 Aug 2012 14:15:00 +0000 (11:15 -0300)]
[media] m5mols: Add missing free_irq() on error path

Make sure the interrupt is freed when driver probing fails.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Don't allocate fimc-m2m video device dynamically
Sylwester Nawrocki [Thu, 26 Jul 2012 10:59:11 +0000 (07:59 -0300)]
[media] s5p-fimc: Don't allocate fimc-m2m video device dynamically

There is no need to to dynamically allocate struct video_device
for the M2M devices, so embed it instead in driver's private
data structure as it is done in case of fimc-capture and fimc-lite,
where it solves some bugs on cleanup paths.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>