]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Sun, 9 Jun 2013 01:15:25 +0000 (22:15 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (73 commits)
  [media] drxk_hard: Remove most 80-cols checkpatch warnings
  [media] drxk_hard: remove needless parenthesis
  [media] drxk_hard.h: don't use more than 80 columns
  [media] drxk_hard.h: Remove some alien comment markups
  [media] drxk_hard: use usleep_range()
  [media] drxk_hard: don't split strings across lines
  [media] drxk_hard: use pr_info/pr_warn/pr_err/... macros
  [media] drxk_hard: Don't use CamelCase
  [media] drxk_hard: don't re-implement log10
  [media] rtl28xxu: correct latest device name
  [media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)
  [media] rtl28xxu: use masked reg write where possible
  [media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black
  [media] rtl28xxu: correct some device names
  [media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini
  [media] rtl28xxu: remove redundant IS_ENABLED macro
  [media] rtl28xxu: reimplement rtl2832u remote controller
  [media] rtl2832u: restore ir remote control support
  [media] media: Rename media_entity_remote_source to media_entity_remote_pad
  [media] af9035: correct TS mode handling
  ...

11 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Sun, 9 Jun 2013 01:14:37 +0000 (22:14 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream: (26 commits)
  [media] soc_camera: error dev remove and v4l2 call
  [media] sh_veu: fix the buffer size calculation
  [media] sh_veu: keep power supply until the m2m context is released
  [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
  [media] v4l2-ioctl: don't print the clips list
  [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
  [media] cx88: fix NULL pointer dereference
  [media] DocBook/media/v4l: update version number
  [media] exynos4-is: Remove "sysreg" clock handling
  [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
  [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
  [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
  [media] s5p-mfc: Add NULL check for allocated buffer
  [media] s5p-mfc: added missing end-of-lines in debug messages
  [media] s5p-mfc: v4l2 controls setup routine moved to initialization code
  [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
  [media] s5p-mfc: Remove special clock usage in driver
  [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
  [media] v4l2: mem2mem: save irq flags correctly
  [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
  ...

11 years ago[media] drxk_hard: Remove most 80-cols checkpatch warnings
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:51 +0000 (11:47 -0300)]
[media] drxk_hard: Remove most 80-cols checkpatch warnings

X-Patchwork-Delegate: mchehab@redhat.com
There are a few cases where breaking the code into separate
lines make it worse to read. However, on several places,
breaking it to make checkpatch.pl happier is OK and improves
code readability.
So, break longer lines where that won't cause harm.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: remove needless parenthesis
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:50 +0000 (11:47 -0300)]
[media] drxk_hard: remove needless parenthesis

X-Patchwork-Delegate: mchehab@redhat.com
There are several places where: state->var = (some_var)
The parenthesis there are doing nothing but making it
harder to read and breaking the 80 columns soft limits.
Just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: don't use more than 80 columns
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:49 +0000 (11:47 -0300)]
[media] drxk_hard.h: don't use more than 80 columns

X-Patchwork-Delegate: mchehab@redhat.com
Almost all 80-col warnings are related to comments. There's
one, however, that it is due to a one-line enum declaration
for enum agc_ctrl_mode.
Break it into one line per enumered data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: Remove some alien comment markups
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:48 +0000 (11:47 -0300)]
[media] drxk_hard.h: Remove some alien comment markups

X-Patchwork-Delegate: mchehab@redhat.com
The comments markup language used on Kernel is defined at:
Documentation/kernel-doc-nano-HOWTO.txt
Remove invalid markups from the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use usleep_range()
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:47 +0000 (11:47 -0300)]
[media] drxk_hard: use usleep_range()

X-Patchwork-Delegate: mchehab@redhat.com
Fixes the following checkpatch.pl warnings:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(10);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't split strings across lines
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:46 +0000 (11:47 -0300)]
[media] drxk_hard: don't split strings across lines

X-Patchwork-Delegate: mchehab@redhat.com
WARNING: quoted string split across lines
#5416: FILE: media/dvb-frontends/drxk_hard.c:5416:
+ dprintk(1, "Could not set demodulator parameters. Make "
+ "sure qam_demod_parameter_count (%d) is correct for "
WARNING: quoted string split across lines
#5423: FILE: media/dvb-frontends/drxk_hard.c:5423:
+ dprintk(1, "Auto-probing the correct QAM demodulator command "
+ "parameters was successful - using %d parameters.\n",

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:45 +0000 (11:47 -0300)]
[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros

X-Patchwork-Delegate: mchehab@redhat.com
replace all occurrences of  printk(KERN_* by
pr_info/pr_warn/pr_err/pr_debug/pr_cont macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: Don't use CamelCase
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:44 +0000 (11:47 -0300)]
[media] drxk_hard: Don't use CamelCase

X-Patchwork-Delegate: mchehab@redhat.com
Thare are lots of CamelCase warnings produced by checkpatch.pl.
This weren't fixed at the time the driver got submitted due
to the lack of manpower do to such cleanup.
Now that I have one script that automates this task, cleans
it. That makes the driver almost checkpatch-compliant,
except for 80 column warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't re-implement log10
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:43 +0000 (11:47 -0300)]
[media] drxk_hard: don't re-implement log10

X-Patchwork-Delegate: mchehab@redhat.com
Log10 routine is already defined at dvb_math.h and provides a good
enough approximation for 100 x log10(). So, instead of reinventing
the wheel, use the already existing function.
While here, don't use CamelCase on the function name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct latest device name
Antti Palosaari [Tue, 4 Jun 2013 22:43:30 +0000 (19:43 -0300)]
[media] rtl28xxu: correct latest device name

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)
Alessandro Miceli [Tue, 4 Jun 2013 19:10:34 +0000 (16:10 -0300)]
[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)

The device has been tested on a MIPSel box with kernel 3.1.1 and backported media_tree drivers
The kernel detects the device with the following output:
usbcore: registered new interface driver dvb_usb_rtl28xxu
usb 1-2: dvb_usb_v2: found a 'Crypto Redi PC50A' in warm state
usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Crypto Redi PC50A)
usb 1-2: DVB: registering adapter 1 frontend 0 (Realtek RTL2832 (DVB-T))...
i2c i2c-4: fc0012: Fitipower FC0012 successfully identified
usb 1-2: dvb_usb_v2: 'Crypto Redi PC50A' successfully initialized and connected

[crope@iki.fi: fix trivial merge conflict]
Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: use masked reg write where possible
Antti Palosaari [Tue, 4 Jun 2013 21:26:54 +0000 (18:26 -0300)]
[media] rtl28xxu: use masked reg write where possible

Use masked register write inside rtl2832u_power_ctrl().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black
Antti Palosaari [Tue, 4 Jun 2013 20:24:06 +0000 (17:24 -0300)]
[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct some device names
Antti Palosaari [Tue, 4 Jun 2013 20:01:25 +0000 (17:01 -0300)]
[media] rtl28xxu: correct some device names

... just because I want to be perfect ;)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini
Miroslav Šustek [Tue, 14 May 2013 22:42:11 +0000 (19:42 -0300)]
[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini

USB ID 0413:6a03 is Leadtek WinFast DTV Dongle mini.
Decoder Realtek RTL2832U and tuner Infineon TUA9001.

Signed-off-by: Miroslav Šustek <sustmidown@centrum.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: remove redundant IS_ENABLED macro
Antti Palosaari [Tue, 4 Jun 2013 19:50:54 +0000 (16:50 -0300)]
[media] rtl28xxu: remove redundant IS_ENABLED macro

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: reimplement rtl2832u remote controller
Antti Palosaari [Tue, 4 Jun 2013 12:17:03 +0000 (09:17 -0300)]
[media] rtl28xxu: reimplement rtl2832u remote controller

Thanks to Rodrigo for original implementation!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl2832u: restore ir remote control support
Rodrigo Tartajo [Sat, 20 Apr 2013 23:02:12 +0000 (20:02 -0300)]
[media] rtl2832u: restore ir remote control support

Hi,
This patch uses the driver from openpli[1] as a template to restore the remote control support.
I had to divert from the original to use the in kernel rc protocol decoder. The key repetition does,
not seem to work but I cant find the problem in the driver. As a raw rc provider, no key table is
hardcoded.
Rodrigo.
[1]: https://aur.archlinux.org/packages/dvb-usb-rtl2832u-openpli/?comments=all

Signed-off-by: Rodrigo Tartajo <rtarty@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] soc_camera: error dev remove and v4l2 call
Wenbing Wang [Wed, 5 Jun 2013 09:37:14 +0000 (06:37 -0300)]
[media] soc_camera: error dev remove and v4l2 call

in soc_camera_close(), if ici->ops->remove() removes device firstly,
and then call __soc_camera_power_off(), it has logic error. Since
if remove device, it should disable subdev clk. but in __soc_camera_
power_off(), it will callback v4l2 s_power function which will
read/write subdev registers to control power by i2c. and then
i2c read/write will fail because of clk disable.
So suggest to re-sequence two functions call.
Change-Id: Iee7a6d4fc7c7c1addb5d342621eb8dcd00fa2745

Signed-off-by: Wenbing Wang <wangwb@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sh_veu: fix the buffer size calculation
Katsuya Matsubara [Tue, 23 Apr 2013 10:51:37 +0000 (07:51 -0300)]
[media] sh_veu: fix the buffer size calculation

The 'bytesperline' value only indicates the stride of the Y plane
if the color format is planar, such as NV12. When calculating
the total plane size, the size of CbCr plane must also be considered.

Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sh_veu: keep power supply until the m2m context is released
Katsuya Matsubara [Tue, 23 Apr 2013 10:51:36 +0000 (07:51 -0300)]
[media] sh_veu: keep power supply until the m2m context is released

In the sh_veu driver, only the interrupt handler 'sh_veu_bh'
can invoke the v4l2_m2m_job_finish() function.
So the hardware must be alive for handling interrupts
until returning from v4l2_m2m_ctx_release().

Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
Katsuya Matsubara [Tue, 23 Apr 2013 10:51:35 +0000 (07:51 -0300)]
[media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted

v4l2_m2m_job_finish() should be invoked even if the current
ongoing job has been aborted since v4l2_m2m_ctx_release() which
has issued the job abort may wait until the finish function is invoked.

Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Rename media_entity_remote_source to media_entity_remote_pad
Andrzej Hajda [Mon, 3 Jun 2013 08:16:13 +0000 (05:16 -0300)]
[media] media: Rename media_entity_remote_source to media_entity_remote_pad

Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: correct TS mode handling
Antti Palosaari [Mon, 3 Jun 2013 22:39:51 +0000 (19:39 -0300)]
[media] af9035: correct TS mode handling

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: minor log writing changes
Antti Palosaari [Mon, 3 Jun 2013 21:50:43 +0000 (18:50 -0300)]
[media] af9035: minor log writing changes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: make checkpatch.pl happy!
Antti Palosaari [Mon, 3 Jun 2013 21:42:14 +0000 (18:42 -0300)]
[media] af9035: make checkpatch.pl happy!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: implement I2C adapter read operation
Antti Palosaari [Mon, 11 Mar 2013 22:05:39 +0000 (19:05 -0300)]
[media] af9035: implement I2C adapter read operation

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-ioctl: don't print the clips list
Hans Verkuil [Mon, 3 Jun 2013 07:35:22 +0000 (04:35 -0300)]
[media] v4l2-ioctl: don't print the clips list

The clips pointer is a userspace pointer, not a kernelspace pointer,
so you can't dereference the clips pointer.
Also add a few missing commas and newlines.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
Hans Verkuil [Sun, 2 Jun 2013 10:55:59 +0000 (07:55 -0300)]
[media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls

The radio filter function that filters controls that are valid for a radio
device should also accept V4L2_CTRL_CLASS_FM_RX controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx88: fix NULL pointer dereference
Hans Verkuil [Wed, 29 May 2013 13:44:22 +0000 (10:44 -0300)]
[media] cx88: fix NULL pointer dereference

This fixes a NULL pointer deference when loading the cx88_dvb module for a
Hauppauge HVR4000.
The bugzilla bug report is here:
https://bugzilla.kernel.org/show_bug.cgi?id=56271
The cause is that the wm8775 is optional, so even though the board info says
there is one, it doesn't have to be there. Checking whether the module was
actually loaded is much safer.
Note that this driver is quite buggy when it comes to unloading and reloading
modules. Unloading cx8800 and reloading it again will still cause a crash,
most likely because either the i2c bus isn't unloaded at the right time and/or
the v4l2_device_unregister isn't called at the right time.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Sebastian Frei <sebastian@familie-frei.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook/media/v4l: update version number
Hans Verkuil [Wed, 29 May 2013 08:03:32 +0000 (05:03 -0300)]
[media] DocBook/media/v4l: update version number

The version number was still 3.9: update to 3.10.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2
Alessandro Miceli [Fri, 3 May 2013 18:58:21 +0000 (15:58 -0300)]
[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2

Tested on a MIPSel box with 3.3.6 kernel
The kernel output when the device will be detected follows:
usbcore: registered new interface driver dvb_usb_it913x
it913x: Chip Version=01 Chip Type=9135
it913x: Remote propriety (raw) mode
it913x: Dual mode=3 Tuner Type=38
it913x: Chip Version=01 Chip Type=9135
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in cold state
usb 2-1: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9137-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204147968
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in warm state
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 1 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_1)...
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 2 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_2)...
usb 2-1: dvb_usb_v2: 'Digital Dual TV Receiver CTVDIGDUAL_V2' successfully initialized and connected
RC part not tested

Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign of CRL_FREQ doesn't depend on inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:03:13 +0000 (15:03 -0300)]
[media] stb0899: sign of CRL_FREQ doesn't depend on inversion

Contrary to CFR (derotator frequency), which changes signedness
depending on inversion, CRL_FREQ does not.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: use autodetected inversion instead of configured inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:02:05 +0000 (15:02 -0300)]
[media] stb0899: use autodetected inversion instead of configured inversion

For consistency, it is necessary to use the autodetected inversion
instead of the configured one.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store autodetected inversion while tuning in non S2 mode
Reinhard Nißl [Sun, 2 Jun 2013 18:01:18 +0000 (15:01 -0300)]
[media] stb0899: store autodetected inversion while tuning in non S2 mode

In non S2 mode, the device is able to autodetect inversion. So
let's store it for tuning to S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store successful inversion for next run
Reinhard Nißl [Sun, 2 Jun 2013 17:59:00 +0000 (14:59 -0300)]
[media] stb0899: store successful inversion for next run

Usually, inversion doesn't change in a system. Storing the last
successful inversion value speeds up tuning of DVB-S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 2000000
Zoran Turalija [Sun, 2 Jun 2013 17:56:33 +0000 (14:56 -0300)]
[media] stb0899: allow minimum symbol rate of 2000000

Looks like product datasheets for tuners containing STB0899 are
suggesting specification for min. symbol rate of 2MS/s.
Some specs found here, all suggesting 2MS/s for min. symbol rate:
    Comtech DVBS2-6899
      http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
    TechniSat SkyStar HD2
      http://www.scaistar.com/skystar2/skystarhd2.htm
    Azurewave AD-SP400
      http://www.pulsat.com/products/AzureWave-AD%252dSP400-High-Definition-PC-Card.html
New patch:
This makes minimum symbol rate driver capabilities on par with some
accessible datasheet specifications*, and allows tuning on linux to
transponders that have symbol rate between 2000000-5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (2000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4
(*) Datasheet: http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
        Maximum Symbol Rate
        QPSK/LDPC/PCH: 20-30Mbps
        8PSK/LDPC/BCH: 10-30Mbps
        DVB: 2-45Mbps
             ^--------- min. symbol rate

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: fix inversion enum values to match usage with CFR
Reinhard Nißl [Sun, 2 Jun 2013 17:52:43 +0000 (14:52 -0300)]
[media] stb0899: fix inversion enum values to match usage with CFR

Throughout the zig-zag-implementations, inversion is taken into
account when reading and writing the CFR register, which contains
the derotator frequency. As swapping IQ signals changes the sign
of that register for example, the idea is to compensate that sign
change by multiplying the register value with the inversion enum
value.
The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON
don't work in the case IQ_SWAP_OFF, due to the multiplication by
zero (I've only found a single device which actually uses
IQ_SWAP_OFF in it's config).
I've changed the enum values to +1 and -1 to accommodate to the
intended usage.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: enable auto inversion handling unconditionally
Reinhard Nißl [Sun, 2 Jun 2013 17:52:02 +0000 (14:52 -0300)]
[media] stb0899: enable auto inversion handling unconditionally

It seems that current inversion handling addresses only the signal
routing on the PCB, i. e. IQ signals are either swapped or not.
But when the device is operated in a Satellite Channel Router (SCR)
environment, an additional inversion is required due to the way how
the SCR works. Therefore it makes sense to me to always enable auto
inversion handling and drop the enum value IQ_SWAP_AUTO.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 1000000
Zoran Turalija [Sun, 2 Jun 2013 17:40:51 +0000 (14:40 -0300)]
[media] stb0899: allow minimum symbol rate of 1000000

This makes minimum symbol rate driver capabilities on par with
windows driver, and allows tuning on linux to transponders that
have symbol rate below 5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (1000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign extend raw CRL_FREQ value
Reinhard Nißl [Sun, 2 Jun 2013 17:37:06 +0000 (14:37 -0300)]
[media] stb0899: sign extend raw CRL_FREQ value

Contrary to the chip's specs, the register's value is signed, so we
need to sign extend the value before using it in calculations like
when determining the offset frequency.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dma-buf: Cocci spatch "ptr_ret.spatch"
Thomas Meyer [Sat, 1 Jun 2013 08:53:10 +0000 (05:53 -0300)]
[media] dma-buf: Cocci spatch "ptr_ret.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] r820t: do not double-free fe->tuner_priv in r820t_release()
Gianluca Gennari [Sun, 2 Jun 2013 17:26:15 +0000 (14:26 -0300)]
[media] r820t: do not double-free fe->tuner_priv in r820t_release()

fe->tuner_priv is already freed by hybrid_tuner_release_state().

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dib8000: Fix dib8000_set_frontend() never setting ret
Geert Uytterhoeven [Sun, 2 Jun 2013 16:52:17 +0000 (13:52 -0300)]
[media] dib8000: Fix dib8000_set_frontend() never setting ret

drivers/media/dvb-frontends/dib8000.c: In function ‘dib8000_set_frontend’:
drivers/media/dvb-frontends/dib8000.c:3556: warning: ‘ret’ is used uninitialized in this function
Remove the variable and return zero instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove "sysreg" clock handling
Sylwester Nawrocki [Fri, 10 May 2013 15:46:35 +0000 (12:46 -0300)]
[media] exynos4-is: Remove "sysreg" clock handling

The "sysreg" clock is required by multiple subsystems and none of the
other drivers handles this clock explicitly. It is currently assumed
that this clock is always on, left in its default state after system
reset.
Remove handling of this clock from the FIMC-IS driver to avoid breaking
other subsystems.

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>
11 years ago[media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
Sylwester Nawrocki [Fri, 31 May 2013 11:40:37 +0000 (08:40 -0300)]
[media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev

The FIMC-IS-ISP handles only Bayer formats thus V4L2_COLORSPACE_SRGB
should be used. This change applies to the code first added in v3.10.

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>
11 years ago[media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
Sylwester Nawrocki [Fri, 31 May 2013 11:40:36 +0000 (08:40 -0300)]
[media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured

Use clk_prepare_enable/clk_unprepare_disable instead of preparing the
clocks during the driver initalization and then using just clk_disable/
clk_enable. The clock framework doesn't guarantee a clock will not get
enabled during e.g. clk_set_parent if clk_prepare has been called on it.
So we ensure clk_prepare() is called only when it is safe to enable
the clocks, i.e. the parent clocks and the clocks' frequencies are set.
It must be ensured the FIMC-IS clocks have proper frequencies before they
are enabled, otherwise the whole system will hang.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyunmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
Sylwester Nawrocki [Fri, 31 May 2013 11:40:35 +0000 (08:40 -0300)]
[media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded

Ensure the firmware isn't accessed in the driver when the firmware loading
routine has not completed. This fixes a potential kernel crash:
[   96.510000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   96.520000] pgd = ee604000
[   96.520000] [00000000] *pgd=6e947831, *pte=00000000, *ppte=00000000
[   96.530000] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[   96.530000] Modules linked in:
[   96.530000] CPU: 2 PID: 2787 Comm: camera_test Not tainted 3.10.0-rc1-00269-gcdbde37-dirty #2158
[   96.545000] task: ee42e400 ti: edfcc000 task.ti: edfcc000
[   96.545000] PC is at fimc_is_start_firmware+0x14/0x94
[   96.545000] LR is at fimc_isp_subdev_s_power+0x13c/0x1f8
...
[   96.745000] [<c03e0354>] (fimc_is_start_firmware+0x14/0x94) from [<c03e1cc4>] (fimc_isp_subdev_s_power+0x13c/0x1f8)
[   96.745000] [<c03e1cc4>] (fimc_isp_subdev_s_power+0x13c/0x1f8) from [<c03ed088>] (__subdev_set_power+0x70/0x84)
[   96.745000] [<c03ed088>] (__subdev_set_power+0x70/0x84) from [<c03ed164>] (fimc_pipeline_s_power+0xc8/0x164)
[   96.745000] [<c03ed164>] (fimc_pipeline_s_power+0xc8/0x164) from [<c03ee2b8>] (__fimc_pipeline_open+0x90/0x268)
[   96.745000] [<c03ee2b8>] (__fimc_pipeline_open+0x90/0x268) from [<c03ec5f0>] (fimc_capture_open+0xe4/0x1ec)
[   96.745000] [<c03ec5f0>] (fimc_capture_open+0xe4/0x1ec) from [<c03c5560>] (v4l2_open+0xa8/0xe4)
[   96.745000] [<c03c5560>] (v4l2_open+0xa8/0xe4) from [<c0112900>] (chrdev_open+0x9c/0x158)
[   96.745000] [<c0112900>] (chrdev_open+0x9c/0x158) from [<c010d3e0>] (do_dentry_open+0x1f4/0x27c)
[   96.745000] [<c010d3e0>] (do_dentry_open+0x1f4/0x27c) from [<c010d558>] (finish_open+0x34/0x50)
[   96.745000] [<c010d558>] (finish_open+0x34/0x50) from [<c011bea0>] (do_last+0x59c/0xbcc)
[   96.745000] [<c011bea0>] (do_last+0x59c/0xbcc) from [<c011c580>] (path_openat+0xb0/0x484)
[   96.745000] [<c011c580>] (path_openat+0xb0/0x484) from [<c011ca58>] (do_filp_open+0x30/0x84)
[   96.745000] [<c011ca58>] (do_filp_open+0x30/0x84) from [<c010d060>] (do_sys_open+0xe8/0x170)
[   96.745000] [<c010d060>] (do_sys_open+0xe8/0x170) from [<c000f040>] (ret_fast_syscall+0x0/0x30)

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>
11 years ago[media] uvcvideo: Fix open/close race condition
Laurent Pinchart [Fri, 26 Apr 2013 01:28:51 +0000 (22:28 -0300)]
[media] uvcvideo: Fix open/close race condition

Maintaining the users count using an atomic variable makes sure that
access to the counter won't be racy, but doesn't serialize access to the
operations protected by the counter. This creates a race condition that
could result in the status URB being submitted multiple times.
Use a mutex to protect the users count and serialize access to the
status start and stop operations.

Reported-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam
Joseph Salisbury [Wed, 15 May 2013 20:38:48 +0000 (17:38 -0300)]
[media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam

BugLink: http://bugs.launchpad.net/bugs/1180409
OminiVision webcam 0x05a9:0x2643 needs the same UVC_QUIRK_PROBE_DEF
as other OmniVision models to work properly.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam
Kamal Mostafa [Mon, 15 Apr 2013 19:01:51 +0000 (16:01 -0300)]
[media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam

BugLink: https://bugs.launchpad.net/bugs/1168430
OminiVision webcam 0x05a9:0x264a (in Dell Studio Hybrid 140g) needs the
same UVC_QUIRK_PROBE_DEF as other OmniVision model to be recognized
consistently.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: do not call v4l2_m2m_job_finish from .job_abort
Philipp Zabel [Thu, 23 May 2013 13:43:01 +0000 (10:43 -0300)]
[media] coda: do not call v4l2_m2m_job_finish from .job_abort

If we just declare the job finished here while the CODA is still
running, the call to v4l2_m2m_ctx_release in coda_release, which
is supposed to wait for a running job to finish, will return
immediately and free memory that the CODA is still using.
Just set the 'aborting' flag and let coda_irq_handler deal with 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 <mchehab@redhat.com>
11 years ago[media] coda: replace completion with mutex
Philipp Zabel [Thu, 23 May 2013 13:43:00 +0000 (10:43 -0300)]
[media] coda: replace completion with mutex

Not only do we need to wait for job completion when we want to
call a command on the CODA in start/stop_streaming, we also need
to make sure that a new job doesn't start before the command
finished.
Use a mutex to lock the coda command handling. On timeout, the
device_run job must be marked as finished and the mutex released,
as otherwise coda_release will block.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: add coda_encode_header helper function
Philipp Zabel [Thu, 23 May 2013 13:42:59 +0000 (10:42 -0300)]
[media] coda: add coda_encode_header helper function

In preparation for CODA7541 and CODA960 multi-stream support and for
replacement of the completion with a mutex lock, consolidate the
header encoding in a helper function.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: per-product list of codecs instead of list of formats
Philipp Zabel [Thu, 23 May 2013 13:42:58 +0000 (10:42 -0300)]
[media] coda: per-product list of codecs instead of list of formats

This patch adds a list of supported codecs per device type which is used to
determine the allowed pixel formats and maximum frame sizes depending on the
possible codecs. It allows frame sizes larger than 720 x 576 on CODA7 and adds
support for the YVU420 (planar YUV 4:2:0 with switched Cb and Cr) format.
Other uncompressed formats that could be added in the future are the chroma
interleaved NV12 and NV21 formats and the multiplanar variants YUV420M,
YVU420M, NV12M, and NV21M.
Further, rawstreamon is renamed to streamon_out and compstreamon is renamed
to streamon_cap in preparation for decoding support. The maximum encoded
frame buffer size is increased to 1 MiB.
Instead of tracking inst_type and codec across S_FMT calls, set the codec
and inst_type in start_streaming.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: simplify parameter buffer setup code
Philipp Zabel [Thu, 23 May 2013 13:42:57 +0000 (10:42 -0300)]
[media] coda: simplify parameter buffer setup 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 <mchehab@redhat.com>
11 years ago[media] coda: clear registers in coda_hw_init
Philipp Zabel [Thu, 23 May 2013 13:42:56 +0000 (10:42 -0300)]
[media] coda: clear registers in coda_hw_init

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: stop setting bytesused in buf_prepare
Philipp Zabel [Thu, 23 May 2013 13:42:55 +0000 (10:42 -0300)]
[media] coda: stop setting bytesused in buf_prepare

The application must have filled the bytesused field,
don't overwrite it here.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: frame stride must be a multiple of 8
Philipp Zabel [Thu, 23 May 2013 13:42:54 +0000 (10:42 -0300)]
[media] coda: frame stride must be a multiple of 8

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: fix ENC_SEQ_OPTION for CODA7
Philipp Zabel [Thu, 23 May 2013 13:42:53 +0000 (10:42 -0300)]
[media] coda: fix ENC_SEQ_OPTION for CODA7

GAMMA_OFFSET is different between CodaDx6 and CODA7.
Also, this is a bitfield.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Add NULL check for allocated buffer
Sachin Kamat [Wed, 29 May 2013 03:10:00 +0000 (00:10 -0300)]
[media] s5p-mfc: Add NULL check for allocated buffer

In certain cases, dma_alloc_coherent returns NULL. Add check for
NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: added missing end-of-lines in debug messages
Andrzej Hajda [Tue, 28 May 2013 06:26:16 +0000 (03:26 -0300)]
[media] s5p-mfc: added missing end-of-lines in debug messages

Many debug messages missed end-of-line.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: v4l2 controls setup routine moved to initialization code
Andrzej Hajda [Tue, 28 May 2013 06:26:15 +0000 (03:26 -0300)]
[media] s5p-mfc: v4l2 controls setup routine moved to initialization code

Callback .start_streaming is called once for every queue,
so v4l2_ctrl_handler_setup was called twice during stream start.
Moving v4l2_ctrl_handler_setup to context initialization
reduces numbers of calls and seems to be more consistent with API.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: separate encoder parameters for h264 and mpeg4
Andrzej Hajda [Tue, 28 May 2013 06:26:14 +0000 (03:26 -0300)]
[media] s5p-mfc: separate encoder parameters for h264 and mpeg4

This patch fixes a bug which caused overwriting h264 codec
parameters by mpeg4 parameters during V4L2 control setting.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Remove special clock usage in driver
Arun Kumar K [Mon, 27 May 2013 06:39:29 +0000 (03:39 -0300)]
[media] s5p-mfc: Remove special clock usage in driver

MFC uses two clocks - MFC gate clock and special clock
which is named as "sclk_mfc" in exynos4 and "aclk_333" in
exynos5 SoC. The driver was doing just a clk_prepare on
this special clock without a clk_enable call. As this
sclk is the parent of gate clock, it gets prepared and
enabled along with the gate clock. So there is no need
for the driver to use this sclk. This patch removes the
sclk usage from driver.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
Sylwester Nawrocki [Sat, 25 May 2013 10:25:55 +0000 (07:25 -0300)]
[media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function

This patch fixes following compilation warning:
  CC [M]  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.o
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:1733:12: warning: ‘s5p_mfc_get_decoded_status_v6’ defined but not used
It assigns existing but not used s5p_mfc_get_dec_status_v6() function to the
get_dec_status callback. It seems the get_dec_status callback is not used
anyway, as there is no corresponding s5p_mfc_hw_call().

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: mem2mem: save irq flags correctly
John Sheu [Thu, 23 May 2013 23:41:48 +0000 (20:41 -0300)]
[media] v4l2: mem2mem: save irq flags correctly

Save flags correctly when taking spinlocks in v4l2_m2m_try_schedule.

Signed-off-by: John Sheu <sheu@google.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
Philipp Zabel [Tue, 21 May 2013 07:16:29 +0000 (04:16 -0300)]
[media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS 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 <mchehab@redhat.com>
11 years ago[media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper
Philipp Zabel [Tue, 21 May 2013 07:16:28 +0000 (04:16 -0300)]
[media] v4l2-mem2mem: add v4l2_m2m_create_bufs helper

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: v4l2-mem2mem: return for polling if a buffer is available
Seung-Woo Kim [Tue, 21 May 2013 02:47:30 +0000 (23:47 -0300)]
[media] media: v4l2-mem2mem: return for polling if a buffer is available

The v4l2_m2m_poll() does not need to wait if there is already a buffer in
done_list of source and destination queues, but current v4l2_m2m_poll() always
waits. So done_list of each queue is checked before calling poll_wait().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: vb2: return for polling if a buffer is available
Seung-Woo Kim [Tue, 21 May 2013 02:47:29 +0000 (23:47 -0300)]
[media] media: vb2: return for polling if a buffer is available

The vb2_poll() does not need to wait next vb_buffer_done() if there is already
a buffer in done_list of queue, but current vb2_poll() always waits.
So done_list is checked before calling poll_wait().

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Update v6 encoder buffer alloc
Arun Kumar K [Wed, 24 Apr 2013 12:41:53 +0000 (09:41 -0300)]
[media] s5p-mfc: Update v6 encoder buffer alloc

MFC v6 needs minimum number of output buffers to be queued
for encoder depending on the stream type and profile.
The patch modifies the driver so that encoding cannot be
started with lesser number of OUTPUT buffers than required.
This also fixes the crash happeninig during multi instance
encoder-decoder simultaneous run due to memory allocation
happening from interrupt context.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/solo6x10: select the desired font
Xiong Zhou [Fri, 17 May 2013 10:24:05 +0000 (07:24 -0300)]
[media] staging/solo6x10: select the desired font

Make sure FONT_8x16 can be found by find_font().

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/staging: davinci: vpfe: fix dependency for building the driver
Lad, Prabhakar [Mon, 13 May 2013 09:39:07 +0000 (06:39 -0300)]
[media] drivers/staging: davinci: vpfe: fix dependency for building the driver

from commit 3778d05036cc7ddd983ae2451da579af00acdac2
[media: davinci: kconfig: fix incorrect selects]
VIDEO_VPFE_CAPTURE was removed but there was a negative
dependancy for building the DM365 VPFE MC based capture driver
(VIDEO_DM365_VPFE), This patch fixes this dependency by replacing
the VIDEO_VPFE_CAPTURE with VIDEO_DM365_ISIF, so as when older DM365
ISIF v4l driver is selected the newer media controller driver for
DM365 isnt visible.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: pci: remove duplicate checks for EPERM
Lad, Prabhakar [Tue, 14 May 2013 04:45:17 +0000 (01:45 -0300)]
[media] media: pci: remove duplicate checks for EPERM

This patch removes check for EPERM in dbg_g/s_register and
vidioc_g/s_register as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:16 +0000 (01:45 -0300)]
[media] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register

This patch removes check for EPERM in vidioc_g/s_register
as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:15 +0000 (01:45 -0300)]
[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register
as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:14 +0000 (01:45 -0300)]
[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register of subdevice
drivers as this check is already performed by core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: do not use v4l2_dev in coda_timeout
Philipp Zabel [Tue, 21 May 2013 13:32:42 +0000 (10:32 -0300)]
[media] coda: do not use v4l2_dev in coda_timeout

The timeout delayed work might be scheduled even after the v4l2 device is
released.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: fix error return value if v4l2_m2m_ctx_init fails
Philipp Zabel [Tue, 21 May 2013 13:31:25 +0000 (10:31 -0300)]
[media] coda: fix error return value if v4l2_m2m_ctx_init fails

Use ret from the outer scope, instead of redefining it in the
conditional clause. That way the error value reaches the end of
the function as intended.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: set umask 0644 on debug module param
Philipp Zabel [Tue, 21 May 2013 07:24:16 +0000 (04:24 -0300)]
[media] coda: set umask 0644 on debug module param

Otherwise module/coda/parameters/coda_debug won't show up in sysfs.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: enable dmabuf support
Philipp Zabel [Thu, 23 May 2013 10:06:30 +0000 (07:06 -0300)]
[media] coda: enable dmabuf support

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: use devm_ioremap_resource
Philipp Zabel [Tue, 21 May 2013 07:19:27 +0000 (04:19 -0300)]
[media] coda: use devm_ioremap_resource

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] coda: v4l2-compliance fix: add bus_info prefix 'platform'
Philipp Zabel [Tue, 21 May 2013 07:18:22 +0000 (04:18 -0300)]
[media] coda: v4l2-compliance fix: add bus_info prefix 'platform'

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc: gpio-ir-recv: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:08 +0000 (05:24 -0300)]
[media] rc: gpio-ir-recv: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] timblogiw: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:07 +0000 (05:24 -0300)]
[media] timblogiw: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: fix timestamp handling
Hans Verkuil [Fri, 10 May 2013 11:06:50 +0000 (08:06 -0300)]
[media] bw-qcam: fix timestamp handling

bw-qcam didn't set the timestamp and it didn't set q->timestamp_type.

Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: tvp7002: rearrange description of structure members
Lad, Prabhakar [Tue, 14 May 2013 09:45:31 +0000 (06:45 -0300)]
[media] media: i2c: tvp7002: rearrange description of structure members

This patch rearranges the description of field members of
struct tvp7002_config. Also as the all the fields where accepting
a value either 0/1, made the members as bool.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: tvp7002: remove duplicate define
Lad, Prabhakar [Tue, 14 May 2013 09:45:30 +0000 (06:45 -0300)]
[media] media: i2c: tvp7002: remove duplicate define

this patch removes duplicate #define TVP7002_MODULE_NAME
form the driver file, which was also defined in media/tvp7002.h

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: Removed unnecessary use of kzalloc() in get_video_info()
Leonid Kegulskiy [Mon, 13 May 2013 10:10:42 +0000 (07:10 -0300)]
[media] hdpvr: Removed unnecessary use of kzalloc() in get_video_info()

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] videodev2.h: fix typos
Lad, Prabhakar [Mon, 20 May 2013 09:02:40 +0000 (06:02 -0300)]
[media] videodev2.h: fix typos

This patch fixes several typos in videodev2.h file

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sony-btf-mpx: Drop needless newline in param description
Jean Delvare [Wed, 15 May 2013 20:56:11 +0000 (17:56 -0300)]
[media] sony-btf-mpx: Drop needless newline in param description

Module parameter descriptions need not be terminated with a newline.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()
Wei Yongjun [Mon, 13 May 2013 13:00:01 +0000 (10:00 -0300)]
[media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

The orig code will release all the resources if v4l2_device_register()
failed and return 0. But what we need in this case is to return an
negative error code to let the caller known we are failed.
So the patch save the return value of v4l2_device_register() to 'ret'
and return it when error.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] blackfin: fix error return code in bcap_probe()
Wei Yongjun [Mon, 13 May 2013 07:52:16 +0000 (04:52 -0300)]
[media] blackfin: fix error return code in bcap_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ad9389b: fix error return code in ad9389b_probe()
Wei Yongjun [Mon, 13 May 2013 05:00:10 +0000 (02:00 -0300)]
[media] ad9389b: fix error return code in ad9389b_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vpif_capture: fix error return code in vpif_probe()
Wei Yongjun [Mon, 13 May 2013 04:57:37 +0000 (01:57 -0300)]
[media] vpif_capture: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vpif_display: fix error return code in vpif_probe()
Wei Yongjun [Mon, 13 May 2013 04:57:23 +0000 (01:57 -0300)]
[media] vpif_display: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l: vb2: fix error return code in __vb2_init_fileio()
Wei Yongjun [Mon, 13 May 2013 04:48:45 +0000 (01:48 -0300)]
[media] v4l: vb2: fix error return code in __vb2_init_fileio()

Fix to return -EINVAL in the get kernel address error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>