cascardo/linux.git
10 years ago[media] adv7604: Add endpoint properties to DT bindings
Laurent Pinchart [Tue, 4 Feb 2014 23:23:16 +0000 (20:23 -0300)]
[media] adv7604: Add endpoint properties to DT bindings

Add support for the hsync-active, vsync-active and pclk-sample
properties to the DT bindings and control BT.656 mode implicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7604: Add DT support
Laurent Pinchart [Mon, 25 Nov 2013 19:19:08 +0000 (16:19 -0300)]
[media] adv7604: Add DT support

Parse the device tree node to populate platform data. Only the ADV7611
is currently support with DT.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7604: Specify the default input through platform data
Laurent Pinchart [Fri, 31 Jan 2014 13:57:27 +0000 (10:57 -0300)]
[media] adv7604: Specify the default input through platform data

And set input routing when initializing the device.

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>
10 years ago[media] adv7604: Support hot-plug detect control through a GPIO
Laurent Pinchart [Thu, 30 Jan 2014 21:37:08 +0000 (18:37 -0300)]
[media] adv7604: Support hot-plug detect control through a GPIO

Add support for optional GPIO-controlled HPD pins in addition to the
ADV7604-specific hotplug notifier.

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>
10 years ago[media] adv7604: Sort headers alphabetically
Laurent Pinchart [Thu, 30 Jan 2014 22:18:34 +0000 (19:18 -0300)]
[media] adv7604: Sort headers alphabetically

This helps locating duplicates and inserting new headers.

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>
10 years ago[media] adv7604: Replace *_and_or() functions with *_clr_set()
Laurent Pinchart [Thu, 30 Jan 2014 20:17:42 +0000 (17:17 -0300)]
[media] adv7604: Replace *_and_or() functions with *_clr_set()

The *_and_or() functions take an 'and' bitmask to be ANDed with the
register value before ORing it with th 'or' bitmask. As the functions
are used to mask and set bits selectively, this requires the caller to
invert the 'and' bitmask and is thus error prone. Replace those
functions with a *_clr_set() variant that takes a mask of bits to be
cleared instead of a mask of bits to be kept.

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>
10 years ago[media] adv7604: Store I2C addresses and clients in arrays
Laurent Pinchart [Thu, 30 Jan 2014 19:32:21 +0000 (16:32 -0300)]
[media] adv7604: Store I2C addresses and clients in arrays

This allows replacing duplicate code blocks by loops over the arrays.

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>
10 years ago[media] adv7604: Inline the to_sd function
Laurent Pinchart [Thu, 30 Jan 2014 18:16:03 +0000 (15:16 -0300)]
[media] adv7604: Inline the to_sd function

This one line function is called in a single location. Inline it.

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>
10 years ago[media] v4l: subdev: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] v4l: subdev: 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>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7604: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] adv7604: 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>
10 years ago[media] adv7604: Add pad-level DV timings support
Laurent Pinchart [Wed, 29 Jan 2014 13:09:41 +0000 (10:09 -0300)]
[media] adv7604: Add pad-level DV timings support

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>
10 years ago[media] adv7604: Make output format configurable through pad format operations
Laurent Pinchart [Sun, 26 Jan 2014 21:42:37 +0000 (18:42 -0300)]
[media] adv7604: Make output format configurable through pad format operations

Replace the dummy video format operations by pad format operations that
configure the output format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7604: Add sink pads
Laurent Pinchart [Wed, 29 Jan 2014 13:08:58 +0000 (10:08 -0300)]
[media] adv7604: Add sink pads

The ADV7604 has sink pads for its HDMI and analog inputs. Report 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>
10 years ago[media] adv7604: Remove subdev control handlers
Laurent Pinchart [Sun, 26 Jan 2014 21:07:38 +0000 (18:07 -0300)]
[media] adv7604: Remove subdev control handlers

Control operations are handled by the control framework and the subdev
control handlers are never called directly. 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>
10 years ago[media] adv7604: Add adv7611 support
Lars-Peter Clausen [Mon, 25 Nov 2013 18:45:07 +0000 (15:45 -0300)]
[media] adv7604: Add adv7611 support

