Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] adv7842: Remove deprecated video-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated
and unused. Remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] adv7511: Remove deprecated video-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated
and unused. Remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] ad9389b: Remove deprecated video-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated
and unused. Remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
upstream: [media] media: staging: davinci: vpfe: Switch to pad-level DV operations
The video-level enum_dv_timings and dv_timings_cap operations are
deprecated in favor of the pad-level versions. All subdev drivers
implement the pad-level versions, switch to them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
upstream: [media] media: davinci: vpif: Switch to pad-level DV operations
The video-level enum_dv_timings and dv_timings_cap operations are
deprecated in favor of the pad-level versions. All subdev drivers
implement the pad-level versions, switch to them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
upstream: [media] media: bfin_capture: Switch to pad-level DV operations
The video-level enum_dv_timings and dv_timings_cap operations are
deprecated in favor of the pad-level versions. All subdev drivers
implement the pad-level versions, switch to them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] tvp7002: Add pad-level DV timings operations
The video enum_dv_timings operation is deprecated. Implement the
pad-level version of the operation to prepare for the removal of the
video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] ths8200: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations to prepare for the
removal of the video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] adv7842: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations to prepare for the
removal of the video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] adv7511: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations to prepare for the
removal of the video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
upstream: [media] ad9389b: Add pad-level DV timings operations
The video enum_dv_timings and dv_timings_cap operations are deprecated.
Implement the pad-level version of those operations to prepare for the
removal of the video version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Wed, 29 Jan 2014 13:05:10 +0000 (10:05 -0300)]
upstream: [media] v4l: Add pad-level DV timings subdev operations
The dv_timings_cap and enum_dv_timings subdev operations are implemented
at the device level, but apply to pads. Create new variants of those
operations at the pad level. The device level variants will be removed
once all drivers are ported to the pad level DT timings operations.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ismael Luceno [Sun, 18 May 2014 23:23:47 +0000 (20:23 -0300)]
upstream: [media] solo6x10: Kconfig: Add supported card list to the SOLO6X10 knob
Explicitly list the cards supported by and tested with this driver.
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ismael Luceno [Sun, 18 May 2014 19:44:11 +0000 (16:44 -0300)]
upstream: [media] solo6x10: Reduce OSD writes to the minimum necessary
Instead of unconditionally writing SOLO_EOSD_EXT_SIZE() bytes to the OSD
area (which is 64 or 128 kB depending on the PCI board) we only
write the actual amount of data needed which is 16 * OSD_TEXT_MAX (= 16 * 44).
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Mon, 28 Apr 2014 19:53:01 +0000 (16:53 -0300)]
upstream: [media] v4l: subdev: Move [gs]_std operation to video ops
The g_std and s_std operations are video-related, move them to the video
ops where they belong.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Conflicts:
include/media/v4l2-subdev.h
Victor Lambret [Wed, 21 May 2014 09:48:43 +0000 (06:48 -0300)]
upstream: [media] videobuf2-core: remove duplicated code
Remove duplicated test of buffer presence at streamon
Signed-off-by: Victor Lambret <victor.lambret.ext@parrot.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:55 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif: add Copyright message
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:53 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop check __KERNEL__
Drops check for #ifdef __KERNEL__, because this header is a Kernel
only header, where this define is always true.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:52 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: return -ENODATA for *std calls
this patch adds supports to return -ENODATA to *std calls
if the selected output does not support it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:51 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: return -ENODATA for *dv_timings calls
this patch adds suppport to return -ENODATA for *dv_timings calls
if the current output does not support it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:50 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: use SIMPLE_DEV_PM_OPS
this patch uses SIMPLE_DEV_PM_OPS, and drops unneeded members
from io_usrs, usrs and makes use of vb2 helepers instead.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:49 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: group v4l2_ioctl_ops
this patch groups the v4l2_ioctl_ops and align them appropriately.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:48 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop cropcap
this patch drops cropcap as this driver doesnt support cropping.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 16 May 2014 01:53:31 +0000 (22:53 -0300)]
upstream: [media] tvp5150: Replace container_of() with to_tvp5150()
Use the driver-specific inline function to cast from a subdev pointer to
a tvp5150 pointer instead of the generic container_of().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Arun Kumar K [Wed, 14 May 2014 06:59:42 +0000 (03:59 -0300)]
upstream: [media] v4l: Add source change event
This event indicates that the video device has encountered
a source parameter change during runtime. This can typically be a
resolution change detected by a video decoder OR a format change
detected by an input connector.
This needs to be nofified to the userspace and the application may
be expected to reallocate buffers before proceeding. The application
can subscribe to events on a specific pad or input port which
it is interested in.
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dan Carpenter [Fri, 9 May 2014 11:55:09 +0000 (08:55 -0300)]
upstream: [media] Staging: dt3155v4l: set error code on failure
We should be returning -ENOMEM here instead of success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Luis R. Rodriguez [Fri, 18 Apr 2014 01:24:44 +0000 (22:24 -0300)]
upstream: [media] bt8xx: make driver routines fit into its own namespcae
There is a few conflicts with older symbols on older kernels so we
have to patch this driver when backporting. Instead just make these
routines specific to the driver.
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Luis R. Rodriguez [Fri, 18 Apr 2014 01:24:43 +0000 (22:24 -0300)]
upstream: [media] technisat-usb2: rename led enums to be specific to driver
The current names clash with include/linux/leds.h namespace,
although there is no compile issue currently this does affect
backports. Drivers should also try to avoid generic namespaces
for things like this.
Cc: Felipe Pena <felipensp@gmail.com>
Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Mon, 24 Mar 2014 12:48:13 +0000 (09:48 -0300)]
upstream: [media] Documentation: media: Remove double 'struct'
The XML entities for media structures start with the 'struct' word.
Remove duplicate 'struct' from the entity users.
Reported-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:46 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: initialize the video device in single place
this patch moves the initalization of video device to a
single place and uses macro to define the driver name and
use it appropriately on the required places.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:45 +0000 (10:33 -0300)]
upstream: [media] media: davinic: vpif_capture: drop started member from struct common_obj
the started member was indicating whether streaming was started
or not, this can be determined by vb2 offering, this patch replaces
the started member from struct common_obj with appropriate vb2 calls.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:44 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop unnecessary field memory
This field is set, but not used anymore. Remove it.
No functional changes.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:43 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop reserving memory for device
this patch drops reserving contigiuos memory for the device,
as now with CMA support there is no need of this.
This patch also prepares to removal of config_params.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:42 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: use vb2_ioctl_* helpers
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:41 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: use v4l2_fh_open and vb2_fop_release
this patch adds support to use v4l2_fh_open() and vb2_fop_release,
which allows to drop driver specific struct vpif_fh, as this is handeled
by core. This patch also drops vpif_g/s_priority as this handeled
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 <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:40 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: use vb2_fop_mmap/poll
No need to reinvent the wheel. Just use the already existing
functions for that.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:39 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: improve start/stop_streaming callbacks
this patch drops unnecessary check from start_streaming() callback
as this is already done in try/s_fmt and some minor code cleanups,
drops check for vb2_is_streaming() as this check is done by vb2
itself before calling this callback.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:38 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: improve vpif_buffer_queue_setup() function
this patch sets the sizes[0] of plane according to the fmt passed
or which is being set in the channel, in both MMAP and USERPTR buffer
type.
This patch also move the calculation of offests(vpif_calculate_offsets())
to queue_setup() callback as after queue_setup() callback the
application is no longer allowed to change format, and prepares to
removal of config_params.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:37 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: improve vpif_buffer_prepare() callback
this patch improve vpif_buffer_prepare() callback, as buf_prepare()
callback is never called with invalid state and check for
vb2_plane_vaddr(vb, 0) is dropped as payload check should
be done unconditionally.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:36 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop buf_cleanup() callback
this patch drops buf_cleanup() callback as this callback
is never called with buffer state active.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:35 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: release buffers in case start_streaming() call back fails
this patch adds support to release the buffer by calling
vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED
if start_streaming() call back fails.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:33 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: use vb2_ops_wait_prepare/finish helper functions
this patch makes use of vb2_ops_wait_prepare/finish helper functions.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:32 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: drop buf_init() callback
this patch drops the buf_init() callback as init
of buf list is not required.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:31 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_capture: initalize vb2 queue and DMA context during probe
this patch moves the initalization of vb2 queue and
the DMA context to probe() and clean up in remove()
callback respectively.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:30 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: fix v4l-compliance issues
this patch does following,
1: sets initial default format during probe.
2: removes spurious messages.
3: optimize vpif_s/try_fmt_vid_out code.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:29 +0000 (10:33 -0300)]
upstream: [media] media: davinci; vpif_display: fix checkpatch error
this patch fixes following checkpatch warning, and alongside
renames the DAVINCIHD_DISPLAY_H to VPIF_DISPLAY_H.
WARNING: Unnecessary space before function pointer arguments
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:28 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: return -ENODATA for *std calls
this patch adds supports to return -ENODATA to *std calls
if the selected output does not support it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:27 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: return -ENODATA for *dv_timings calls
this patch adds suppport to return -ENODATA for *dv_timings calls
if the current output does not support it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:26 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: use SIMPLE_DEV_PM_OPS
this patch uses SIMPLE_DEV_PM_OPS, and drops unneeded members
from io_usrs, usrs and makes use of vb2 helepers instead.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:25 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: group v4l2_ioctl_ops
this patch gorups the v4l2_ioctl_ops and align them appropriately.
No functional changes.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:24 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop cropcap
this patch drops cropcap as this driver doesnt support cropping.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:23 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop unneeded module params
this pacth drops unneeded module params and vpif_config_params.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:22 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: initialize the video device in single place
this patch moves the initalization of video device to a
single place and uses macro to define the driver name and
use it appropraitely in required places.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:21 +0000 (10:33 -0300)]
upstream: [media] media: davinic: vpif_display: drop started member from struct common_obj
the started member was indicating whether streaming was started
or not, this can be determined by vb2 offering, this patch replaces
the started member from struct common_obj with appropriate vb2 calls.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:20 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop numbuffers field from common_obj
This patch drops numbuffers member from struct common_obj
as this was not required.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:19 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop unnecessary field memory
The common->memory field is set but not used anywhere. Drop it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:18 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop reserving memory for device
this patch drops reserving contigiuos memory for the device,
as now with CMA support there is no need of this.
This patch also prepares to removal of config_params.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:17 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop unused member fbuffers
As fbuffers is not used anymore, remove it.
No functional changes.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:16 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: use vb2_ioctl_* helpers
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:15 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: use v4l2_fh_open and vb2_fop_release
this patch adds support to use v4l2_fh_open() and vb2_fop_release,
which allows to drop driver specific struct vpif_fh, as this is handeled
by core. This patch also drops vpif_g/s_priority as this handeled
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 <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:14 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: use vb2_fop_mmap/poll
No need to reinvent the wheel. Just use the already existing
functions for that.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:13 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: improve start/stop_streaming callbacks
this patch drops unnecessary check from start_streaming() callback
as this is already done in try/s_fmt and some minor code cleanups,
drops check for vb2_is_streaming() as this check is done by vb2
itself before calling this callback.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:12 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: improve vpif_buffer_queue_setup() function
this patch sets the sizes[0] of plane according to the fmt passed
or which is being set in the channel, in both MMAP and USERPTR buffer
type.
This patch also move the calculation of offests(vpif_calculate_offsets())
to queue_setup() callback as after queue_setup() callback the
application is no longer allowed to change format, and prepares to
removal of config_params.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:11 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: improve vpif_buffer_prepare() callback
this patch improve vpif_buffer_prepare() callback, as buf_prepare()
callback is never called with invalid state and check for
vb2_plane_vaddr(vb, 0) is dropped as payload check should
be done unconditionally.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:10 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop buf_cleanup() callback
this patch drops buf_cleanup() callback as this callback
is never called with buffer state active.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:09 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: release buffers in case start_streaming() call back fails
this patch adds support to release the buffer by calling
vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED
if start_streaming() call back fails.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:08 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: use vb2_ops_wait_prepare/finish helper functions
this patch makes use of vb2_ops_wait_prepare/finish helper functions.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:07 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: drop buf_init() callback
this patch drops the buf_init() callback as init
of buf list is not required.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Lad, Prabhakar [Fri, 16 May 2014 13:33:06 +0000 (10:33 -0300)]
upstream: [media] media: davinci: vpif_display: initialize vb2 queue and DMA context during probe
this patch moves the initalization of vb2 queue and
the DMA context to probe() and clean up in remove()
callback respectively.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Sylwester Nawrocki [Tue, 15 Apr 2014 10:31:21 +0000 (07:31 -0300)]
upstream: [media] ARM: S5PV210: Remove camera support from mach-goni.c
S5PV210 is going to get DT support, so we can remove the camera
bits from the only board using camera on S5PV210. This allows to
clean the exynos4-is driver by dropping code for non-dt platforms.
This patch can be dropped if a patch removing the whole board
file is applied first.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Alexander Shiyan [Fri, 2 May 2014 07:18:01 +0000 (04:18 -0300)]
upstream: [media] media: mx2-emmaprp: Add missing mutex_destroy()
This patch adds the missing mutex_destroy(), when the driver is removed.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Alexander Shiyan [Fri, 2 May 2014 07:18:00 +0000 (04:18 -0300)]
upstream: [media] media: mx2-emmaprp: Cleanup internal structure
There are no need to store resource struct and IRQ in the driver
internal structure.
This patch remove these fields and improve error handling by using
proper return codes from devm_ioremap_resource() and devm_request_irq().
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Thu, 8 May 2014 13:03:37 +0000 (10:03 -0300)]
upstream: [media] mt9p031: Fix BLC configuration restore when disabling test pattern
Auto BLC and BLC digital offset are disabled when enabling the test
pattern and must be restored when disabling it. The driver does so by
calling the set control handler on the auto BLC and BLC offset controls,
but this programs the hardware with the new value of those controls, not
the current value. Fix this by writing to the registers directly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Wed, 7 May 2014 15:34:34 +0000 (12:34 -0300)]
upstream: [media] mt9p031: Really disable Black Level Calibration in test pattern mode
The digital side of the Black Level Calibration (BLC) function must be
disabled when generating a test pattern to avoid artifacts in the image.
The driver disables BLC correctly at the hardware level, but the feature
gets reenabled by v4l2_ctrl_handler_setup() the next time the device is
powered on.
Fix this by marking the BLC controls as inactive when generating a test
pattern, and ignoring control set requests on inactive controls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 13 Mar 2014 11:44:10 +0000 (08:44 -0300)]
upstream: [media] v4l: ti-vpe: Rename csc memory resource name
Rename the memory block resource "vpe_csc" to "csc" since it also exists within
the VIP IP block. This would make the name more generic, and both VPE and VIP DT
nodes in the future can use it.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 13 Mar 2014 11:44:09 +0000 (08:44 -0300)]
upstream: [media] v4l: ti-vpe: Add selection API in VPE driver
Add selection ioctl ops. For VPE, cropping makes sense only for the input to
VPE(or V4L2_BUF_TYPE_VIDEO_OUTPUT/MPLANE buffers) and composing makes sense
only for the output of VPE(or V4L2_BUF_TYPE_VIDEO_CAPTURE/MPLANE buffers).
For the CAPTURE type, V4L2_SEL_TGT_COMPOSE results in VPE writing the output
in a rectangle within the capture buffer. For the OUTPUT type, V4L2_SEL_TGT_CROP
results in selecting a rectangle region within the source buffer.
Setting the crop/compose rectangles should successfully result in
re-configuration of registers which are affected when either source or
destination dimensions change, set_srcdst_params() is called for this purpose.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 13 Mar 2014 11:44:08 +0000 (08:44 -0300)]
upstream: [media] v4l: ti-vpe: Fix some params in VPE data descriptors
Some parameters of the VPE descriptors were understood incorrectly. They are now
fixed. The fixes are explained as follows:
- When adding an inbound data descriptor to the VPDMA descriptor list, we intend
to use c_rect as the cropped region fetched by VPDMA. Therefore, c_rect->width
shouldn't be used to calculate the line stride, the original image width
should be used for that. We add a 'width' argument which gives the buffer
width in memory.
- frame_width and frame_height describe the complete width and height of the
client to which the channel is connected. If there are multiple channels
fetching data and providing to the same client, the above 2 arguments should
be the width and height of the region covered by all the channels. In the case
where there is only one channel providing pixel data to the client
(like in VPE), frame_width and frame_height should be the cropped width and
cropped height respectively. The calculation of these params is done in the
vpe driver now.
- start_h and start_v is also used in the case of multiple channels to describe
where each channel should start filling pixel data. We don't use this in VPE,
and pass 0s to the vpdma_add_in_dtd() helper.
- Some minor changes are made to the vpdma_add_out_dtd() helper. The c_rect
param is used for specifying the 'composition' target, and 'width' is added
to calculate the line stride.
Signed-off-by: Archit Taneja <archit@ti.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Mauro Carvalho Chehab [Fri, 23 May 2014 17:29:44 +0000 (14:29 -0300)]
upstream: [media] em28xx: make em28xx_free_v4l2 static()
Changeset
95d2608b88 created this function, but declared it as
global, by mistake.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 13 Mar 2014 11:44:06 +0000 (08:44 -0300)]
upstream: [media] v4l: ti-vpe: Allow DMABUF buffer type support
For OMAP and DRA7x, we generally allocate video and graphics buffers through
omapdrm since the corresponding omap-gem driver provides DMM-Tiler backed
contiguous buffers. omapdrm is a dma-buf exporter. These buffers are used by
other drivers in the video pipeline.
Add VB2_DMABUF flag to the io_modes of the vb2 output and capture queues. This
allows the driver to import dma shared buffers.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Archit Taneja [Thu, 13 Mar 2014 11:44:04 +0000 (08:44 -0300)]
upstream: [media] v4l: ti-vpe: register video device only when firmware is loaded
vpe fops(vpe_open in particular) should be called only when VPDMA firmware
is loaded. File operations on the video device are possible the moment it is
registered.
Currently, we register the video device for VPE at driver probe, after calling
a vpdma helper to initialize VPDMA and load firmware. This function is
non-blocking(it calls request_firmware_nowait()), and doesn't ensure that the
firmware is actually loaded when it returns.
We remove the device registration from vpe probe, and move it to a callback
provided by the vpe driver to the vpdma library, through vpdma_create().
The ready field in vpdma_data is no longer needed since we always have firmware
loaded before the device is registered.
A minor problem with this approach is that if the video_register_device
fails(which doesn't really happen), the vpe platform device would be registered.
however, there won't be any v4l2 device corresponding to it.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Thu, 17 Apr 2014 09:44:31 +0000 (06:44 -0300)]
upstream: [media] saa7134: add saa7134_userptr module option to enable USERPTR
If the saa7134 module is loaded with the saa7134_userptr set to 1,
then USERPTR support is enabled. A check in buffer_prepare
verifies that the pointer is page-aligned.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Thu, 17 Apr 2014 10:30:53 +0000 (07:30 -0300)]
upstream: [media] saa7134: convert to vb2
Convert the saa7134 driver to vb2.
Note that while this uses the vb2-dma-sg version, the VB2_USERPTR mode is
disabled. The DMA hardware only supports DMAing full pages, and in the
USERPTR memory model the first and last scatter-gather buffer is almost
never a full page.
In practice this means that we can't use the VB2_USERPTR mode.
This has been tested with raw video, compressed video, VBI, radio, DVB and
video overlays.
Unfortunately, a vb2 conversion is one of those things you cannot split
up in smaller patches, it's all or nothing. This patch switches the whole
driver over to vb2, using the vb2 ioctl and fop helper functions.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Thu, 17 Apr 2014 09:06:06 +0000 (06:06 -0300)]
upstream: [media] saa7134: move saa7134_pgtable to saa7134_dmaqueue
All dmaqueue's use saa7134_pgtable, so move it into struct saa7134_dmaqueue.
The videobuf_queue priv_data field now points to the dmaqueue struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Tue, 13 May 2014 17:24:44 +0000 (14:24 -0300)]
upstream: [media] saa7134: rename vbi/cap to vbi_vbq/cap_vbq
Use consistent _vbq suffix for videobuf_queue fields.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Philipp Zabel [Fri, 9 May 2014 15:32:10 +0000 (12:32 -0300)]
upstream: [media] vb2: fix num_buffers calculation if req->count > VIDEO_MAX_FRAMES
num_buffers can't be bigger than VIDEO_MAX_FRAME. This is assured by:
num_buffers = min_t(unsigned int, req->count, VIDEO_MAX_FRAME);
However, this value is overriden by:
num_buffers = max_t(unsigned int, req->count, q->min_buffers_needed);
It should, instead, use the previously calculated value as an input
to max_t:
num_buffers = max_t(unsigned int, num_buffers, q->min_buffers_needed);
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Sun, 20 Apr 2014 23:55:41 +0000 (20:55 -0300)]
upstream: [media] v4l: vb2: Avoid double WARN_ON when stopping streaming
The __vb2_queue_cancel function marks the queue as not streaming and
then WARNs when buffers are still owned by the driver. It proceeds to
complete all active buffers by calling vb2_buffer_done with the new
buffer state set to VB2_BUF_STATE_ERROR in that case. This triggers
another WARN_ON due to as new state not being VB2_BUF_STATE_QUEUED while
the queue is not streaming.
Check buffer ownership and complete all active buffers before marking
the queue as not streaming to avoid the double WARN_on.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:25 +0000 (16:33 -0300)]
upstream: [media] em28xx: move fields wq_trigger and streaming_started from struct em28xx to struct em28xx_audio
Both wq_trigger and stream_started are used only to control the em28xx
alsa streaming. They don't belong to em28xx common struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:24 +0000 (16:33 -0300)]
upstream: [media] em28xx: remove field tuner_addr from struct em28xx
The tuner address is only used by the v4l submodule and at tuner setup and
can be obtained from the board data directly (if specified).
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:23 +0000 (16:33 -0300)]
upstream: [media] em28xx: remove field tda9887_conf from struct em28xx
The tda9887 chipset is part of the analog tuner. Move it out of
em28xx-cards.
Also, it is used only one time by the v4l2 sub-module at tuner setup.
With that, we can get rid of an additional data inside the em28xx
common structure.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:22 +0000 (16:33 -0300)]
upstream: [media] em28xx: move tuner frequency field from struct em28xx to struct v4l2
Move V4L2-specific frequency cache to struct em28xx_v4l2.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Sun, 11 May 2014 20:59:04 +0000 (17:59 -0300)]
upstream: [media] em28xx: move v4l2 user counting fields from struct em28xx to struct v4l2
Despite being at the common em28xx struct, those two fields are
actually taking into account only the usage inside em28xx v4l2
submodule. So, move them out of the common struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:20 +0000 (16:33 -0300)]
upstream: [media] em28xx: move capture state tracking fields from struct em28xx to struct v4l2
Move some temporary capture tracking date to the em28xx_v4l2 struct,
as those info are used only by em28xx v4l2 submodule.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:19 +0000 (16:33 -0300)]
upstream: [media] em28xx: move sensor parameter fields from struct em28xx to struct v4l2
Move camera sensor resolution and xtal out of em28xx common struct,
as thore are used only by the em28xx v4l2 submodule.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:18 +0000 (16:33 -0300)]
upstream: [media] em28xx: move progressive/interlaced fields from struct em28xx to struct v4l2
The video progressive data fields belong to analog TV. Move them out
of the common em28xx struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:17 +0000 (16:33 -0300)]
upstream: [media] em28xx: move struct em28xx_fmt *format from struct em28xx to struct v4l2
The analog format struct belongs to analog TV. Move it out of the
common em28xx struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:16 +0000 (16:33 -0300)]
upstream: [media] em28xx: move TV norm from struct em28xx to struct v4l2
TV norm is specific to analog TV reception. move it out of the common
em28xx struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:15 +0000 (16:33 -0300)]
upstream: [media] em28xx: move vinmode and vinctrl data from struct em28xx to struct v4l2
The video input mode and control data also belong only to the
analog side. move them to struct em28xx_v4l.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:14 +0000 (16:33 -0300)]
upstream: [media] em28xx: move v4l2 frame resolutions and scale data from struct em28xx to struct v4l2
The em28xx scaler data are used only for analog video. Move them to
struct em28xx_v4l2.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:13 +0000 (16:33 -0300)]
upstream: [media] em28xx: move videobuf2 related data from struct em28xx to struct v4l2
The video and VBI-specific VB2 queue and mutexes are used only by
the v4l2 sub-driver. Move them to the V4L2 struct, preventing
wasting memory if this sub-driver is not used.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Mon, 24 Mar 2014 19:33:12 +0000 (16:33 -0300)]
upstream: [media] em28xx: move video_device structs from struct em28xx to struct v4l2
There are 3 struct video_device at the em28xx common struct,
for video, VBI and radio. They all are used only by the V4L2 driver.
So, move them to the v4l2-specific struct.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>