Commit graph

456707 commits

Author SHA1 Message Date
Hans Verkuil
7955f03d18 [media] go7007: move out of staging into drivers/media/usb.
Now that the custom motion detection API in this driver has been
replaced with a standard API there is no reason anymore to keep it
in staging. So (finally!) move it to drivers/media/usb.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:53:33 -03:00
Hans Verkuil
28cae868cd [media] solo6x10: move out of staging into drivers/media/pci.
Now that the custom motion detection API has been replaced with a
standard API there is no reason anymore to keep it in staging.

So (finally!) move it to drivers/media/pci.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:53:00 -03:00
Philipp Zabel
401e972fae [media] coda: store IRAM size in struct coda_devtype
Similarly to workbuf_size and tempbuf_size, store iram_size in the
coda_devtype structure. This also decreases the IRAM used on i.MX6DL
to 128 KiB.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:16:58 -03:00
Philipp Zabel
5d73fad1eb [media] coda: store global temporary buffer size in struct coda_devtype
Similarly to the work buffer size, store the temporary buffer size in the
coda_devtype structure.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:16:31 -03:00
Philipp Zabel
e5b0d1c60f [media] coda: store per-context work buffer size in struct coda_devtype
We had the workbuf_size field since the beginning.
Use it to tighten the code a little bit.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:15:59 -03:00
Philipp Zabel
f61c0b148c [media] coda: export auxiliary buffers via debugfs
This patch exports all auxiliary buffers, including SRAM, as debugfs binary
blobs for debugging purposes. It shows, for example, that psbuf currently
doesn't seem to be used at all on CODA7541, and that slicebuf and workbuf
usage is far from the maximum. It can also be used to validate SRAM size
allocation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:14:52 -03:00
Philipp Zabel
451dfe5d85 [media] coda: increase frame stride to 16 for h.264
When encoding into h.264, the input frame stride needs to be a multiple of 16.
During allocation of the input buffers, it may not be known yet whether the
encoder should create h.264 or not. Assume the worst and always use a frame
stride that is a multiple of 16.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:13:08 -03:00
Philipp Zabel
7c3df78953 [media] coda: round up internal frames to multiples of macroblock size for h.264
CODA7541 only supports encoding h.264 frames with width and height that are
multiples of the macroblock size.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:12:47 -03:00
Philipp Zabel
1b0ed7be67 [media] coda: allow odd width, but still round up bytesperline
Even though the CODA h.264 decoder always decodes complete macroblocks, we can
set the stride to the corresponding multiple of 16 and use a value smaller than
that as real width. Unfortunately the same doesn't work for height, as there
is no vertical linesperframe stride for discontiguous planar YUV frames.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:11:48 -03:00
Philipp Zabel
2fd6a3709e [media] coda: add bytesperline to queue data
bytesperline is calculated in multiple places, store it in the coda_q_data
structure. This will be more useful later when adding JPEG support.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:11:15 -03:00
Philipp Zabel
8f45284c4e [media] coda: add reset control support
On i.MX53 and i.MX6, the CODA VPU can be reset by the System Reset Controller.
We can use this to get out of dire situations, for example after a picture
run timeout.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:10:33 -03:00
Philipp Zabel
84e2365d7d [media] coda: rename prescan_failed to hold and stop stream after timeout
Rename the per-context prescan_failed variable to hold, as this is what the
flag  does: it temporarily keeps the coda from running until new data is fed
into the bitstream buffer or stop_streaming is called on the input side.
A prescan failure on i.MX5 is one possible reason to enter this state, another
one is a picture run timeout on i.MX6.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:09:37 -03:00
Philipp Zabel
cb2c02821c [media] coda: add sequence counter offset
The coda h.264 decoder also counts PIC_RUNs where no frame was decoded but
a frame was rotated out / marked as ready to be displayed. This causes an
offset between the incoming encoded frame's sequence number and the decode
sequence number returned by the coda. This patch introduces a sequence
counter offset variable to keep track of the difference.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:09:01 -03:00
Philipp Zabel
410e5e4938 [media] coda: alert userspace about macroblock errors
If the CODA reports macroblock errors, also set the VB2_BUF_STATE_ERROR flag
to alert userspace.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:08:43 -03:00
Philipp Zabel
846ced9c0e [media] coda: add decoder timestamp queue
The coda driver advertises timestamp_type V4L2_BUF_FLAG_TIMESTAMP_COPY on
both queues, so we have to copy timestamps from input v4l2 buffers to the
corresponding destination v4l2 buffers. Since the h.264 decoder can reorder
frames, a timestamp queue is needed to keep track of and assign the correct
timestamp to destination buffers.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:08:15 -03:00
Michael Olbrich
f3497dad92 [media] coda: try to schedule a decode run after a stop command
In case no further buffers are queued after the stop command, restart
job scheduling explicitly.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:07:27 -03:00
Michael Olbrich
1190a419e0 [media] v4l2-mem2mem: export v4l2_m2m_try_schedule
Some drivers might allow to decode remaining frames from an internal ringbuffer
after a decoder stop command. Allow those to call v4l2_m2m_try_schedule
directly.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:06:50 -03:00
Philipp Zabel
f38f79d5fd [media] coda: add cyclic intra refresh control
Allow userspace to enable cyclic intra refresh by setting the number of
intra macroblocks per frame to a non-zero value.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:04:27 -03:00
Philipp Zabel
de23b1db65 [media] coda: add h.264 deblocking filter controls
This adds controls for the h.264 deblocking loop filter.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:04:03 -03:00
Philipp Zabel
1a5567e3e0 [media] coda: add h.264 min/max qp controls
If the bitrate control is set, the encoder works in CBR mode, dynamically
changing the quantization parameters to achieve a constant bitrate.
With the min/max QP controls the quantization parameters can be limited
to a given range.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:03:27 -03:00
Philipp Zabel
39b06acc5f [media] coda: select GENERIC_ALLOCATOR
The driver uses the genalloc API, which doesn't have stubs in
case GENERIC_ALLOCATOR is disabled.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:02:53 -03:00
Philipp Zabel
fe7554e621 [media] coda: split firmware version check out of coda_hw_init
This adds a new function coda_check_firmware that does the firmware
version checks so that this can be done only once from coda_probe
instead of every time the runtime pm framework resumes the coda.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:02:25 -03:00
Philipp Zabel
1e17273112 [media] coda: Add runtime pm support
This patch allows to use the runtime pm and generic pm domain frameworks
to completely gate power to the VPU if it is unused. This functionality
is available on i.MX6.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:01:26 -03:00
Philipp Zabel
14604e3a4d [media] coda: use ctx->fh.m2m_ctx instead of ctx->m2m_ctx
v4l2_fh already contains a mem2mem context pointer. Use it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:59:39 -03:00
Philipp Zabel
152ea1c81c [media] coda: Use mem-to-mem ioctl helpers
Use the mem2mem helpers introduced to get rid of some duplicated code.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:57:26 -03:00
Philipp Zabel
32b6f20603 [media] coda: add workqueue to serialize hardware commands
Using the coda_mutex lock to serialize hardware access would cause
"INFO: possible circular locking dependency detected" lockdep warnings.
Since the possible locking paths are hard to follow, serialize hardware
access with a single workqueue thread. Ultimately the workqueue could
be converted to only do register setup and readout for per-command work
items.
Using the initialized context property, SEQ_END is only queued in
coda_release when needed.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:56:55 -03:00
Philipp Zabel
52c41676f8 [media] coda: add selection API support for h.264 decoder
The h.264 decoder produces capture frames that are a multiple of the macroblock
size (16 pixels). To inform userspace about invalid pixel data at the edges,
use the active and padded composing rectangles on the capture queue.
The cropping information is obtained from the h.264 sequence parameter set.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:55:33 -03:00
Philipp Zabel
b9736299c4 [media] coda: remove BUG() in get_q_data
This allows us to get rid of the now superfluous v4l2_m2m_get_vq check
in G_FMT. Also, we can use this to check the buffer type in G_SELECTION
later.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:54:29 -03:00
Philipp Zabel
8954844195 [media] coda: Add encoder/decoder support for CODA960
This patch adds support for the CODA960 VPU in Freescale i.MX6 SoCs.

