OSDN Git Service

uclinux-h8/linux.git
10 years ago[media] staging/solo6x10: SOLO6X10 should select BITREVERSE
Geert Uytterhoeven [Sun, 6 Jul 2014 08:58:41 +0000 (05:58 -0300)]
[media] staging/solo6x10: SOLO6X10 should select BITREVERSE

If CONFIG_SOLO6X10=y, but CONFIG_BITREVERSE=m:

    drivers/built-in.o: In function `solo_osd_print':
    (.text+0x1c7a1f): undefined reference to `byte_rev_table'
    make: *** [vmlinux] Error 1

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] hdpvr: fix reported HDTV colorspace
Hans Verkuil [Sat, 5 Jul 2014 08:51:55 +0000 (05:51 -0300)]
[media] hdpvr: fix reported HDTV colorspace

The colorspace for HDTV is REC709, not SMPTE240M.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: add support for Hauppauge ImpactVCB-e
Hans Verkuil [Fri, 27 Jun 2014 14:15:42 +0000 (11:15 -0300)]
[media] cx23885: add support for Hauppauge ImpactVCB-e

Add support for Hauppauge model 71100: WinTV-ImpactVCB-e
(PCIe, Retail, half height)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed
Hans Verkuil [Thu, 17 Jul 2014 21:45:45 +0000 (18:45 -0300)]
[media] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed

Otherwise you cannot get the current clip and bitmap information from
an overlay.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: call g_selection before calling cropcap
Hans Verkuil [Fri, 13 Jun 2014 07:31:06 +0000 (04:31 -0300)]
[media] v4l2-ioctl: call g_selection before calling cropcap

If the vidioc_cropcap op is implemented by the driver then the v4l2
core will call that directly.

If g_selection is available, then the core cropcap implementation
uses g_selection to fill in the bounds and defrect and it sets the
pixelaspect to 1x1.

But if both are available, then I would like to use g_selection to
fill in defrect and bounds before calling cropcap. That way the
driver's cropcap implementation doesn't have to set defrect or
bounds.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: clear reserved field of G/S_SELECTION
Hans Verkuil [Mon, 24 Mar 2014 12:51:34 +0000 (09:51 -0300)]
[media] v4l2-ioctl: clear reserved field of G/S_SELECTION

Be sure that the reserved fields are cleared.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: remove pointless INFO_FL_CLEAR
Hans Verkuil [Fri, 14 Mar 2014 14:52:38 +0000 (11:52 -0300)]
[media] v4l2-ioctl: remove pointless INFO_FL_CLEAR

The edid field is the last field of the struct, so there is nothing to clear.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-dev: don't debug poll unless the debug level > 2
Hans Verkuil [Mon, 3 Mar 2014 09:47:38 +0000 (06:47 -0300)]
[media] v4l2-dev: don't debug poll unless the debug level > 2

Some applications poll a lot, so prevent the poll message from flooding
the log.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro
Hans Verkuil [Wed, 26 Feb 2014 21:22:05 +0000 (18:22 -0300)]
[media] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro

Add a macro to test if the field consists of a single top
or bottom field. Anyone who needs to work with fields as opposed to
frame will need this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr
Hans Verkuil [Thu, 10 Jul 2014 22:51:26 +0000 (19:51 -0300)]
[media] v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr

The VIDIOC_STREAMON/OFF ioctls are not valid for radio devices, just
like the other streaming I/O ioctls. Add the streamon/off ioctls
to the other streaming I/O ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl.c: fix enum_freq_bands handling
Hans Verkuil [Fri, 11 Jul 2014 10:01:39 +0000 (07:01 -0300)]
[media] v4l2-ioctl.c: fix enum_freq_bands handling

If the driver supports enum_freq_bands, but only for certain device
nodes, then it may return -ENOTTY. But in that case the code should
fall into the fall-back case where the current tuner/modulator range
is returned.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl.c: check vfl_type in ENUM_FMT
Hans Verkuil [Sat, 12 Jul 2014 10:54:26 +0000 (07:54 -0300)]
[media] v4l2-ioctl.c: check vfl_type in ENUM_FMT

The other format ioctls (g/s/try_fmt) all check if the passed buffer type
makes sense for the device node's vfl_type. E.g. it makes no sense for a
VBI buffer type to be passed through a video node instead of a vbi node.

But this check was missing in ENUM_FMT which can cause a problem if you
have both video and sdr device nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: fix incorrect header reference
Hans Verkuil [Tue, 17 Jun 2014 13:43:46 +0000 (10:43 -0300)]
[media] DocBook media: fix incorrect header reference

The text referred to videodev.h when videodev2.h was meant. Fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: add missing dqevent src_change field
Hans Verkuil [Fri, 13 Jun 2014 12:28:59 +0000 (09:28 -0300)]
[media] DocBook media: add missing dqevent src_change field