This patch adds support for the Analog Devices ADV7611 HDMI receiver.
The adv7611 is quite similar to the adv7604. It has only one instead of four
HDMI inputs and no analog frontend though. Also some register bits have been
shuffled around, but large parts of their register maps are compatible.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7604: Cache register contents when reading multiple bits
Laurent Pinchart [Wed, 8 Jan 2014 23:26:55 +0000 (20:26 -0300)]
[media] adv7604: Cache register contents when reading multiple bits

When extracting multiple bits from a single register read the register
once and extract the bits on the read value.

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>
10 years ago[media] adv7604: Add 16-bit read functions for CP and HDMI
Laurent Pinchart [Wed, 8 Jan 2014 22:30:37 +0000 (19:30 -0300)]
[media] adv7604: Add 16-bit read functions for CP and HDMI

16-bit registers are read through two 8-bit read operations. Factorize
that common pattern into 16-bit read accessors to simplify the code.

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>
10 years ago[media] adv7604: Don't put info string arrays on the stack
Lars-Peter Clausen [Mon, 25 Nov 2013 19:15:29 +0000 (16:15 -0300)]
[media] adv7604: Don't put info string arrays on the stack

We do not want to modify the info string arrays ever, so no need to
waste stack space for them. While we are at it also make them const.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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>
10 years ago[media] adv7604: Add support for asynchronous probing
Lars-Peter Clausen [Mon, 25 Nov 2013 19:18:02 +0000 (16:18 -0300)]
[media] adv7604: Add support for asynchronous probing

Register the device with the v4l2 asynchronous probing framework to
support asynchronous instantiation systems such as DT.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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>
10 years ago[media] adv7604: Add missing include to linux/types.h
Lars-Peter Clausen [Thu, 21 Nov 2013 14:23:45 +0000 (11:23 -0300)]
[media] adv7604: Add missing include to linux/types.h

The file is using u8 which is defined in linux/types.h.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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>
10 years ago[media] v4l: Validate fields in the core code for subdev EDID ioctls
Laurent Pinchart [Wed, 29 Jan 2014 13:07:13 +0000 (10:07 -0300)]
[media] v4l: Validate fields in the core code for subdev EDID ioctls

The subdev EDID ioctls receive a pad field that must reference an
existing pad and an EDID field that must point to a buffer. Validate
both fields in the core code instead of duplicating validation in all
drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: Add support for DV timings ioctls on subdev nodes
Laurent Pinchart [Wed, 29 Jan 2014 13:07:13 +0000 (10:07 -0300)]
[media] v4l: Add support for DV timings ioctls on subdev nodes

Validate the pad field in the core code whenever specified.

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>
10 years ago[media] v4l: Improve readability by not wrapping ioctl number #define's
Laurent Pinchart [Wed, 29 Jan 2014 13:06:13 +0000 (10:06 -0300)]
[media] v4l: Improve readability by not wrapping ioctl number #define's

Wrapping the #define's at a 80 columns boundary just obfuscates the
code. Don't do that.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] tvp7002: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] tvp7002: 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>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] ths8200: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] ths8200: 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>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-tv: hdmiphy: Remove deprecated video-level DV timings operation
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] s5p-tv: hdmiphy: Remove deprecated video-level DV timings operation