It enables h.264 and MPEG4 encoding and decoding support. Besides the usual
register shifting, the CODA960 gains frame memory control and GDI registers
that are set up for linear mapping right now, needs ENC_PIC_SRC_INDEX to be
set beyond the number of internal buffers for some reason, and has subsampling
buffers that need to be set up. Also, the work buffer size is increased to
80 KiB.

The CODA960 firmware spins if there is not enough input data in the bitstream
buffer. To make it continue, buffers need to be copied into the bitstream as
soon as they are queued. As the bitstream fifo is written into from two places,
it must be protected with a mutex. For that, using a threaded interrupt handler
is necessary.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:53:36 -03:00
Antti Palosaari
06ce32cbad [media] msi2500: rename namespace msi3101 => msi2500
Rename driver namespace according to current driver name. Old
msi3101 was name of reference design, msi2500 is name of chip
itself.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:35:39 -03:00
Antti Palosaari
8591f70804 [media] msi2500: refactor USB stream copying
There was a lot of duplicated functionality between different
stream format handling. Refactor functionality in order to get
rid of duplicated code.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:34:57 -03:00
Antti Palosaari
c08de62f1f [media] msi2500: correct style issues
Correct some style issues, mostly reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:33:34 -03:00
Arun Kumar K
9ab10e469f [media] s5p-mfc: Add init buffer cmd to MFCV6
Latest MFC v6 firmware requires tile mode and loop filter
setting to be done as part of Init buffer command, in sync
with v7. This patch adds this support for new v6 firmware.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Kiran AVND <avnd.kiran@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:30:24 -03:00
Arun Kumar K
77ba6b7396 [media] s5p-mfc: Support multiple firmware sub-versions
For MFC firmwares, improved versions with bug fixes and
feature additions are released keeping the firmware version
including major and minor number same. The issue came with
the release of a new MFCv6 firmware with an interface change.
This patch adds the support of accepting multiple firmware
binaries for every version with the driver trying to load
firmwares starting from latest. This ensures full backward
compatibility regardless of which firmware version and kernel
version is used.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:29:52 -03:00
Arun Kumar K
46075006d9 [media] s5p-mfc: Remove duplicate function s5p_mfc_reload_firmware
The function s5p_mfc_reload_firmware is exactly same as
s5p_mfc_load_firmware. So removing the duplicate function.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 11:29:01 -03:00
Laurent Pinchart
e35ce2e4b2 [media] tvp5150: Use i2c_smbus_(read|write)_byte_data
X-Patchwork-Delegate: mchehab@redhat.com
Replace the custom I2C read/write implementation with SMBUS functions to
simplify the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 10:00:08 -03:00
Laurent Pinchart
385dded806 [media] tvp5150: Fix device ID kernel log message
X-Patchwork-Delegate: mchehab@redhat.com
The driver mistakenly prints the ROM version instead of the device ID to
the kernel log when detecting the chip. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 09:59:05 -03:00
Paul Bolle
3c4b422adb [media] sms: Remove CONFIG_ prefix from Kconfig symbols
X-Patchwork-Delegate: mchehab@redhat.com
Remove the CONFIG_ prefix from two Kconfig symbols in a dependency for
SMS_SIANO_DEBUGFS. This prefix is invalid inside Kconfig files.