The v4l2_event union has a new src_change field, but that was never
added to the VIDIOC_DQEVENT documentation of that union. Fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: fix wrong spacing
Hans Verkuil [Fri, 13 Jun 2014 07:47:37 +0000 (04:47 -0300)]
[media] DocBook media: fix wrong spacing

There shouldn't be any spaces after <constant> or before </constant>.
This leads to ugly results like: 'image size set by VIDIOC_S_FMT .'

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: Add the OMAP4 ISS driver
Laurent Pinchart [Fri, 6 Jun 2014 15:08:59 +0000 (12:08 -0300)]
[media] MAINTAINERS: Add the OMAP4 ISS driver

Update the OMAP Image Signal Processor entry to cover both the OMAP3 ISP
and OMAP4 ISS.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: Signal fatal errors to the vb2 queue
Laurent Pinchart [Tue, 3 Jun 2014 22:25:06 +0000 (19:25 -0300)]
[media] v4l: omap4iss: Signal fatal errors to the vb2 queue

When a fatal error occurs in the pipeline signal it to the vb2 queue
with a call to vb2_queue_error(). The queue will then take care to
return -EIO when preparing buffers, remove the driver-specific code that
now duplicates that check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: Use the devm_* managed allocators
Laurent Pinchart [Fri, 6 Jun 2014 14:59:04 +0000 (11:59 -0300)]
[media] v4l: omap4iss: Use the devm_* managed allocators

This simplifies remove and error code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: Add module debug parameter
Laurent Pinchart [Tue, 3 Jun 2014 20:49:41 +0000 (17:49 -0300)]
[media] v4l: omap4iss: Add module debug parameter

