Wei Yongjun [Mon, 3 Dec 2012 01:50:47 +0000 (22:50 -0300)]
[media] media: davinci: vpbe: return error code on error in vpbe_display_g_crop()
We have assigned error code to 'ret' if crop->type is not
V4L2_BUF_TYPE_VIDEO_OUTPUT, but never use it.
We'd better return the error code on this error.
Wei Yongjun [Sun, 2 Dec 2012 09:18:35 +0000 (06:18 -0300)]
[media] media: davinci: vpbe: fix return value check in vpbe_display_reqbufs()
In case of error, the function vb2_dma_contig_init_ctx() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().
Lad, Prabhakar [Wed, 28 Nov 2012 13:58:47 +0000 (10:58 -0300)]
[media] media: davinci: vpbe: enable building of vpbe driver for DM355 and DM365
This patch allows enabling building of VPBE display driver for DM365
and DM355. This also removes unnecessary entry VIDEO_DM644X_VPBE
in Kconfig, which could have been done with single entry, and
appropriate changes in Makefile for building.
Lad, Prabhakar [Tue, 20 Nov 2012 10:30:36 +0000 (07:30 -0300)]
[media] davinci: vpbe: pass different platform names to handle different ip's
The vpbe driver can handle different platforms DM644X, DM36X and
DM355. To differentiate between this platforms venc_type/vpbe_type
was passed as part of platform data which was incorrect. The correct
way to differentiate to handle this case is by passing different
platform names.
This patch creates platform_device_id[] array supporting different
platforms and assigns id_table to the platform driver, and finally
in the probe gets the actual device by using platform_get_device_id()
and gets the appropriate driver data for that platform.
Taking this approach will also make the DT transition easier.
Manjunath Hadli [Wed, 28 Nov 2012 05:29:46 +0000 (02:29 -0300)]
[media] davinci: vpfe: Add documentation and TODO
Add documentation on the Davinci VPFE driver. Document the subdevs,
and private IOTCLs the driver implements. This patch also includes
the TODO's to fit into drivers/media/ folder.
Manjunath Hadli [Wed, 28 Nov 2012 05:17:55 +0000 (02:17 -0300)]
[media] davinci: vpfe: dm365: resizer driver based on media framework
Add the video resizer driver with the v4l2 media controller framework
which takes care of resizing the video frames with both up-scaling
downscaling facility. The driver supports both continuous and
single shot operations.The driver supports resizer as a subdevice
and a media entity. It has support for 2 resizers - resizerA
and resizerB.
Manjunath Hadli [Wed, 28 Nov 2012 05:16:35 +0000 (02:16 -0300)]
[media] davinci: vpfe: dm365: add IPIPE hardware layer support
IPIPE is the hardware IP which implements the functionality
required for resizer, ipipe(colorspace converter) and
the associated hardware support. This patch implements hardware
setup including coefficient programming for various hardware
filters, gamma, cfa and clock enabling.
Manjunath Hadli [Wed, 28 Nov 2012 05:14:10 +0000 (02:14 -0300)]
[media] davinci: vpfe: dm365: add IPIPE support for media controller driver
Add the IPIPE subdevice to the DM365 vpfe driver. The IPIPE is the
major sub IP in the DM365 capture VPFE hardware and implements
black clamping, color space conversion, edge enhancements etc.
the block is exposed as a subdevice and implements media controller
based setup and a private IOCTL for fine grain control.
Manjunath Hadli [Wed, 28 Nov 2012 05:09:35 +0000 (02:09 -0300)]
[media] davinci: vpfe: dm365: add ISIF driver based on media framework
add support for ISIF as a subdevice for dm365 vpfe capture driver.
ISIF is responsible for capturing video data both in raw bayer format
on sync seperate signals and YUV through BT656/1120 interfaces.
ISIF is exposed as a subdev for the vpfe driver and allows users to
use the driver through standard media controller interface.
Manjunath Hadli [Wed, 28 Nov 2012 05:06:17 +0000 (02:06 -0300)]
[media] davinci: vpfe: dm365: add IPIPEIF driver based on media framework
add support for dm365 IPIPEIF driver based on media framework.
The IPIPEIF is exposed as a subdev, and it supports features
like fault pixel correction, dark frame subtraction and other
necessary hardware setup.
Manjunath Hadli [Wed, 28 Nov 2012 05:03:38 +0000 (02:03 -0300)]
[media] davinci: vpfe: add v4l2 video driver support
Add a generic video driver functionality to be used by all the vpfe
drivers for davinci SoCs. The functionality includes all the
standard v4l2 interfaces including streaming. The video node
interface can be used both as an input and output node for both
continuous and single shot modes. Also supports dv_presets to include
HD modes, wth support for both user pointer IO and mmap. The buffering
mechanism is based on videobuf2 interface.
Manjunath Hadli [Wed, 28 Nov 2012 05:02:02 +0000 (02:02 -0300)]
[media] davinci: vpfe: add v4l2 capture driver with media interface
Add the vpfe capture driver which implements media controller
interface. The driver supports the DM365 sub ip units for capture
namely - ISIF, IPIPE, IPIPEIF, Resizer. This file represents the main
driver which does isr registration, v4l2 device registration,
media registration and platform driver registrations.
It calls the appropriate subdevs from here to create subdevices
and media entities.
[media] s5p-fimc: Improved pipeline try format routine
Make the pipeline try format routine more generic to support any
number of subdevs in the pipeline, rather than hard coding it for
only a sensor, MIPI-CSIS and FIMC subdevs and the FIMC video node.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Fri, 21 Dec 2012 14:17:42 +0000 (11:17 -0300)]
[media] gspca_sonixj: Add a small delay after i2c_w1
We already have the same delay in i2c_w8, but it was missing from i2c_w1,
adding this delay fixes the Microsoft VX-3000 camera often (but not always)
streaming video data with a very green-ish tint.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Fri, 21 Dec 2012 11:08:47 +0000 (08:08 -0300)]
[media] gspca_sonixb: Properly wait between i2c writes
We must wait for the previous i2c write to complete before starting a new
one. Sofar we were getting away with this, but it seems that some parts
of the usb-subsystem has been sped up making us go to fast :)
This fixes streaming on sn9c103 based cams not working with an
"i2c_w error" error.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Erik Andrén [Mon, 10 Dec 2012 19:35:19 +0000 (16:35 -0300)]
[media] gspca_stv06xx: Disable flip controls for vv6410 sensor
Disable the hardware VFLIP and HFLIP controls for now as we lack a
mechanism to adjust the frame offset, thus rending a bayerimage not
compliant with the announced format.
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jacob Schloss [Sun, 9 Dec 2012 23:18:25 +0000 (20:18 -0300)]
[media] gspca_kinect: add Kinect for Windows USB id
Add the USB ID for the Kinect for Windows RGB camera so it can be used
with the gspca_kinect driver.
Signed-off-by: Jacob Schloss <jacob.schloss@unlimitedautomata.com> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 29 Nov 2012 09:56:45 +0000 (06:56 -0300)]
[media] stk-webcam: Add an upside down dmi table, and add the Asus G1 to it
The stk-webcam module is inserted upside-down in some webcams, so we
need to de hflip and vflip by default on some models.
Note that this patch inverts the value of the controls as reported by
the control API in this case so that for the user they still make sense
(iow not doing any flipping from the ctrl API pov results in an upright
image).
Reported-by: Jose Gómez <adler@dreamcoder.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 29 Nov 2012 09:39:49 +0000 (06:39 -0300)]
[media] gspca-pac207: Add a led_invert module parameter
Some cams have their led connected in such a way that on = off and visa versa
unfortunately we cannot tell this from the driver in any way, so add a module
parameter for this.
Reported-by: Yuri Glushkov <yglushkov@yahoo.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] gspca - stv06xx: Fix a regression with the bridge/sensor vv6410
Setting the H and V flip controls at webcam connection time prevents
the webcam to work correctly.
This patch checks if the webcam is streaming before setting the flips.
It does not set the flips (nor other controls) at webcam start time.
Tested-by: Philippe ROUBACH <philippe.roubach@free.fr> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add second source media pad for the FIFO data output to FIMC-IS
and implement subdev s_stream op for configurations where FIMC-LITE
is used as a glue logic between FIMC-IS and MIPI-CSIS or an image
sensor. The second source media pad will be linked to the FIMC-LITE
video node.
For proper configuration the attached image sensor/video encoder
properties are needed, like video bus type, signal polarities, etc.
For this purpose there is a small routine added that walks the
pipeline and returns the sensor subdev.
[media] s5p-csis: Add support for raw Bayer pixel formats
The MIPI CSIS device supports MIPI CSI-2 RAW8, RAW10, RAW12 data
types. Add related media bus pixel format definitions. This
doesn't cover all possible supported media bus pixel formats.
[media] s5p-fimc: Add variant data structure for Exynos4x12
Add variant data structures for Exynos4212 and Exynos4412 SoC.
Add 'const' qualifier for the variant description structures.
Also remove has_cam_if flags from FIMC3 on Exynos4210 SoC is
it has no interconnections the camera ports.
[media] s5p-csis: Correct the event counters logging
The counter field is unsigned so >= 0 condition always evaluates
to true. Fix this to log events for which counter is > 0 or for
all when in debug mode.
Setting FIMC_REG_CITRGFMT_FLIP_X_MIRROR bit causes X-axis image
flip (vertical flip) and thus it corresponds to V4L2_CID_VFLIP.
Likewise, setting FIMC_REG_CITRGFMT_FLIP_Y_MIRROR bit causes Y-axis
image flip (horizontal flip) and thus it corresponds to V4L2_CID_HFLIP.
Currently the driver does X-axis flip when V4L2_CID_HFLIP is set and
Y-axis flip for V4L2_CID_VFLIP. Fix this incorrect assignment by setting
proper FIMC_REG_CITRGFMT register bits for ctx->hflip and ctx->vflip.
Reported-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Sat, 15 Sep 2012 10:51:47 +0000 (07:51 -0300)]
[media] v4l: Helper function for obtaining timestamps
v4l2_get_timestamp() produces a monotonic timestamp but unlike
ktime_get_ts(), it uses struct timeval instead of struct timespec, saving
the drivers the conversion job when getting timestamps for v4l2_buffer's
timestamp field.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Sun, 21 Oct 2012 19:02:47 +0000 (16:02 -0300)]
[media] v4l: Define video buffer flags for timestamp types
Define video buffer flags for different timestamp types. Everything up to
now have used either realtime clock or monotonic clock, without a way to
tell which clock the timestamp was taken from.
Also document that the clock source of the timestamp in the timestamp field
depends on buffer flags.
[mchehab@redhat.com: fix a few wrong references to Kernel 3.8 - as this patch
is meant for 3.9] Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] exynos-gsc: modify number of output/capture buffers
G-Scaler src buffer count as well as destination buffer
count is increased to 32. This is required for G-Scaler to
interface with MFC, as MFC demands 32 capture buffers for
some H264 streams.
Sachin Kamat [Mon, 26 Nov 2012 06:20:19 +0000 (03:20 -0300)]
[media] exynos-gsc: Rearrange error messages for valid prints
In case of clk_prepare failure, the function gsc_clk_get also prints
"failed to get clock" which is not correct. Hence move the error
messages to their respective blocks. While at it, also renamed the labels
meaningfully.
Sachin Kamat [Fri, 23 Nov 2012 11:04:42 +0000 (08:04 -0300)]
[media] exynos-gsc: Fix checkpatch warning in gsc-m2m.c
Fixes the following warning:
WARNING: space prohibited between function name and open parenthesis '('
FILE: media/platform/exynos-gsc/gsc-m2m.c:606:
ctx = kzalloc(sizeof (*ctx), GFP_KERNEL);
[media] exynos-gsc: Adding tiled multi-planar format to G-Scaler
Adding V4L2_PIX_FMT_NV12MT_16X16 to G-Scaler supported formats.
If the output or input format is V4L2_PIX_FMT_NV12MT_16X16, configure
G-Scaler to use GSC_IN_TILE_MODE.
[s.nawrocki: shortened the pixel format description]
drivers/media/usb/tm6000/tm6000-video.c: In function '__check_keep_urb':
drivers/media/usb/tm6000/tm6000-video.c:1926:1: warning: return from incompatible pointer type [enabled by default]
drivers/media/platform/sh_veu.c:269:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat]
drivers/media/platform/sh_veu.c:276:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat]
[media] MAINTAINERS: add entries for sh_veu and sh_vou V4L2 drivers
sh_vou might be better described by "Odd Fixes," but mark it "Maintained"
for now. sh_veu is a new driver and might see some development in the
future.
Explicit checks for the JPEG pixel format in soc_mbus_bytes_per_line() and
soc_mbus_image_size() are superfluous, because also without them these
functions will perform correctly. The former will return 0 based on
packing == SOC_MBUS_PACKING_VARIABLE and the latter will simply multiply
the user-provided line length by the image height to obtain a frame buffer
size estimate. The original version of the "media: soc_camera: don't clear
pix->sizeimage in JPEG mode" patch was correct and my amendment, adding
these two checks was superfluous.
[media] media: add a VEU MEM2MEM format conversion and scaling driver
Video Engine Unit (VEU) is an IP block, found in multiple SuperH and ARM-
based sh-mobile and r-mobile SoCs, capable of processing video data. It
can perform colour-space conversion, scaling and several filtering
transformations. This patch adds an initial implementation of a mem2mem
V4L2 driver for VEU. So far only conversion from NV12 to RGB565 is
supported. Further functionality shall be added in the future.
This driver is based on a VEU vidix driver by Magnus Damm.
Laurent Pinchart [Tue, 13 Nov 2012 13:35:38 +0000 (10:35 -0300)]
[media] omap_vout: Drop overlay format enumeration
Enumerating formats for output overlays doesn't make sense, as the pixel
format is defined by the display API, not the V4L2 API. Drop the
vidioc_enum_fmt_vid_overlay ioctl operation.
Manjunath Hadli [Thu, 18 Oct 2012 10:58:02 +0000 (07:58 -0300)]
[media] v4l2: add new pixel formats supported on dm365
add new macro V4L2_PIX_FMT_SGRBG10ALAW8 and associated formats
to represent Bayer format frames compressed by A-LAW algorithm,
add V4L2_PIX_FMT_UV8 to represent storage of CbCr data (UV interleaved)
only.
Manjunath Hadli [Thu, 18 Oct 2012 10:54:59 +0000 (07:54 -0300)]
[media] media: add new mediabus format enums for dm365
add new enum entries for supporting the media-bus formats on dm365.
These include some bayer and some non-bayer formats.
V4L2_MBUS_FMT_YDYUYDYV8_1X16 and V4L2_MBUS_FMT_UV8_1X8 are used
internal to the hardware by the resizer.
V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8 represents the bayer ALAW format
that is supported by dm365 hardware.
Michael Krufky [Tue, 4 Dec 2012 14:30:00 +0000 (11:30 -0300)]
[media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2
This patch removes the dependendency of VIDEO_AU0828 on VIDEO_V4L2 by
creating a new Kconfig option, VIDEO_AU0828_V4L2, which enables analog
video capture support and depends on VIDEO_V4L2 itself.
With VIDEO_AU0828_V4L2 disabled, the driver will only support digital
television and will not depend on the v4l2-core. With VIDEO_AU0828_V4L2
enabled, the driver will be built with the analog v4l2 support included.
By default, the VIDEO_AU0828_V4L2 option will be set to Y, so as to
preserve the original behavior.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>