Note that the current (common sense) dependency on SMS_USB_DRV and
SMS_SDIO_DRV being equal ensures that SMS_SIANO_DEBUGFS will not
violate its constraints. These constraint are that:
- it should only be built if SMS_USB_DRV is set;
- it can't be builtin if USB support is modular.

So drop the dependency on SMS_USB_DRV, as it is unneeded.

Fixes: 6c84b21428 ("[media] sms: fix randconfig building error")

Reported-by: Martin Walch <walch.martin@web.de>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 09:57:28 -03:00
CrazyCat
7b71ef7eac [media] dw2102: Geniatech T220 init fixed
Geniatech T220 init fixed - reset cmd from windows driver and fixed TS bus config for cxd2820r.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 09:48:12 -03:00
CrazyCat
4d1ab185db [media] cxd2820r: TS clock inversion in config
TS clock inversion in config.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 09:47:05 -03:00
Mauro Carvalho Chehab
a733291d69 Merge commit '67dd8f35c2d8ed80f26c9654b474cffc11c6674d' into patchwork
* .: (268 commits)
  Linux 3.16-rc6
  um: segv: Save regs only in case of a kernel mode fault
  um: Fix hung task in fix_range_common()
  um: Ensure that a stub page cannot get unmapped
  Revert "um: Fix wait_stub_done() error handling"
  btrfs: test for valid bdev before kobj removal in btrfs_rm_device
  Btrfs: fix abnormal long waiting in fsync
  random: check for increase of entropy_count because of signed conversion
  ARM: EXYNOS: Fix core ID used by platsmp and hotplug code
  ahci: add support for the Promise FastTrak TX8660 SATA HBA (ahci mode)
  ARM: at91/dt: add missing clocks property to pwm node in sam9x5.dtsi
  ARM: at91/dt: fix usb0 clocks definition in sam9n12 dtsi
  ARM: at91: at91sam9x5: correct typo error for ohci clock
  irqchip: gic: Fix core ID calculation when topology is read from DT
  GFS2: fs/gfs2/rgrp.c: kernel-doc warning fixes
  GFS2: memcontrol: Spelling s/invlidate/invalidate/
  GFS2: Allow caching of glocks for flock
  GFS2: Allow flocks to use normal glock dq rather than dq_wait
  GFS2: replace count*size kzalloc by kcalloc
  GFS2: Use GFP_NOFS when allocating glocks
  ...