The parameter is used to initialize the video node debug field and
activate the V4L debug infrastructure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon
Laurent Pinchart [Tue, 3 Jun 2014 22:23:16 +0000 (19:23 -0300)]
[media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon

Initialize the spin lock once only when initializing the video object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: Copy paste error in iss_get_clocks
Vitaly Osipov [Thu, 5 Jun 2014 07:07:48 +0000 (04:07 -0300)]
[media] v4l: omap4iss: Copy paste error in iss_get_clocks

It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The
current code looks like an oversight in pasting the block just above
this one.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: omap4iss: tighten omap4iss dependencies
Arnd Bergmann [Wed, 11 Jun 2014 14:49:31 +0000 (11:49 -0300)]
[media] v4l: omap4iss: tighten omap4iss dependencies

The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
of which can be loadable modules. This causes build failures
if we want the camera driver to be built-in.

This can be solved by turning the option into "tristate",
which unfortunately causes another problem, because the
driver incorrectly calls a platform-internal interface
for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.

Instead, this patch just forbids the invalid configurations
and ensures that the driver can only be built if all its
dependencies are built-in.

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vb2: Add fatal error condition flag
Laurent Pinchart [Tue, 3 Jun 2014 21:53:25 +0000 (18:53 -0300)]
[media] v4l: vb2: Add fatal error condition flag

When a fatal error occurs that render the device unusable, the only
options for a driver to signal the error condition to userspace is to
set the V4L2_BUF_FLAG_ERROR flag when dequeuing buffers and to return an
error from the buffer prepare handler when queuing buffers.

The buffer error flag indicates a transient error and can't be used by
applications to detect fatal errors. Returning an error from vb2_qbuf()
is thus the only real indication that a fatal error occurred. However,
this is difficult to handle for multithreaded applications that requeue
buffers from a thread other than the control thread. In particular the
poll() call in the control thread will not notify userspace of the
error.

This patch adds an explicit mechanism to report fatal errors to
userspace. Drivers can call the vb2_queue_error() function to signal a
fatal error. From this moment on, buffer preparation will return -EIO to
userspace, and vb2_poll() will set the POLLERR flag and return
immediately. The error flag is cleared when cancelling the queue, either
at stream off time (through vb2_streamoff) or when releasing the queue
with vb2_queue_release().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vb2: Don't return POLLERR during transient buffer underruns
Laurent Pinchart [Tue, 3 Jun 2014 20:41:06 +0000 (17:41 -0300)]
[media] v4l: vb2: Don't return POLLERR during transient buffer underruns

The V4L2 specification states that

"When the application did not call VIDIOC_QBUF or VIDIOC_STREAMON yet
the poll() function succeeds, but sets the POLLERR flag in the revents
field."

The vb2_poll() function sets POLLERR when the queued buffers list is
empty, regardless of whether this is caused by the stream not being
active yet, or by a transient buffer underrun.

Bring the implementation in line with the specification by returning
POLLERR if no buffer has been queued only when the queue is not
streaming. Buffer underruns during streaming are not treated specially
anymore and just result in poll() blocking until the next event.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: uds: Fix scaling of alpha layer
Laurent Pinchart [Sat, 31 May 2014 00:45:48 +0000 (21:45 -0300)]
[media] v4l: vsp1: uds: Fix scaling of alpha layer

Pixel color components can be scaled using either bilinear interpolation
or a multitap filter. The multitap filter provides better results, but
can't be selected when the alpha layer need to be scaled down by more
than 1/2.

Disable alpha scaling when the input has a fixed alpha value, and
program the UDS to output a fixed alpha value in that case. This ensures
the multitap filter will be used whenever possible.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: bru: Make the background color configurable
Laurent Pinchart [Wed, 28 May 2014 01:46:30 +0000 (22:46 -0300)]
[media] v4l: vsp1: bru: Make the background color configurable

Expose the background color to userspace through the V4L2_CID_BG_COLOR
control.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: bru: Support non-premultiplied colors at the BRU output
Laurent Pinchart [Tue, 27 May 2014 23:35:36 +0000 (20:35 -0300)]
[media] v4l: vsp1: bru: Support non-premultiplied colors at the BRU output

The BRU outputs premultiplied colors, enable color data normalization
when the format configured at the output of the pipeline isn't
premultiplied.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: bru: Support premultiplied alpha at the BRU inputs
Laurent Pinchart [Tue, 27 May 2014 23:35:36 +0000 (20:35 -0300)]
[media] v4l: vsp1: bru: Support premultiplied alpha at the BRU inputs

Adjust the BRU blending formula to avoid the multiplication by alpha
when the corresponding input format is premultiplied. As this requires
access to the RPFs connected to the BRU inputs from the BRU module,
store pointers to the RPFs in the BRU structure when validating the
pipeline.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Add V4L2_CID_ALPHA_COMPONENT control support
Laurent Pinchart [Wed, 21 May 2014 22:00:05 +0000 (19:00 -0300)]
[media] v4l: vsp1: Add V4L2_CID_ALPHA_COMPONENT control support

The control is used to configure the fixed alpha channel value, when
reading from memory in the RPF or writing to memory in the WPF.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Add alpha channel support to the memory ports
Laurent Pinchart [Mon, 26 May 2014 23:12:53 +0000 (20:12 -0300)]
[media] v4l: vsp1: Add alpha channel support to the memory ports

Support ARGB formats on the RPF side by reading the alpha component from
memory and on the WPF side by writing it to memory.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Switch to XRGB formats
Laurent Pinchart [Mon, 26 May 2014 22:57:21 +0000 (19:57 -0300)]
[media] v4l: vsp1: Switch to XRGB formats

The driver ignores the alpha component on output video nodes and
hardcodes the alpha component to 0 on capture video nodes. Make this
explicit by exposing XRGB formats.

Compatibility with existing userspace applications is handled by
selecting the XRGB format corresponding to the requested old RGB format.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: wpf: Clear RPF to WPF association at stream off time
Laurent Pinchart [Wed, 28 May 2014 16:10:33 +0000 (13:10 -0300)]
[media] v4l: vsp1: wpf: Clear RPF to WPF association at stream off time

The VSP1 stores the video pipelines' input (RPF) to output (WPF)
mappings in a WPF register. An RPF must never be associated with
multiple WPFs, even if all of those WPFs but one are unused, otherwise
the hardware won't function properly.

The driver doesn't ensure this correctly as it never clears the
mappings. An RPF used with one WPF and later with a different WPF will
lead to malfunction, as it will be associated with two WPFs. Clear the
mappings at stream off time to fix this.

Reported-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: wpf: Simplify cast to pipeline structure
Laurent Pinchart [Tue, 27 May 2014 23:35:36 +0000 (20:35 -0300)]
[media] v4l: vsp1: wpf: Simplify cast to pipeline structure

Use the subdev pointer directly to_vsp1_pipeline() macro instead of
casting from the subdev to the wpf object and back to the subdev.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: sru: Make the intensity controllable during streaming
Laurent Pinchart [Sat, 31 May 2014 23:30:11 +0000 (20:30 -0300)]
[media] v4l: vsp1: sru: Make the intensity controllable during streaming

The control value is currently stored in the SRU structure by the
control set handler and written to the hardware at stream on time,
making control set during streaming ineffective. Fix it by writing to
the registers from within the control set handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: sru: Fix the intensity control default value
Laurent Pinchart [Wed, 21 May 2014 22:00:05 +0000 (19:00 -0300)]
[media] v4l: vsp1: sru: Fix the intensity control default value

The default value isn't set and defaults to 0, which isn't in the 1-6
min-max range. Fix it by setting the default value to 1.

This shoud have been caught when checking the control handler error
field at initialization time, but the check was missing. Add it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Setup control handler automatically at stream on time
Laurent Pinchart [Sat, 31 May 2014 13:40:51 +0000 (10:40 -0300)]
[media] v4l: vsp1: Setup control handler automatically at stream on time

When setting a control directly on a subdev node the VSP1 driver doesn't
guarantee that the device is powered on. This leads to crashes when the
control handlers writes to hardware registers. One easy way to fix this
is to ensure that the device gets powered on when a subdev node is
opened. However, this consumes power unnecessarily, as there's no need
to power the device on when setting formats on the pipeline.
Furthermore, control handler setup at entity init time suffers from the
same problem as the device isn't powered on easier.

Fix this by extend the entity base object to setup the control handler
automatically when starting the stream. Entities must then skip writing
to registers in the set control handler when not streaming, which can be
tested with the new vsp1_entity_is_streaming() helper function.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Propagate vsp1_device_get errors to the callers
Laurent Pinchart [Sat, 31 May 2014 11:50:32 +0000 (08:50 -0300)]
[media] v4l: vsp1: Propagate vsp1_device_get errors to the callers

Modify the vsp1_device_get() function to return an error code instead of
a pointer to the VSP1 device, and use the return value in the callers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Cleanup video nodes at removal time
Laurent Pinchart [Wed, 28 May 2014 15:49:13 +0000 (12:49 -0300)]
[media] v4l: vsp1: Cleanup video nodes at removal time

Video nodes created and initialized in the RPF and WPF init code paths
are never unregistered, and the related resources (videobuf alloc
context and media entity) never released.

Fix this by storing a pointer to the vsp1_video object in vsp1_entity
and calling vsp1_video_cleanup() from vsp1_entity_destroy(). This also
allows simplifying the init error code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Fix typos
Laurent Pinchart [Tue, 27 May 2014 15:59:39 +0000 (12:59 -0300)]
[media] v4l: vsp1: Fix typos

Several macros were mistakenly prefixed with VPS1 instead of VSP1. Fix
them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Fix pipeline stop timeout
Laurent Pinchart [Mon, 23 Jun 2014 20:15:02 +0000 (17:15 -0300)]
[media] v4l: vsp1: Fix pipeline stop timeout

If the pipeline was already stopped when stopping the stream, no
frame end interrupt will be generated and the driver will time out
waiting for the pipeline to stop.

Fix this by setting the pipeline state to STOPPED when the pipeline is
idle waiting for frames to process, and to STOPPING at stream stop time
only when the pipeline is currently RUNNING.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Release buffers at stream stop
Laurent Pinchart [Mon, 23 Jun 2014 19:57:22 +0000 (16:57 -0300)]
[media] v4l: vsp1: Release buffers at stream stop

videobuf2 expects no buffer to be owned by the driver when the
stop_stream queue operation returns. As the vsp1 driver fails to do so,
a warning is generated at stream top time.

Fix this by releasing all buffers queued on the IRQ queue in the
stop_stream operation handler and marking them as erroneous.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Fix routing cleanup when stopping the stream
Laurent Pinchart [Mon, 23 Jun 2014 21:40:49 +0000 (18:40 -0300)]
[media] v4l: vsp1: Fix routing cleanup when stopping the stream

Commit d9b45ed3d8b75e8cf38c8cd1563c29217eecba27 ("v4l: vsp1: Support
multi-input entities") reworked pipeline routing configuration and
introduced a bug by writing to the entities routing registers without
first checking whether the entity had a routing register. This results
in overwriting the value at offset 0 of the device register space when
stopping the stream.

Fix this by skipping routing register write for entities without a
routing register.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vb2: Fix stream start and buffer completion race
Laurent Pinchart [Mon, 23 Jun 2014 21:00:22 +0000 (18:00 -0300)]
[media] v4l: vb2: Fix stream start and buffer completion race

videobuf2 stores the driver streaming state internally in the queue in
the start_streaming_called variable. The state is set right after the
driver start_stream operation returns, and checked in the
vb2_buffer_done() function, typically called from the frame completion
interrupt handler. A race condition exists if the hardware finishes
processing the first frame before the start_stream operation returns.

Fix this by setting start_streaming_called to 1 before calling the
start_stream operation, and resetting it to 0 if the operation fails.

Cc: stable@vger.kernel.org # for v3.15 and up
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: Add premultiplied alpha flag for pixel formats
Laurent Pinchart [Tue, 27 May 2014 13:12:43 +0000 (10:12 -0300)]
[media] v4l: Add premultiplied alpha flag for pixel formats

When set, the new V4L2_PIX_FMT_FLAG_PREMUL_ALPHA flag indicates that the
pixel values are premultiplied by the alpha channel value.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: Support extending the v4l2_pix_format structure
Laurent Pinchart [Tue, 27 May 2014 12:41:05 +0000 (09:41 -0300)]
[media] v4l: Support extending the v4l2_pix_format structure

The v4l2_pix_format structure has no reserved field. It is embedded in
the v4l2_framebuffer structure which has no reserved fields either, and
in the v4l2_format structure which has reserved fields that were not
previously required to be zeroed out by applications.

To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer
structure, and use the priv field as a magic value to indicate that the
application has set all v4l2_pix_format extended fields and zeroed all
reserved fields following the v4l2_pix_format field in the v4l2_format
structure.

The availability of this API extension is reported to userspace through
the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the
priv field is still set to the magic value at [GS]_FMT return wouldn't
be enough, as older kernels don't zero the priv field on return.

To simplify the internal API towards drivers zero the extended fields
and set the priv field to the magic value for applications not aware of
the extensions.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: media: Document ALPHA_COMPONENT control usage on output devices
Laurent Pinchart [Wed, 21 May 2014 22:16:01 +0000 (19:16 -0300)]
[media] DocBook: media: Document ALPHA_COMPONENT control usage on output devices

Extend the V4L2_CID_ALPHA_COMPONENT control for use on output devices,
to set the alpha component value when the output format doesn't have an
alpha channel.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: Add ARGB and XRGB pixel formats
Laurent Pinchart [Thu, 22 May 2014 01:07:55 +0000 (22:07 -0300)]
[media] v4l: Add ARGB and XRGB pixel formats

The existing RGB pixel formats are ill-defined in respect to their alpha
bits and their meaning is driver dependent. Create new standard ARGB and
XRGB variants with clearly defined meanings and make the existing
variants deprecated.

The new pixel formats 4CC values have been selected to match the DRM
4CCs for the same in-memory formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Fix 64-bit division fall-out from 64-bit control ranges
Hans Verkuil [Thu, 17 Jul 2014 15:31:23 +0000 (12:31 -0300)]
[media] Fix 64-bit division fall-out from 64-bit control ranges

Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges
to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value
control values in a division or modulus operations since not all architectures support
those natively.

Luckily, in almost all cases it is possible to just cast to 32 bits (the control value
is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to
use do_div in one function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook improvement for U8 and U16 control types
Hans Verkuil [Thu, 17 Jul 2014 13:47:56 +0000 (10:47 -0300)]
[media] DocBook improvement for U8 and U16 control types

Removed the "This type is only used-in array controls." sentence in DocBook
which was thought to only confuse.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] go7007: add motion detection support
Hans Verkuil [Tue, 10 Jun 2014 10:39:04 +0000 (07:39 -0300)]
[media] go7007: add motion detection support

This patch adds motion detection support to the go7007 driver using the new
motion detection controls, events.

The global motion detection works fine, but the regional motion detection
support probably needs more work. There seems to be some interaction between
regions that makes setting correct thresholds difficult. The exact meaning of
the thresholds isn't entirely clear either.

I do not have any documentation, the only information I have is the custom code
in the driver and a modet.c application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: check dma_map_sg() return value
Hans Verkuil [Sat, 15 Feb 2014 12:15:53 +0000 (09:15 -0300)]
[media] solo6x10: check dma_map_sg() return value

The dma_map_sg() function can fail, so check for the return value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: fix 'dma from stack' warning
Hans Verkuil [Fri, 7 Feb 2014 17:51:24 +0000 (14:51 -0300)]
[media] solo6x10: fix 'dma from stack' warning

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: implement the motion detection event
Hans Verkuil [Mon, 27 Jan 2014 14:16:05 +0000 (11:16 -0300)]
[media] solo6x10: implement the motion detection event

Use the new motion detection event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: implement the new motion detection controls
Hans Verkuil [Tue, 10 Jun 2014 10:37:30 +0000 (07:37 -0300)]
[media] solo6x10: implement the new motion detection controls

Replace the custom ioctls to set motion detection thresholds by standard
matrix controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: document new v4l motion detection event
Hans Verkuil [Fri, 31 Jan 2014 09:22:58 +0000 (06:22 -0300)]
[media] DocBook: document new v4l motion detection event

Document the new motion detection event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2: add a motion detection event
Hans Verkuil [Mon, 27 Jan 2014 12:26:23 +0000 (09:26 -0300)]
[media] v4l2: add a motion detection event

Add a new MOTION_DET event to signal when motion is detected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: document new motion detection controls
Hans Verkuil [Fri, 28 Mar 2014 16:01:42 +0000 (13:01 -0300)]
[media] DocBook media: document new motion detection controls

Document the 'Detect' control class and the new Motion Detection controls.
Those controls will be used by the solo6x10 and go7007 drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls/v4l2-controls.h: add MD controls
Hans Verkuil [Fri, 28 Mar 2014 16:00:08 +0000 (13:00 -0300)]
[media] v4l2-ctrls/v4l2-controls.h: add MD controls

Add the 'Detect' control class and the new motion detection controls.
Those controls will be used by the solo6x10 and go7007 drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: fix comments
Hans Verkuil [Mon, 27 Jan 2014 14:03:34 +0000 (11:03 -0300)]
[media] v4l2-ctrls: fix comments

Various comments referred to videodev2.h, but the control definitions have
been moved to v4l2-controls.h.

Also add the same reminder message to each class of controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: document new u8 and u16 control types
Hans Verkuil [Tue, 10 Jun 2014 10:34:31 +0000 (07:34 -0300)]
[media] DocBook media: document new u8 and u16 control types

These types are needed for the upcoming Motion Detection matrix
controls, so document them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls/videodev2.h: add u8 and u16 types
Hans Verkuil [Tue, 10 Jun 2014 10:30:04 +0000 (07:30 -0300)]
[media] v4l2-ctrls/videodev2.h: add u8 and u16 types

These are needed by the upcoming patches for the motion detection
matrices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-controls.txt: update to the new way of accessing controls
Hans Verkuil [Mon, 20 Jan 2014 10:21:31 +0000 (07:21 -0300)]
[media] v4l2-controls.txt: update to the new way of accessing controls

The way current and new values are accessed has changed. Update the
document to bring it up to date with the code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: update control section
Hans Verkuil [Mon, 5 May 2014 13:16:49 +0000 (10:16 -0300)]
[media] DocBook media: update control section

Document the support for compound types in controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: improve control section
Hans Verkuil [Mon, 5 May 2014 13:16:49 +0000 (10:16 -0300)]
[media] DocBook media: improve control section

Improve the control section:

- Clarify the handling of private controls
- Explain the V4L2_CTRL_FLAG_INACTIVE flag
- Remove obsolete text regarding missing control event (we have them
  today) and the incorrect V4L2_CTRL_FLAG_DISABLED reference.
- Add a code example on how to enumerate over user controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: fix coding style in the control example code
Hans Verkuil [Mon, 27 Jan 2014 09:11:08 +0000 (06:11 -0300)]
[media] DocBook media: fix coding style in the control example code

Use the proper kernel coding style in these examples.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: update VIDIOC_G/S/TRY_EXT_CTRLS
Hans Verkuil [Fri, 4 Apr 2014 11:14:55 +0000 (08:14 -0300)]
[media] DocBook media: update VIDIOC_G/S/TRY_EXT_CTRLS

Document the support for the new compound type controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: document VIDIOC_QUERY_EXT_CTRL
Hans Verkuil [Tue, 10 Jun 2014 10:21:04 +0000 (07:21 -0300)]
[media] DocBook media: document VIDIOC_QUERY_EXT_CTRL

Document the new VIDIOC_QUERY_EXT_CTRL ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrl: fix error return of copy_to/from_user
Hans Verkuil [Tue, 10 Jun 2014 10:07:38 +0000 (07:07 -0300)]
[media] v4l2-ctrl: fix error return of copy_to/from_user

copy_to/from_user returns the number of bytes not copied, it does not
return a 'normal' linux error code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: return elem_size instead of strlen
Hans Verkuil [Sat, 18 Jan 2014 09:06:01 +0000 (06:06 -0300)]
[media] v4l2-ctrls: return elem_size instead of strlen

When getting a string and the size given by the application is too
short return the max length the string can have (elem_size) instead
of the string length + 1. That makes more sense.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: add array support
Hans Verkuil [Tue, 10 Jun 2014 10:06:50 +0000 (07:06 -0300)]
[media] v4l2-ctrls: add array support

Finish the userspace-facing array support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: type_ops can handle array elements
Hans Verkuil [Sun, 5 Jan 2014 14:06:05 +0000 (11:06 -0300)]
[media] v4l2-ctrls: type_ops can handle array elements

Extend the control type operations to handle N-dimensional array elements.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: prepare for array support
Hans Verkuil [Tue, 10 Jun 2014 10:55:00 +0000 (07:55 -0300)]
[media] v4l2-ctrls: prepare for array support

Add core support for N-dimensional arrays.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: prepare for array support
Hans Verkuil [Thu, 12 Jun 2014 10:55:21 +0000 (07:55 -0300)]
[media] v4l2-ctrls: prepare for array support

Add dims, nr_of_dims and elems fields to the core control structures in preparation
for N-dimensional array support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: use ptrs for all but the s32 type
Hans Verkuil [Sun, 27 Apr 2014 06:38:13 +0000 (03:38 -0300)]
[media] v4l2-ctrls: use ptrs for all but the s32 type

Rather than having two unions for all types just keep 'val' and
'cur.val' and use the p_cur and p_new unions to access all others.

The only reason for keeping 'val' and 'cur.val' is that it is used
all over, so converting this as well would be a huge job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: compare values only once
Hans Verkuil [Fri, 17 Jan 2014 11:25:26 +0000 (08:25 -0300)]
[media] v4l2-ctrls: compare values only once

When setting a control the control's new value is compared to the current
value twice: once by new_to_cur(), once by cluster_changed(). Not a big
deal when dealing with simple values, but it can be a problem when dealing
with compound types or arrays. So fix this: cluster_changed() sets the
has_changed flag, which is used by new_to_cur() instead of having to do
another compare.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: rewrite copy routines to operate on union v4l2_ctrl_ptr
Hans Verkuil [Sun, 27 Apr 2014 06:26:30 +0000 (03:26 -0300)]
[media] v4l2-ctrls: rewrite copy routines to operate on union v4l2_ctrl_ptr

In order to implement array support and (for the future) configuration stores
we need to have more generic copy routines that all operate on the v4l2_ctrl_ptr
union. So instead of e.g. using ctrl->cur.string it uses ptr.p_char. This makes
e.g. cur_to_user generic so it can be used to copy any v4l2_ctrl_ptr value to
userspace, not just the (hardcoded) current value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: create type_ops
Hans Verkuil [Sun, 27 Apr 2014 06:22:17 +0000 (03:22 -0300)]
[media] v4l2-ctrls: create type_ops

Since compound controls can have non-standard types we need to be able to do
type-specific checks etc. In order to make that easy type operations are added.
There are four operations:

- equal: check if two values are equal
- init: initialize a value
- log: log the value
- validate: validate a new value

The v4l2_ctrl struct adds p_new and p_cur unions at the end of the struct.
This union provides a standard way of accessing control types through a pointer,
which greatly simplifies internal control processing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2: integrate support for VIDIOC_QUERY_EXT_CTRL
Hans Verkuil [Tue, 10 Jun 2014 07:22:06 +0000 (04:22 -0300)]
[media] v4l2: integrate support for VIDIOC_QUERY_EXT_CTRL

Add the v4l2 core plumbing for the new VIDIOC_QUERY_EXT_CTRL ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: add support for compound types
Hans Verkuil [Thu, 12 Jun 2014 10:54:16 +0000 (07:54 -0300)]
[media] v4l2-ctrls: add support for compound types

This patch implements initial support for compound types.

The changes are fairly obvious: basic support for is_ptr types, the
type_is_int function is replaced by a is_int bitfield, and
v4l2_query_ext_ctrl is added.

Note that this patch does not yet add support for N-dimensional
arrays, that comes later. So v4l2_query_ext_ctrl just sets elems to
1 and nr_of_dims and dims[] are all zero.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] videodev2.h: add struct v4l2_query_ext_ctrl and VIDIOC_QUERY_EXT_CTRL
Hans Verkuil [Tue, 10 Jun 2014 07:14:50 +0000 (04:14 -0300)]
[media] videodev2.h: add struct v4l2_query_ext_ctrl and VIDIOC_QUERY_EXT_CTRL

Add a new struct and ioctl to extend the amount of information you can
get for a control.

The range is now a s64 type, and array dimensions and element size can be
reported through nr_of_dims/dims/elems/elem_size.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] videodev2.h: add initial support for compound controls
Hans Verkuil [Thu, 27 Mar 2014 14:25:45 +0000 (11:25 -0300)]
[media] videodev2.h: add initial support for compound controls

