Michael Krufky [Tue, 29 Nov 2011 21:21:41 +0000 (18:21 -0300)]
[media] au0828: add missing USB ID 2040:7260
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Joe Perches [Sun, 27 Nov 2011 18:42:15 +0000 (15:42 -0300)]
[media] [trivial] omap24xxcam-dma: Fix logical test
Likely misuse of & vs &&.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tomi Valkeinen [Mon, 14 Nov 2011 07:28:59 +0000 (04:28 -0300)]
[media] omap_vout: fix crash if no driver for a display
omap_vout crashes on start if a corresponding driver is not loaded for a
display device.
This patch changes omap_vout init sequence to skip devices without a
driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Marek Szyprowski [Mon, 21 Nov 2011 08:02:38 +0000 (05:02 -0300)]
[media] media: video: s5p-tv: fix build break
This patch fixes following build break:
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitry Artamonow [Sun, 20 Nov 2011 15:54:26 +0000 (12:54 -0300)]
[media] omap3isp: fix compilation of ispvideo.c
Fix following build error by explicitely including <linux/module.h>
header file.
CC drivers/media/video/omap3isp/ispvideo.o
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Wed, 16 Nov 2011 11:19:58 +0000 (08:19 -0300)]
[media] m5mols: Fix set_fmt to return proper pixel format code
In case pixel format is modified in set_fmt by the driver,
the changes are not propagated back to the caller. Fix this
by adjusting passed data for TRY and ACTIVE format.
Also remove redundant pixel format code information from
struct m5mols_info, it's already available in 'ffmt' array.
Remove pad number validation in set/get_fmt, this is already
done in the core.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Fri, 4 Nov 2011 13:07:06 +0000 (10:07 -0300)]
[media] s5p-fimc: Use correct fourcc for RGB565 colour format
With 16-bit RGB565 colour format pixels are stored by the device in memory
in the following order:
| b3 | b2 | b1 | b0 |
~+-----+-----+-----+-----+
| R5 G6 B5 | R5 G6 B5 |
This corresponds to V4L2_PIX_FMT_RGB565 fourcc, not V4L2_PIX_FMT_RGB565X.
This change is required to avoid trouble when setting up video pipeline
with the s5p-tv devices, so the colour formats at both devices can be
properly matched.
Cc: <stable@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Thu, 20 Oct 2011 08:15:59 +0000 (05:15 -0300)]
[media] s5p-fimc: Fail driver probing when sensor configuration is wrong
When a sensor with MIPI-CSI interface is attached through platform
data definition and the MIPI-CSI receiver is not selected in kernel
configuration s5p-fimc driver probe() will now succeed, issuing only
a warning. It was done this way to allow the driver to work even if
system configuration is not exactly right.
Instead make the driver's probe() fail if a MIPI-CSI sensor was
requested but s5p-csis module is not present.
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>
Sylwester Nawrocki [Fri, 27 May 2011 16:12:23 +0000 (13:12 -0300)]
[media] s5p-fimc: Adjust pixel height alignments according to the IP revision
Minimum vertical pixel size alignment for input and output DMA and
the scaler depend on color format, rotation, the IP instance and revision.
Make vertical pixel size of format and crop better fit for each SoC
revision and the IP instance by adding min_vsize_align attribute to
the FIMC variant data structure. It's now common for the DMA engines
and the scaler.
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>
Sylwester Nawrocki [Fri, 7 Oct 2011 10:40:00 +0000 (07:40 -0300)]
[media] s5p-fimc: Allow probe() to succeed with null platform data
The "s5p-fimc-md" platform device platform_data is used to pass
attached camera sensor data. Not allowing device probe() to succeed
when it's null prevents using FIMC as a mem-to-mem device only.
Fix this by removing the platform_data check against null and
registering sensors only if platform_data is specified.
Also add logging of the information which /dev/video is assigned
to which device during probe().
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>
Sylwester Nawrocki [Wed, 5 Oct 2011 17:20:45 +0000 (14:20 -0300)]
[media] s5p-fimc: Fix buffer dequeue order issue
When requested more than 2 buffers the buffer dequeue order was wrong
due to erroneous updating FIMC registers in every interrupt handler
call. This also fixes regression of resetting the output DMA buffer
pointer at wrong time, when some buffers are already queued in hardware.
The hardware is reset in the start_streaming callback in order to align
the H/W state with the software output buffer pointer (buf_index).
Additionally a simple write to S5P_CISCCTRL register is replaced with
a read/modification/write to make sure the scaler is not being disabled
in fimc_hw_set_scaler().
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>
Sylwester Nawrocki [Fri, 4 Nov 2011 12:59:52 +0000 (09:59 -0300)]
[media] s5p-fimc: Fix initialization for proper system suspend support
ST_LPM bit must not be initially set, so the first resume helper
call properly quiesce the device's operation.
Also fimc_runtime_suspend() at device remove is unneeded and
leads to unbalanced clock disable so remove it.
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>
Sylwester Nawrocki [Sun, 11 Sep 2011 13:36:13 +0000 (10:36 -0300)]
[media] s5p-fimc: Fix error in the capture subdev deinitialization
Make sure the subdev pointer is cleared when the subdev object
has been freed.
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>
Sylwester Nawrocki [Tue, 13 Sep 2011 17:07:09 +0000 (14:07 -0300)]
[media] s5p-fimc: Fix wrong pointer dereference when unregistering sensors
After i2c_unregister_device() has been called the client object can already
be freed and thus using the client pointer may lead to dereferencing freed
memory. Avoid this by saving the adapter pointer for further use before
i2c_unregister_device() call.
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>
Randy Dunlap [Thu, 17 Nov 2011 01:17:03 +0000 (22:17 -0300)]
[media] media/staging: fix allyesconfig build error
Fix x86 allyesconfig builds. Builds fail due to a non-static variable
named 'debug' in drivers/staging/media/as102/.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 24 Nov 2011 21:22:10 +0000 (19:22 -0200)]
MAINTAINERS: Update media entries
Now that we've created a /drivers/staging/media, put it together with
/drivers/media. Also, added there a missing entry for the Media API spec.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 9 Oct 2011 11:59:16 +0000 (08:59 -0300)]
[media] mxl5007t: fix reg read
Register to read should be written to register 0xfb and then
perform I2C read to get reg value.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 13 Nov 2011 03:22:33 +0000 (00:22 -0300)]
[media] tda18218: fix 6 MHz default IF frequency
Default IF for 6 MHz bandwidth is 3 MHz. Use that.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 13 Nov 2011 01:33:30 +0000 (22:33 -0300)]
[media] af9015: limit I2C access to keep FW happy
AF9015 firmware does not like if it gets interrupted by I2C adapter
request on some critical phases. During normal operation I2C adapter
is used only 2nd demodulator and tuner on dual tuner devices.
Override demodulator callbacks and use mutex for limit access to
those "critical" paths to keep AF9015 happy.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Mon, 31 Oct 2011 14:16:44 +0000 (11:16 -0300)]
[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
Otherwise the fh changing the master control won't get the inactive state
change event for the slave controls.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 26 Oct 2011 08:52:47 +0000 (05:52 -0300)]
[media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
Setting sev->fh to NULL causes problems for the del op added in the next
patch of this series, since this op needs a way to get to its own data
structures, and typically this will be done by using container_of on an
embedded v4l2_fh struct.
The reason the original code is setting sev->fh to NULL is to signal
to users of the event framework that the unsubscription has happened,
but since their is no shared lock between the event framework and users
of it, this is inherently racy, and it also turns out to be unnecessary
as long as both the event framework and the user of the framework do their
own locking properly and the user guarantees that it holds no references
to the subcribed_event structure after its del operation has been called.
This is best explained by looking at the only code currently checking for
sev->fh being set to NULL on unsubscribe, which is the v4l2-ctrls.c send_event
function. Here is the relevant code from v4l2-ctrls: send_event():
if (sev->fh && (sev->fh != fh ||
(sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK)))
v4l2_event_queue_fh(sev->fh, &ev);
Now lets say that v4l2_event_unsubscribe and v4l2-ctrls: send_event() race
on the same sev, then the following could happens:
1) send_event checks sev->fh, finds it is not NULL
<thread switch>
2) v4l2_event_unsubscribe sets sev->fh NULL
3) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
as the thread calling send_event holds the ctrl_lock
<thread switch>
4) send_event calls v4l2_event_queue_fh(sev->fh, &ev) which not is equivalent
to calling: v4l2_event_queue_fh(NULL, &ev)
5) oops, NULL pointer deref.
Now again without setting sev->fh to NULL in v4l2_event_unsubscribe and
without the (now senseless since always true) sev->fh != NULL check in
1) send_event is about to call v4l2_event_queue_fh(sev->fh, &ev)
<thread switch>
2) v4l2_event_unsubscribe removes sev->list from the fh->subscribed list
<thread switch>
3) send_event calls v4l2_event_queue_fh(sev->fh, &ev)
4) v4l2_event_queue_fh blocks on the fh_lock spinlock
<thread switch>
5) v4l2_event_unsubscribe unlocks the fh_lock spinlock
6) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
as the thread calling send_event holds the ctrl_lock
<thread switch>
8) v4l2_event_queue_fh takes the fh_lock
7) v4l2_event_queue_fh calls v4l2_event_subscribed, does not find it since
sev->list has been removed from fh->subscribed already -> does nothing
9) v4l2_event_queue_fh releases the fh_lock
10) the caller of send_event releases the ctrl lock (mutex)
<thread switch>
11) v4l2_ctrls del_event takes the ctrl lock
12) v4l2_ctrls del_event removes sev->node from the ev_subs list
13) v4l2_ctrls del_event releases the ctrl lock
14) v4l2_event_unsubscribe frees the sev, to which no references are being
held anymore
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 26 Oct 2011 08:40:27 +0000 (05:40 -0300)]
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing
The kev pointers inside the pending events queue (the available queue) of the
fh point to data inside the sev, unsubscribing frees the sev, thus making these
pointers point to freed memory!
This patch fixes these dangling pointers in the available queue by removing
all matching pending events on unsubscription.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Mon, 24 Oct 2011 08:03:27 +0000 (05:03 -0300)]
[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jeongtae Park [Fri, 14 Oct 2011 03:03:23 +0000 (00:03 -0300)]
[media] MAINTAINERS: add a maintainer for s5p-mfc driver
Add a maintainer for s5p-mfc driver.
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kamil Debski [Thu, 6 Oct 2011 14:34:05 +0000 (11:34 -0300)]
[media] v4l: s5p-mfc: fix reported capabilities
MFC uses the multi-plane API, but it reported single-plane
when querying capabilities.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Marek Szyprowski [Tue, 25 Oct 2011 06:07:59 +0000 (03:07 -0300)]
[media] media: vb2: reset queued list on REQBUFS(0) call
Queued list was not reset on REQBUFS(0) call. This caused to enqueue a
freed buffer to the driver.
Reported-by: Angela Wan <angela.j.wan@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Marek Szyprowski [Thu, 13 Oct 2011 10:07:24 +0000 (07:07 -0300)]
[media] media: vb2: set buffer length correctly for all buffer types
v4l2_planes[plane].length field was not initialized for userptr buffers.
This patch fixes this issue.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Marek Szyprowski [Wed, 12 Oct 2011 16:09:53 +0000 (13:09 -0300)]
[media] media: vb2: add a check for uninitialized buffer
__buffer_in_use() might be called for empty/uninitialized buffer in the
following scenario: REQBUF(n, USER_PTR), QUERYBUF(). This patch fixes
kernel ops in such case.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Tue, 1 Nov 2011 02:46:46 +0000 (23:46 -0300)]
[media] mxl111sf: fix build warning
fix build warning:
variable ‘ret’ set but not used in function ‘mxl111sf_i2c_readagain’
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Tue, 1 Nov 2011 02:31:04 +0000 (23:31 -0300)]
[media] mxl111sf: remove pointless if condition in mxl111sf_config_spi
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Tue, 1 Nov 2011 02:29:17 +0000 (23:29 -0300)]
[media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Tue, 1 Nov 2011 02:20:41 +0000 (23:20 -0300)]
[media] mxl111sf: fix return value of mxl111sf_idac_config
mxl111sf_idac_config was incorrectly returning val instead of ret
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 11 Oct 2011 14:54:26 +0000 (11:54 -0300)]
[media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls
Currently it is also being checked for non BITMAP type menu controls,
breaking the logitech LED control menu added by uvcdynctrl, as well as
potentially breaking the powerline frequency menu.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Timo Kokkonen [Tue, 18 Oct 2011 18:37:36 +0000 (15:37 -0300)]
[media] saa7134.h: Suppress compiler warnings when CONFIG_VIDEO_SAA7134_RC is not set
If the said config optio is not set, the compiler will spill out many
warnings about statements with no effect, such as:
Casting the zero to void will cure the warning.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Malcolm Priestley [Fri, 14 Oct 2011 22:54:11 +0000 (19:54 -0300)]
[media] it913x [VER 1.07] Support for single ITE 9135 devices
Support for single ITE 9135 device.
Only single devices have been tested. Dual ITE 9135 devices
should work, but have not been tested.
TODOs
support for ver 2 chip
config for other tuner types.
rework of firmware file.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Teka [Fri, 14 Oct 2011 08:40:29 +0000 (05:40 -0300)]
[media] Support for Terratec G1
Hi,
This is a little patch to support Terratec G1 (based on Terratec Grabby).
It works perfectly on my pc (Ubuntu 11.04 / Kernel 2.6.38).
Best regards,
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Thu, 13 Oct 2011 05:41:41 +0000 (02:41 -0300)]
[media] cx25821: off by one in cx25821_vidioc_s_input()
If "i" is 2 then when we call cx25821_video_mux() we'd end up going
past the end of the cx25821_boards[dev->board]->input[].
The INPUT() macro obfuscates what's going on in that function so it's
a bit hard to follow. And as Mauro points out the hard coded 2 is
not very helpful.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Paul Bolle [Wed, 12 Oct 2011 20:51:22 +0000 (17:51 -0300)]
[media] media: tea5764: reconcile Kconfig symbol and macro
The Kconfig symbol RADIO_TEA5764_XTAL is unused. The code does use a
RADIO_TEA5764_XTAL macro, but does that rather peculiar. But there seems
to be a way to keep both. (The easiest way out would be to rip out both
the Kconfig symbol and the macro.)
Note there's also a module parameter 'use_xtal' to influence all this.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Fri, 21 Jan 2011 00:15:42 +0000 (21:15 -0300)]
[media] omap_vout: Add poll() support
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Wed, 21 Sep 2011 23:05:45 +0000 (20:05 -0300)]
[media] omap3isp: preview: Add crop support on the sink pad
The crop rectangle takes the preview engine internal cropping
requirements into account. The smallest allowable margins are 14 columns
and 8 rows when reading from memory, and 18 columns and 8 rows when
processing data on the fly from the CCDC.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Mon, 3 Oct 2011 10:56:15 +0000 (07:56 -0300)]
[media] omap3isp: preview: Rename min/max input/output sizes defines
The macros that define the minimum/maximum input and output sizes are
defined in seperate files and have no consistent naming. In preparation
for preview engine cropping support, move them all to isppreview.c and
rename them to PREV_{MIN|MAX}_{IN|OUT}_{WIDTH|HEIGHT}*.
Remove unused and/or unneeded local variables that store the maximum
output width.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Wed, 21 Sep 2011 10:54:44 +0000 (07:54 -0300)]
[media] omap3isp: preview: Remove horizontal averager support
The horizontal averager isn't used and will get in the way when
implementing cropping support on the input pad. Remove it, it can be
added back later if needed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Tue, 11 Oct 2011 09:34:40 +0000 (06:34 -0300)]
[media] omap3isp: Report the ISP revision through the media controller API
Set the media_device::hw_revision field to the ISP revision number.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 29 Sep 2011 10:57:00 +0000 (07:57 -0300)]
[media] omap3isp: ccdc: remove redundant operation
Trivial arithmetics clean up.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Thu, 22 Sep 2011 20:10:30 +0000 (17:10 -0300)]
[media] omap3isp: Fix memory leaks in initialization error paths
Make sure all modules init functions clean up after themselves in case
of error.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Thu, 22 Sep 2011 20:09:26 +0000 (17:09 -0300)]
[media] omap3isp: Add missing mutex_destroy() calls
Mutexes must be destroyed with mutex_destroy(). Add missing calls in the
modules cleanup handlers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Thu, 22 Sep 2011 19:59:26 +0000 (16:59 -0300)]
[media] omap3isp: Move *_init_entities() functions to the init/cleanup section
Group all init/cleanup functions together to make the code more
readable.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Thu, 22 Sep 2011 19:54:34 +0000 (16:54 -0300)]
[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
The media_entity_cleanup() function belong to the module cleanup
handlers, not the entity registration handlers. Move it there.
Create a omap3isp_video_cleanup() function to cleanup the video node
entity, and call it from the module cleanup handlers.
Rename omap3isp_stat_free() to omap3isp_stat_cleanup().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Fri, 30 Sep 2011 10:56:02 +0000 (07:56 -0300)]
[media] MFC: Change MFC firmware binary name
This patch renames the MFC firmware binary to avoid SoC name in it.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Scott Jiang [Wed, 21 Sep 2011 12:25:23 +0000 (09:25 -0300)]
[media] vb2: add vb2_get_unmapped_area in vb2 core
no mmu system needs get_unmapped_area file operations to do mmap
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 4 Oct 2011 17:05:58 +0000 (14:05 -0300)]
[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
This driver exposes preview mode operation of the S5K6AAFX sensor with
embedded SoC ISP. The native capture (snapshot) operation mode is not
supported.
Following controls are available:
manual/auto exposure and gain, power line frequency (anti-flicker),
saturation, sharpness, brightness, contrast, white balance temperature,
color effects, horizontal/vertical image flip, frame interval,
auto white balance.
RGB component gains are currently exposed through private controls.
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
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>
Sylwester Nawrocki [Sun, 4 Sep 2011 22:08:54 +0000 (19:08 -0300)]
[media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
V4L2_CID_POWER_LINE_FREQUENCY control allows applications to instruct
a driver what is the power line frequency so an appropriate filter
can be used by the device to cancel flicker by compensating the light
intensity ripple. Currently in the menu we have entries for 50 Hz and
60 Hz and for entirely disabling the anti-flicker filter.
However some devices are capable of automatically detecting the
frequency, so add V4L2_CID_POWER_LINE_FREQUENCY_AUTO entry for them.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Janusz Krzysztofik [Mon, 12 Sep 2011 11:25:25 +0000 (08:25 -0300)]
[media] media: ov6650: stylistic improvements
* with no "retrun ret;" at the end, there is no need to initialize ret
any longer,
* consequently use conditional expressions, not if...else constructs,
throughout ov6650_s_ctrl(),
* v4l2_ctrl_new_std_menu() max value of V4L2_EXPOSURE_MANUAL instead of
equivalent 1 looks more clear.
Created on top of "Converting soc_camera to the control framework"
series.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Bastian Hecht [Thu, 8 Sep 2011 16:15:24 +0000 (13:15 -0300)]
[media] media: ov5642: Add support for arbitrary resolution
This patch adds the ability to get arbitrary resolutions with a width
up to 2592 and a height up to 720 pixels instead of the standard 1280x720
only.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 9 Sep 2011 16:56:04 +0000 (13:56 -0300)]
[media] V4L: replace soc-camera specific soc_mediabus.h with v4l2-mediabus.h
Most users of the <media/soc_mediabus.h> header only need pixel code
definitions, which are now located in the generic <linux/v4l2-mediabus.h>
header. Switch over to reduce soc-camera dependencies.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 9 Sep 2011 16:39:20 +0000 (13:39 -0300)]
[media] V4L: soc-camera: make (almost) all client drivers re-usable outside of the framework
The most important change in this patch is direct linking to struct
soc_camera_link via the client->dev.platform_data pointer. This makes most
of the soc-camera client drivers also usable outside of the soc-camera
framework. After this change all what is needed for these drivers to
function are inclusions of soc-camera headers for some convenience macros,
suitably configured platform data, which is anyway always required, and
loaded soc-camera core module for library functions. If desired, these
library functions can be made generic in the future and moved to a more
neutral location.
The only two client drivers, that still depend on soc-camera are:
mt9t031: it uses struct video_device for its PM. Since no hardware is
available, alternative methods cannot be tested.
ov6650: it uses struct soc_camera_device to pass its sense data back to
the bridge driver. A generic v4l2-subdevice approach should be developed
to perform this.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 9 Sep 2011 16:10:02 +0000 (13:10 -0300)]
[media] V4L: add .g_std() core V4L2 subdevice operation
VIDIOC_G_STD can return the current TV-norm to the user in one of two ways:
if an .vidioc_g_std() ioctl operation is provided by the driver, it is
called, otherwise the value ot the .current_norm field of struct
video_device is returned. Since subdevice drivers currently have no access
to struct video_device objects, the only way to provide this information to
the user is by implementing a .g_std() method.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Tue, 13 Sep 2011 11:07:55 +0000 (08:07 -0300)]
[media] V4L: dynamically allocate video_device nodes in subdevices
Currently only very few drivers actually use video_device nodes, embedded
in struct v4l2_subdev. Allocate these nodes dynamically for those drivers
to save memory for the rest.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 9 Sep 2011 09:40:56 +0000 (06:40 -0300)]
[media] V4L: sh_mobile_csi2: fix unbalanced pm_runtime_put()
If the sh_mobile_csi2 driver didn't attach to a client, normally, because
the respective device connects to the SoC over the parallel CEU interface
and doesn't use the CSI-2 controller, it also shouldn't call
pm_runtime_put() on attempted disconnect.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 9 Sep 2011 10:06:50 +0000 (07:06 -0300)]
[media] V4L: mt9m001, mt9v022: use internally cached pixel code
Using the internally cached pixel code, instead of the one, provided by
the soc-camera, removes one more use of struct soc_camera_device in these
drivers. Also remove the no longer needed soc_camera_from_i2c() inline
function.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 21 Sep 2011 18:16:30 +0000 (15:16 -0300)]
[media] V4L: soc-camera: start removing struct soc_camera_device from client drivers
Remove most trivial uses of struct soc_camera_device from most client
drivers, abstracting some of them inside inline functions. Next steps
will eliminate remaining uses and modify inline functions to not use
struct soc_camera_device.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 7 Sep 2011 21:07:23 +0000 (18:07 -0300)]
[media] V4L: docbook documentation for struct v4l2_create_buffers
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 8 Sep 2011 16:16:56 +0000 (13:16 -0300)]
[media] soc_camera: remove the now obsolete struct soc_camera_ops
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: mt9m001 hunk moved to an earlier patch]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 09:08:51 +0000 (06:08 -0300)]
[media] mt9t031: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 09:56:57 +0000 (06:56 -0300)]
[media] mt9m111: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 09:04:30 +0000 (06:04 -0300)]
[media] mt9m001: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 09:03:11 +0000 (06:03 -0300)]
[media] ov9740: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 12 Sep 2011 12:52:01 +0000 (09:52 -0300)]
[media] ov6650: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
[jkrzyszt@tis.icnet.pl: fix a typo in the register name]
Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 08:43:05 +0000 (05:43 -0300)]
[media] ov2640: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 08:22:39 +0000 (05:22 -0300)]
[media] mt9v022: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 08:20:33 +0000 (05:20 -0300)]
[media] rj54n1cb0c: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 8 Sep 2011 07:36:06 +0000 (04:36 -0300)]
[media] V4L: soc-camera: call subdevice .s_power() method, when powering up or down
Currently soc-camera can use power regulators and platform specific
methods to power clients up and down. Additionally, client drivers can
provide their own subdevice .s_power() methods, acting directly on the
device. This patch adds calls to this method, when external power
supplies are on.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 5 Sep 2011 16:50:27 +0000 (13:50 -0300)]
[media] V4L: soc_camera_platform: do not leave dangling invalid pointers
The life-time of soc-camera device objects can be longer, than the
time, it is attached to a client driver, therefore all references to
the driver own data have to be cleared, when the driver is detached.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 5 Sep 2011 15:33:21 +0000 (12:33 -0300)]
[media] V4L: soc-camera: split a function into two
The soc_camera_power_set() function processes two cases: power on anf off.
These two cases don't share and common code, and the function is always
called with a constant power on / off argument. Splitting this function
into two removes a condition check, reduces indentation levels and makes
the code look cleaner.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 5 Sep 2011 11:26:20 +0000 (08:26 -0300)]
[media] V4L: sh_mobile_csi2: do not guess the client, the host tells us
We do not have to scan the list of subdevices to find our client - the
sensor, the host has already set our grp_id value.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 7 Sep 2011 14:59:47 +0000 (11:59 -0300)]
[media] V4L: sh_mobile_ceu_camera: the host shall configure the pipeline
It is a task of the host / bridge driver to bind single subdevices into a
pipeline, not of respective subdevices. Eventually this might be handled
by the Media Controller API.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 28 Sep 2011 12:25:28 +0000 (09:25 -0300)]
[media] V4L: soc-camera: add 2 new ioctl() handlers
This patch adds two new ioctl() handlers: .vidioc_create_bufs() and
.vidioc_prepare_buf() for compliant vb2 soc-camera hosts.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 3 Nov 2011 13:14:00 +0000 (10:14 -0300)]
[media] V4L: mx3-camera: prepare to support multi-size buffers
Prepare the mx3_camera friver to support the new VIDIOC_CREATE_BUFS and
VIDIOC_PREPARE_BUF ioctl()s. The .queue_setup() vb2 operation must be
able to handle buffer sizes, provided by the caller, and the
.buf_prepare() operation must not use the currently configured frame
format for its operation, which makes it superfluous for this driver.
Its functionality is moved into .buf_queue().
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 3 Nov 2011 13:11:11 +0000 (10:11 -0300)]
[media] V4L: sh-mobile-ceu-camera: prepare to support multi-size buffers
Prepare the sh_mobile_ceu_camera friver to support the new
VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF ioctl()s. The .queue_setup()
vb2 operation must be able to handle buffer sizes, provided by the
caller, and the .buf_prepare() operation must not use the currently
configured frame format for its operation.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 7 Sep 2011 08:12:03 +0000 (05:12 -0300)]
[media] ov772x: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: simplified pointer arithmetic]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 26 Aug 2011 12:49:30 +0000 (09:49 -0300)]
[media] ov9640: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 5 Sep 2011 20:07:47 +0000 (17:07 -0300)]
[media] sh_mobile_ceu_camera: implement the control handler
And since this is the last and only host driver that uses controls, also
remove the now obsolete control fields from soc_camera.h.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: moved code around, fixed problems]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 6 Sep 2011 15:36:39 +0000 (12:36 -0300)]
[media] soc_camera: add control handler support
The soc_camera framework is switched over to use the control framework.
After this patch none of the controls in subdevs or host drivers are available,
until those drivers are also converted to the control framework.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[g.liakhovetski@gmx.de: moved code around, fixed problems]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 25 Aug 2011 16:26:53 +0000 (13:26 -0300)]
[media] dmaengine: ipu-idmac: add support for the DMA_PAUSE control
To support multi-size buffers in the mx3_camera V4L2 driver we have to be
able to stop DMA on a channel without releasing descriptors and completely
halting the hardware. Use the DMA_PAUSE control to implement this mode.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 28 Sep 2011 12:23:02 +0000 (09:23 -0300)]
[media] V4L: vb2: add support for buffers of different sizes on a single queue
The two recently added ioctl()s VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF
allow user-space applications to allocate video buffers of different
sizes and hand them over to the driver for fast switching between
different frame formats. This patch adds support for buffers of different
sizes on the same buffer-queue to vb2.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 24 Aug 2011 13:30:21 +0000 (10:30 -0300)]
[media] V4L: vb2: prepare to support multi-size buffers
In preparation for the forthcoming VIDIOC_CREATE_BUFS ioctl add a
"const struct v4l2_format *" argument to the .queue_setup() vb2
operation.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 28 Sep 2011 11:10:58 +0000 (08:10 -0300)]
[media] V4L: document the new VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF ioctl()s
[mchehab@redhat.com: remove emacs format crap at the end of the new files]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 28 Sep 2011 10:23:27 +0000 (07:23 -0300)]
[media] V4L: videobuf2: update buffer state on VIDIOC_QBUF
V4L2 specification states, that the videobuffer state flags have to be
updated on VIDIOC_QBUF ioctl(). Videobuf2 currently doesn't do that,
which is fixed by this patch.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 28 Sep 2011 14:34:06 +0000 (11:34 -0300)]
[media] V4L: add two new ioctl()s for multi-size videobuffer management
A possibility to preallocate and initialise buffers of different sizes
in V4L2 is required for an efficient implementation of a snapshot
mode. This patch adds two new ioctl()s: VIDIOC_CREATE_BUFS and
VIDIOC_PREPARE_BUF and defines respective data structures.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 31 Aug 2011 09:51:10 +0000 (06:51 -0300)]
[media] V4L: add a new videobuf2 buffer state VB2_BUF_STATE_PREPARED
This patch prepares for a better separation of the buffer preparation
stage.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 22 Aug 2011 15:57:45 +0000 (12:57 -0300)]
[media] V4L: omap1-camera: fix Oops with NULL platform data
Consistently check for platform data != NULL before dereferencing.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 22 Aug 2011 15:35:09 +0000 (12:35 -0300)]
[media] V4L: sh-mobile-ceu-camera: fix mixed CSI2 & parallel camera case
The current sh_mobile_ceu_camera driver can cause an Oops, if a CSI2 and a
parallel camera are registered on the same CEU. Fix it by making CSI2
association with a camera more targeted.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 3 Aug 2011 16:42:31 +0000 (13:42 -0300)]
[media] V4L: mt9t112: fix broken cropping and scaling
G_CROP, S_CROP, CROPCAP, G_FMT, and S_FMT functionality in the mt9t112
driver was broken on many occasions. This patch allows consistent
cropping for rectangles also larger than VGA and cleans up multiple
other issues in this area. It still doesn't add support for proper
scaling, using the sensor own scaler, so input window is still
always equal to the output frame.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 21:42:57 +0000 (18:42 -0300)]
[media] V4L: soc-camera: remove soc-camera client bus-param operations and supporting code
soc-camera has been completely ported over to V4L2 subdevice mbus-config
operations, soc-camera client bus-param operations and supporting code
can now be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 21:37:36 +0000 (18:37 -0300)]
[media] V4L: tw9910: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 21:36:01 +0000 (18:36 -0300)]
[media] V4L: soc_camera_platform: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 21:19:36 +0000 (18:19 -0300)]
[media] ARM: mach-shmobile: mackerel doesn't need legacy SOCAM_* flags anymore
The sh_mobile_ceu_camera driver has been converted to use the V4L2
subdevice .[gs]_mbus_config() operations, therefore we don't need
SOCAM_* flags for the soc_camera_platform driver anymore. Remove
them.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 17:42:28 +0000 (14:42 -0300)]
[media] V4L: sh_mobile_csi2: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 17:42:27 +0000 (14:42 -0300)]
[media] V4L: rj54n1cb0c: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Thu, 28 Jul 2011 17:42:27 +0000 (14:42 -0300)]
[media] V4L: ov9740: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>