aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-17[media] Staging: media/lirc: don't call put_ir_rx on rx twiceColin Ian King1-1/+2
There is an exit path where rx is kfree'd on put_ir_rx and then a jump to label out_put_xx will again kfree it with another call to put_ir_rx. Fix this by adding a new label that avoids this 2nd call to put_ir_rx for this specific case. Detected with CoverityScan, CID#145119 ("Use after free") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-17[media] drivers/media: Convert remaining use of pr_warning to pr_warnJoe Perches1-2/+2
To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/media Prior to this patch, there was 1 use of pr_warning and 310 uses of pr_warn in drivers/media Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] vimc: Virtual Media Controller core, capture and sensorHelen Koike11-0/+1665
First version of the Virtual Media Controller. Add a simple version of the core of the driver, the capture and sensor nodes in the topology, generating a grey image in a hardcoded format. Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: fix small typo in Kconfig] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] media: i2c: Add support for OV5647 sensorRamiro Oliveira4-0/+653
The OV5647 sensor from Omnivision supports up to 2592x1944 @ 15 fps, RAW 8 and RAW 10 output formats, and MIPI CSI-2 interface. The driver adds support for 640x480 RAW 8. Signed-off-by: Ramiro Oliveira <[email protected]> Acked-by: Sakari Ailus <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] Documentation: DT: Add OV5647 bindingsRamiro Oliveira1-0/+35
Create device tree bindings documentation. Signed-off-by: Ramiro Oliveira <[email protected]> Acked-by: Rob Herring <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] media: Add a driver for the ov5645 camera sensorTodor Tomov3-0/+1358
The ov5645 sensor from Omnivision supports up to 2592x1944 and CSI2 interface. The driver adds support for the following modes: - 1280x960 - 1920x1080 - 2592x1944 Output format is packed 8bit UYVY. Signed-off-by: Todor Tomov <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] media: i2c/ov5645: add the device tree binding documentTodor Tomov1-0/+54
Add the document for ov5645 device tree binding. Signed-off-by: Todor Tomov <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] vsp1: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for histogram controlsHans Verkuil1-0/+2
The two histogram controls will modify the layout of the metadata, so this flag should be set. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] buffer.rst: clarify how V4L2_CTRL_FLAG_MODIFY_LAYOUT/GRABBER are usedHans Verkuil1-4/+13
Explain when the V4L2_CTRL_FLAG_MODIFY_LAYOUT and V4L2_CTRL_FLAG_MODIFY_GRABBER flags should be used. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l2-ctrls.c: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for ROTATEHans Verkuil1-0/+4
The rotate control will modify the layout by definition. Always set this flag. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] videodev.h: add V4L2_CTRL_FLAG_MODIFY_LAYOUTHans Verkuil1-0/+1
Add new flag to indicate that changing this control will change the buffer/mediabus layout as well. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] vidioc-queryctrl.rst: document V4L2_CTRL_FLAG_MODIFY_LAYOUTHans Verkuil2-0/+14
Document this new control flag. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: Add HGT supportNiklas Söderlund10-5/+343
The HGT is a Histogram Generator Two-Dimensions. It computes a weighted frequency histograms for hue and saturation areas over a configurable region of the image with optional subsampling. Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: Define a pixel format for the R-Car VSP1 2-D histogram engineNiklas Söderlund4-1/+124
The format is used on the R-Car VSP1 video queues that carry 2-D histogram statistics data. Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: Add HGO supportLaurent Pinchart10-13/+367
The HGO is a Histogram Generator One-Dimension. It computes per-channel histograms over a configurable region of the image with optional subsampling. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engineLaurent Pinchart5-0/+188
The format is used on the R-Car VSP1 video queues that carry 1-D histogram statistics data. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: Fix HGO and HGT routing register addressesLaurent Pinchart1-2/+2
The addresses are incorrect, fix them. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: Support histogram generators in pipeline configurationLaurent Pinchart6-28/+134
Histogram generators are single-pad entities that branch as leaf nodes at any point in the pipeline. Make sure that pipeline traversal and routing configuration support them correctly. Support for the actual HGO and HGT operation will come later. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: Add histogram supportLaurent Pinchart4-0/+732
The histogram common code will be used to implement support for both the HGO and HGT histogram computation engines. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: Add metadata buffer type and formatLaurent Pinchart12-6/+164
The metadata buffer type is used to transfer metadata between userspace and kernelspace through a V4L2 buffers queue. It comes with a new metadata capture capability and format description. Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Guennadi Liakhovetski <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> [[email protected]: removed left-over 'experimental' note] [[email protected]: add newline after _v4l2-meta-format label] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: vsp1: wpf: Implement rotation supportLaurent Pinchart5-54/+177
Some WPF instances, on Gen3 devices, can perform 90° rotation when writing frames to memory. Implement support for this using the V4L2_CID_ROTATE control. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] v4l: Clearly document interactions between formats, controls and buffersLaurent Pinchart1-0/+110
V4L2 exposes parameters that influence buffers sizes through the format ioctls (VIDIOC_G_FMT, VIDIOC_TRY_FMT, VIDIOC_S_FMT, and possibly VIDIOC_G_SELECTION and VIDIOC_S_SELECTION). Other parameters not part of the format structure may also influence buffer sizes or buffer layout in general. One existing such parameter is rotation, which is implemented by the V4L2_CID_ROTATE control and thus exposed through the V4L2 control ioctls. The interaction between those parameters and buffers is currently only partially specified by the V4L2 API. In particular interactions between controls and buffers isn't specified at all. The behaviour of the VIDIOC_S_FMT and VIDIOC_S_SELECTION ioctls when buffers are allocated is also not fully specified. This patch clearly defines and documents the interactions between formats, selections, controls and buffers. The preparatory discussions for the documentation change considered completely disallowing controls that change the buffer size or layout, in favour of extending the format API with a new ioctl that would bundle those controls with format information. The idea has been rejected, as this would essentially be a restricted version of the upcoming request API that wouldn't bring any additional value. Another option we have considered was to mandate the use of the request API to modify controls that influence buffer size or layout. This has also been rejected on the grounds that requiring the request API to change rotation even when streaming is stopped would significantly complicate implementation of drivers and usage of the V4L2 API for applications. Applications will however be required to use the upcoming request API to change at runtime formats or controls that influence the buffer size or layout, because of the need to synchronize buffers with the formats and controls. Otherwise there would be no way to interpret the content of a buffer correctly. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] ov2640: avoid calling ov2640_select_win() twiceHans Verkuil1-11/+7
Simplify ov2640_set_params and ov2640_set_fmt. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] ov9740: avoid calling ov9740_res_roundup() twiceHans Verkuil1-17/+1
Simplify ov9740_s_fmt. Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] ov9640: avoid calling ov9640_res_roundup() twiceHans Verkuil1-21/+3
Simplify ov9640_s_fmt and ov9640_set_fmt Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] ov772x: avoid calling ov772x_select_params() twiceHans Verkuil1-28/+13
Merge ov772x_s_fmt into ov772x_set_fmt. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] ov5642: avoid calling ov5642_find_datafmt() twiceHans Verkuil1-1/+1
Simplify ov5642_set_fmt(). Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] mt9v022: avoid calling mt9v022_find_datafmt() twiceHans Verkuil1-4/+4
Simplify mt9v022_s_fmt and mt9v022_set_fmt. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] mt9m001: avoid calling mt9m001_find_datafmt() twiceHans Verkuil1-4/+4
Simplify mt9m001_s_fmt and mt9m001_set_fmt. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] imx074: avoid calling imx074_find_datafmt() twiceHans Verkuil1-1/+1
Simplify imx074_set_fmt(). Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] si2157: Add support for Si2141-A10Stefan Brüns2-2/+23
The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Cc: Evgeny Plehov <[email protected]> Signed-off-by: Stefan Brüns <[email protected]> Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-14[media] si2157: revert si2157: Si2141/2151 tuner supportAntti Palosaari2-66/+6
'Reset' loop does not look correct. I tested it very many times and it never repeated those commands. If problem, it tries to solve, really occurs on some situations better solution should be find out. There is another patch which does not have such hackish looking loop. Lets change to it. Cc: Evgeny Plehov <[email protected]> Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] v4l2-tpg: don't clamp XV601/709 to lim rangeHans Verkuil1-1/+8
The XV601/709 encodings are special: they signal limited range, but use the full range to encode a larger gamut with R', G' and B' values outside the [0-1] range. So don't clamp to limited range for these two encodings. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] videodev2.h: fix outdated commentHans Verkuil1-2/+1
The XV601/709 Y'CbCr encoding was changed to limited range, but the comment still indicates full range. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] imon: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] wl128x: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] c8sectpfe: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] fsl-viu: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] av7110: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] netup_unidvb: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] ivtv: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] cx18: use setup_timerGeliang Tang1-3/+1
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] bt8xx: use setup_timerGeliang Tang1-3/+1
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] saa7146: use setup_timerGeliang Tang2-6/+4
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] saa7134: use setup_timerGeliang Tang3-9/+6
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] media: bcm2048: fix several macrosNikola Jelic1-6/+6
Some of the macros didn't use the parenthesis around the parameters when used in the body of the macro. Signed-off-by: Nikola Jelic <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] m2m-deinterlace: don't return zero on failure paths in ↵Alexey Khoroshilov1-0/+1
deinterlace_probe() If DMA does not support INTERLEAVE, deinterlace_probe() breaks off initialization, releases dma channel, but returns zero. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] coda: do not enumerate YUYV if VDOA is not availablePhilipp Zabel1-0/+6
TRY_FMT already disables the YUYV format if the VDOA is not available. ENUM_FMT must do the same. Fixes: d40e98c13b3e ("[media] coda: support YUYV output if VDOA is used") Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] tvp5150: fix pad format frame heightPhilipp Zabel1-1/+1
Even if field order is set to V4L2_FIELD_ALTERNATE, the width and height values in struct v4l2_mbus_framefmt still refer to frame size, not field size. Fixes: 4f57d27be2a5 ("[media] tvp5150: fix tvp5150_fill_fmt()") Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] tvp5150: allow get/set_fmt on the video source padPhilipp Zabel1-1/+1
To let userspace propagate formats downstream in a media controller scenario, the video source pad (now pad 1, DEMOD_PAD_VID_OUT) must allow setting and getting the format. Incidentally, tvp5150_fill_fmt was implemented for this pad, not for the new analog input pad (now pad 0, DEMOD_PAD_IF_INPUT). Fixes: 55606310e77f ("[media] tvp5150: create the expected number of pads") Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>