Compound controls are controls that can be used for compound and array
types. This allows for more compound data structures to be used with the
control framework.

The existing V4L2_CTRL_FLAG_NEXT_CTRL flag will only enumerate non-compound
controls, so a new V4L2_CTRL_FLAG_NEXT_COMPOUND flag is added to enumerate
compound controls. Set both flags to enumerate any control (compound or not).

Compound control types will start at V4L2_CTRL_COMPOUND_TYPES. In addition, any
control that uses the new 'ptr' field or the existing 'string' field will have
flag V4L2_CTRL_FLAG_HAS_PAYLOAD set.

While not strictly necessary, adding that flag makes life for applications
a lot simpler. If the flag is not set, then the control value is set
through the value or value64 fields of struct v4l2_ext_control, otherwise
a pointer points to the value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: use pr_info/cont instead of printk
Hans Verkuil [Mon, 16 Dec 2013 13:12:17 +0000 (10:12 -0300)]
[media] v4l2-ctrls: use pr_info/cont instead of printk

Codingstyle fix.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoMerge branch 'sched_warn_fix' into patchwork
Mauro Carvalho Chehab [Thu, 17 Jul 2014 13:37:07 +0000 (10:37 -0300)]
Merge branch 'sched_warn_fix' into patchwork

* sched_warn_fix:
  sched: Fix compiler warnings
  x86, tsc: Fix cpufreq lockup