The video enum_dv_timings operation is deprecated and unused. Remove it.

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>
10 years ago[media] s5p-tv: hdmi: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] s5p-tv: hdmi: 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>
10 years ago[media] adv7842: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] adv7511: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] ad9389b: Remove deprecated video-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] s5p-tv: mixer: Switch to pad-level DV operations
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
[media] s5p-tv: mixer: 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>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: staging: davinci: vpfe: Switch to pad-level DV operations
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
[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>
10 years ago[media] media: davinci: vpif: Switch to pad-level DV operations
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
[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>
10 years ago[media] media: bfin_capture: Switch to pad-level DV operations
Laurent Pinchart [Fri, 31 Jan 2014 12:04:19 +0000 (09:04 -0300)]
[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>
10 years ago[media] tvp7002: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] ths8200: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] s5p-tv: hdmiphy: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] s5p-tv: hdmiphy: 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>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-tv: hdmi: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[media] s5p-tv: hdmi: 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>
10 years ago[media] adv7842: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] adv7511: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] ad9389b: Add pad-level DV timings operations
Laurent Pinchart [Fri, 31 Jan 2014 11:51:18 +0000 (08:51 -0300)]
[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>
10 years ago[media] v4l: Add pad-level DV timings subdev operations
Laurent Pinchart [Wed, 29 Jan 2014 13:05:10 +0000 (10:05 -0300)]
[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>
10 years ago[media] solo6x10: Kconfig: Add supported card list to the SOLO6X10 knob
Ismael Luceno [Sun, 18 May 2014 23:23:47 +0000 (20:23 -0300)]
[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>
10 years ago[media] solo6x10: Reduce OSD writes to the minimum necessary
Ismael Luceno [Sun, 18 May 2014 19:44:11 +0000 (16:44 -0300)]
[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>
10 years ago[media] media: stk1160: Avoid stack-allocated buffer for control URBs
Ezequiel Garcia [Thu, 17 Apr 2014 12:28:20 +0000 (09:28 -0300)]
[media] media: stk1160: Avoid stack-allocated buffer for control URBs

Currently stk1160_read_reg() uses a stack-allocated char to get the
read control value. This is wrong because usb_control_msg() requires
a kmalloc-ed buffer.

This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive
the read value.

While here, let's remove the urb_buf array which was meant for a similar
purpose, but never really used.

Cc: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v3.7 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: subdev: Move [gs]_std operation to video ops
Laurent Pinchart [Mon, 28 Apr 2014 19:53:01 +0000 (16:53 -0300)]
[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>
10 years ago[media] videobuf2-core: remove duplicated code
Victor Lambret [Wed, 21 May 2014 09:48:43 +0000 (06:48 -0300)]
[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>
10 years ago[media] media: davinci: vpif: add Copyright message
Lad, Prabhakar [Fri, 16 May 2014 13:33:55 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop check __KERNEL__
Lad, Prabhakar [Fri, 16 May 2014 13:33:53 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: return -ENODATA for *std calls
Lad, Prabhakar [Fri, 16 May 2014 13:33:52 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: return -ENODATA for *dv_timings calls
Lad, Prabhakar [Fri, 16 May 2014 13:33:51 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: use SIMPLE_DEV_PM_OPS
Lad, Prabhakar [Fri, 16 May 2014 13:33:50 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: group v4l2_ioctl_ops
Lad, Prabhakar [Fri, 16 May 2014 13:33:49 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop cropcap
Lad, Prabhakar [Fri, 16 May 2014 13:33:48 +0000 (10:33 -0300)]
[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>
10 years agoRevert "[media] media: davinci: vpif_capture: drop unneeded module params"
Mauro Carvalho Chehab [Sat, 24 May 2014 19:32:44 +0000 (16:32 -0300)]
Revert "[media] media: davinci: vpif_capture: drop unneeded module params"

This patch removes some modprobe parameters, without any reason
or description. I was supposed to not merge this patch, but It
was merged by mistake.

Revert it while nobody provides a good description for such patch.

This reverts commit b952662f272ae43c1583fac4dcda71ef36c33528.

Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] tvp5150: Replace container_of() with to_tvp5150()
Laurent Pinchart [Fri, 16 May 2014 01:53:31 +0000 (22:53 -0300)]
[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>
10 years ago[media] s5p-mfc: Add support for resolution change event
Pawel Osciak [Wed, 14 May 2014 06:59:43 +0000 (03:59 -0300)]
[media] s5p-mfc: Add support for resolution change event

When a resolution change point is reached, queue an event to signal the
userspace that a new set of buffers is required before decoding can
continue.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: Add source change event
Arun Kumar K [Wed, 14 May 2014 06:59:42 +0000 (03:59 -0300)]
[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>
10 years ago[media] Staging: dt3155v4l: set error code on failure
Dan Carpenter [Fri, 9 May 2014 11:55:09 +0000 (08:55 -0300)]
[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>
10 years ago[media] bt8xx: make driver routines fit into its own namespcae
Luis R. Rodriguez [Fri, 18 Apr 2014 01:24:44 +0000 (22:24 -0300)]
[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>
10 years ago[media] technisat-usb2: rename led enums to be specific to driver
Luis R. Rodriguez [Fri, 18 Apr 2014 01:24:43 +0000 (22:24 -0300)]
[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>
10 years ago[media] Documentation: media: Remove double 'struct'
Laurent Pinchart [Mon, 24 Mar 2014 12:48:13 +0000 (09:48 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop unneeded module params
Lad, Prabhakar [Fri, 16 May 2014 13:33:47 +0000 (10:33 -0300)]
[media] media: davinci: vpif_capture: drop unneeded module 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>
10 years ago[media] media: davinci: vpif_capture: initialize the video device in single place
Lad, Prabhakar [Fri, 16 May 2014 13:33:46 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinic: vpif_capture: drop started member from struct common_obj
Lad, Prabhakar [Fri, 16 May 2014 13:33:45 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop unnecessary field memory
Lad, Prabhakar [Fri, 16 May 2014 13:33:44 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop reserving memory for device
Lad, Prabhakar [Fri, 16 May 2014 13:33:43 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: use vb2_ioctl_* helpers
Lad, Prabhakar [Fri, 16 May 2014 13:33:42 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: use v4l2_fh_open and vb2_fop_release
Lad, Prabhakar [Fri, 16 May 2014 13:33:41 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: use vb2_fop_mmap/poll
Lad, Prabhakar [Fri, 16 May 2014 13:33:40 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: improve start/stop_streaming callbacks
Lad, Prabhakar [Fri, 16 May 2014 13:33:39 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: improve vpif_buffer_queue_setup() function
Lad, Prabhakar [Fri, 16 May 2014 13:33:38 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: improve vpif_buffer_prepare() callback
Lad, Prabhakar [Fri, 16 May 2014 13:33:37 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop buf_cleanup() callback
Lad, Prabhakar [Fri, 16 May 2014 13:33:36 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: release buffers in case start_streaming() call...
Lad, Prabhakar [Fri, 16 May 2014 13:33:35 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: use vb2_ops_wait_prepare/finish helper functions
Lad, Prabhakar [Fri, 16 May 2014 13:33:33 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: drop buf_init() callback
Lad, Prabhakar [Fri, 16 May 2014 13:33:32 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_capture: initalize vb2 queue and DMA context during...
Lad, Prabhakar [Fri, 16 May 2014 13:33:31 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: fix v4l-compliance issues
Lad, Prabhakar [Fri, 16 May 2014 13:33:30 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci; vpif_display: fix checkpatch error
Lad, Prabhakar [Fri, 16 May 2014 13:33:29 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: return -ENODATA for *std calls
Lad, Prabhakar [Fri, 16 May 2014 13:33:28 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: return -ENODATA for *dv_timings calls
Lad, Prabhakar [Fri, 16 May 2014 13:33:27 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: use SIMPLE_DEV_PM_OPS
Lad, Prabhakar [Fri, 16 May 2014 13:33:26 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: group v4l2_ioctl_ops
Lad, Prabhakar [Fri, 16 May 2014 13:33:25 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop cropcap
Lad, Prabhakar [Fri, 16 May 2014 13:33:24 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop unneeded module params
Lad, Prabhakar [Fri, 16 May 2014 13:33:23 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: initialize the video device in single place
Lad, Prabhakar [Fri, 16 May 2014 13:33:22 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinic: vpif_display: drop started member from struct common_obj
Lad, Prabhakar [Fri, 16 May 2014 13:33:21 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop numbuffers field from common_obj
Lad, Prabhakar [Fri, 16 May 2014 13:33:20 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop unnecessary field memory
Lad, Prabhakar [Fri, 16 May 2014 13:33:19 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop reserving memory for device
Lad, Prabhakar [Fri, 16 May 2014 13:33:18 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop unused member fbuffers
Lad, Prabhakar [Fri, 16 May 2014 13:33:17 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: use vb2_ioctl_* helpers
Lad, Prabhakar [Fri, 16 May 2014 13:33:16 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: use v4l2_fh_open and vb2_fop_release
Lad, Prabhakar [Fri, 16 May 2014 13:33:15 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: use vb2_fop_mmap/poll
Lad, Prabhakar [Fri, 16 May 2014 13:33:14 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: improve start/stop_streaming callbacks
Lad, Prabhakar [Fri, 16 May 2014 13:33:13 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: improve vpif_buffer_queue_setup() function
Lad, Prabhakar [Fri, 16 May 2014 13:33:12 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: improve vpif_buffer_prepare() callback
Lad, Prabhakar [Fri, 16 May 2014 13:33:11 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: drop buf_cleanup() callback
Lad, Prabhakar [Fri, 16 May 2014 13:33:10 +0000 (10:33 -0300)]
[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>
10 years ago[media] media: davinci: vpif_display: release buffers in case start_streaming() call...
Lad, Prabhakar [Fri, 16 May 2014 13:33:09 +0000 (10:33 -0300)]
[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>