Conflicts:
	drivers/media/dvb-frontends/si2168.c
	drivers/media/dvb-frontends/si2168_priv.h
	drivers/media/tuners/si2157.c
2014-07-22 02:03:59 -03:00
Mauro Carvalho Chehab
d352bcc990 [media] v4l2-subdev: Fix compilation when !VIDEO_V4L2_SUBDEV_API
As reported by Kbuildtest:

   drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_format':
   drivers/media/v4l2-core/v4l2-subdev.c:136:23: error: 'struct v4l2_subdev' has no member named 'entity'
     if (format->pad >= sd->entity.num_pads)
                          ^
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_crop':
   drivers/media/v4l2-core/v4l2-subdev.c:148:21: error: 'struct v4l2_subdev' has no member named 'entity'
     if (crop->pad >= sd->entity.num_pads)
                        ^
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_selection':
   drivers/media/v4l2-core/v4l2-subdev.c:161:20: error: 'struct v4l2_subdev' has no member named 'entity'
     if (sel->pad >= sd->entity.num_pads)
                       ^
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_edid':
   drivers/media/v4l2-core/v4l2-subdev.c:169:21: error: 'struct v4l2_subdev' has no member named 'entity'
     if (edid->pad >= sd->entity.num_pads)
                        ^
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'subdev_do_ioctl':
>> drivers/media/v4l2-core/v4l2-subdev.c:186:6: warning: unused variable 'rval' [-Wunused-variable]
     int rval;
         ^
   drivers/media/v4l2-core/v4l2-subdev.c: At top level:
   drivers/media/v4l2-core/v4l2-subdev.c:129:12: warning: 'check_format' defined but not used [-Wunused-function]
    static int check_format(struct v4l2_subdev *sd,
               ^
   drivers/media/v4l2-core/v4l2-subdev.c:142:12: warning: 'check_crop' defined but not used [-Wunused-function]
    static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop)
               ^
   drivers/media/v4l2-core/v4l2-subdev.c:154:12: warning: 'check_selection' defined but not used [-Wunused-function]
    static int check_selection(struct v4l2_subdev *sd,
               ^
   drivers/media/v4l2-core/v4l2-subdev.c:167:12: warning: 'check_edid' defined but not used [-Wunused-function]
    static int check_edid(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid)

The above warnins happen because those functions are used only
when the V4L2 subdev API is enabled.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:44:55 -03:00
Antti Palosaari
64a43323e4 [media] rtl2832_sdr: fix Kconfig dependencies
MEDIA_SDR_SUPPORT and I2C_MUX are needed for rtl2832_sdr.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:36:29 -03:00
Antti Palosaari
a98ccfcf48 [media] rtl2832_sdr: remove plain 64-bit divisions
Commit 0ba2aeb6da
(v4l2-ctrls: increase internal min/max/step/def to 64 bit)
changes v4l2 controls to 64-bit. Driver it not working on 32-bit
arch as it uses directly control 'step' which is changed to 64-bit.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:30:39 -03:00
Peter Meerwald
9aabd95a2d [media] media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG
drivers/built-in.o: In function `isp_video_open':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1253: undefined reference to `vb2_dma_contig_memops'
drivers/built-in.o: In function `omap3isp_video_init':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1344: undefined reference to `vb2_dma_contig_init_ctx'
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1350: undefined reference to `vb2_dma_contig_cleanup_ctx'
drivers/built-in.o: In function `omap3isp_video_cleanup':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1381: undefined reference to `vb2_dma_contig_cleanup_ctx'
make: *** [vmlinux] Error 1

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:04:10 -03:00
Salva Peiró
f8ca6ac00d [media] media-device: Remove duplicated memset() in media_enum_entities()
After the zeroing the whole struct struct media_entity_desc u_ent,
it is no longer necessary to memset(0) its u_ent.name field.

CC: stable@vger.kernel.org
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:02:52 -03:00
Sakari Ailus
b225e398f6 [media] v4l: subdev: Unify argument validation across IOCTLs
Separate validation of different argument types. There's no reason to do
this separately for every IOCTL.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:01:46 -03:00
Laurent Pinchart
6c5bba9b0a [media] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format
The bridge driver doesn't support interlaced formats, always return the
field order set to V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:00:23 -03:00
Laurent Pinchart
7ed0b291b4 [media] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format
The SMIA++ sensors are progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 01:00:06 -03:00
Laurent Pinchart
d53ce5acf8 [media] v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format
The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:59:35 -03:00