10 years agoMerge tag 'v3.16-rc5' into HEAD
Mauro Carvalho Chehab [Thu, 17 Jul 2014 12:56:14 +0000 (09:56 -0300)]
Merge tag 'v3.16-rc5' into HEAD

Docbook creation was broken. We need to move after
v3.16-rc1-3-ga981296f048b in order to get commit
a981296f048b99b0d5bb4d87c732a6cfb35a1c66.

Linux 3.16-rc5

* tag 'v3.16-rc5': (985 commits)
  Linux 3.16-rc5
  clk: spear3xx: Set proper clock parent of uart1/2
  clk: spear3xx: Use proper control register offset
  parisc: drop unused defines and header includes
  parisc: fix fanotify_mark() syscall on 32bit compat kernel
  parisc: add serial ports of C8000/1GHz machine to hardware database
  ext4: fix potential null pointer dereference in ext4_free_inode
  ext4: fix a potential deadlock in __ext4_es_shrink()
  Documenation/laptops: rename and update hpfall.c
  DocBook: fix various typos
  DocBook: fix mtdnand typos
  scripts/kernel-doc: handle object-like macros
  Documentation/Changes: clean up mcelog paragraph
  ARM: at91: at91sam9x5: add clocks for usb device
  phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove
  phy: core: Fix error path in phy_create()
  drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE
  phy: omap-usb2: fix devm_ioremap_resource error detection code
  phy: sun4i: depend on RESET_CONTROLLER
  USB: serial: ftdi_sio: Add Infineon Triboard
  ...

10 years ago[media] v4l2-ctrls: increase internal min/max/step/def to 64 bit
Hans Verkuil [Wed, 16 Apr 2014 12:41:25 +0000 (09:41 -0300)]
[media] v4l2-ctrls: increase internal min/max/step/def to 64 bit

While VIDIOC_QUERYCTRL is limited to 32 bit min/max/step/def values
for controls, the upcoming VIDIOC_QUERY_EXT_CTRL isn't. So increase
the internal representation to 64 bits in preparation.

Because of these changes the msi3101 driver has been modified slightly
to fix a formatting issue (%d becomes %lld), vivi had to be modified
as well to cope with the new 64-bit min/max values and the PIXEL_RATE
control in a few sensor drivers required proper min/max/def values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: rework firmware download logic a little bit
Antti Palosaari [Sun, 13 Jul 2014 23:05:28 +0000 (20:05 -0300)]
[media] si2157: rework firmware download logic a little bit

Rework firmware selection / chip detection logic a little bit.
Add missing release_firmware() to error path.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: few firmware download changes
Antti Palosaari [Sun, 13 Jul 2014 22:22:19 +0000 (19:22 -0300)]
[media] si2168: few firmware download changes

Rework firmware selection logic a little bit.
Print notice asking user update firmware when old Si2168 B40
firmware is used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: advertise Si2158 A20 firmware
Antti Palosaari [Sun, 13 Jul 2014 19:13:49 +0000 (16:13 -0300)]
[media] si2157: advertise Si2158 A20 firmware

Driver uses that firmware. Add it module firmware list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: advertise Si2168 A30 firmware
Antti Palosaari [Sun, 13 Jul 2014 19:09:03 +0000 (16:09 -0300)]
[media] si2168: advertise Si2168 A30 firmware

Driver uses that new firmware too, so advertise it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Tested-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cxusb: TechnoTrend CT2-4400 USB DVB-T2/C tuner support
Olli Salonen [Sun, 13 Jul 2014 13:52:22 +0000 (10:52 -0300)]
[media] cxusb: TechnoTrend CT2-4400 USB DVB-T2/C tuner support

USB ID 0b48:3014.

USB interface: Cypress CY7C68013A-56LTXC
Demodulator: Silicon Labs Si2168-30
Tuner: Silicon Labs Si2158-20

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: Set delivery system and bandwidth before tuning
Olli Salonen [Sun, 13 Jul 2014 13:52:21 +0000 (10:52 -0300)]
[media] si2157: Set delivery system and bandwidth before tuning

Tell used TV standard and bandwidth for tuner firmware.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: Add support for Si2158 chip
Olli Salonen [Sun, 13 Jul 2014 13:52:20 +0000 (10:52 -0300)]
[media] si2157: Add support for Si2158 chip

Add support for Si2158 A20 chip.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: Move chip initialization to si2157_init
Olli Salonen [Sun, 13 Jul 2014 13:52:19 +0000 (10:52 -0300)]
[media] si2157: Move chip initialization to si2157_init

Move chip initialization related code from si2157_set_params to
si2157_init.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Add support for chip revision Si2168 A30
Olli Salonen [Sun, 13 Jul 2014 13:52:18 +0000 (10:52 -0300)]
[media] si2168: Add support for chip revision Si2168 A30

Add handling for different chip revisions and firmwares.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Small typo fix (SI2157 -> SI2168)
Olli Salonen [Sun, 13 Jul 2014 13:52:17 +0000 (10:52 -0300)]
[media] si2168: Small typo fix (SI2157 -> SI2168)

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: receive 4 bytes reply from cmd 0x14
Antti Palosaari [Fri, 11 Jul 2014 13:40:29 +0000 (10:40 -0300)]
[media] si2168: receive 4 bytes reply from cmd 0x14

Command 0x14 returns 4 bytes as a reply. It is used for setting
key/value pairs to firmware and it returns 4 bytes back including
old value.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: do not set values which are already on default
Antti Palosaari [Fri, 11 Jul 2014 13:28:44 +0000 (10:28 -0300)]
[media] si2168: do not set values which are already on default

No need to set explicitly value that are already defaulted same.

Setting new value returns old value. Firmware default values can
be found just looking returned value.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: remove duplicate command
Antti Palosaari [Thu, 10 Jul 2014 23:21:59 +0000 (20:21 -0300)]
[media] si2168: remove duplicate command

Same command was executed twice, but different value. Remove
redundant command.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: add read data support for fw cmd func
Antti Palosaari [Thu, 10 Jul 2014 09:02:53 +0000 (06:02 -0300)]
[media] si2157: add read data support for fw cmd func

We want also read data from firmware. Add support for it. Copied from
si2168 driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: implement CNR statistic
Antti Palosaari [Wed, 9 Jul 2014 23:22:27 +0000 (20:22 -0300)]
[media] si2168: implement CNR statistic

Implement CNR statistic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>