aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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]>
2017-04-10[media] coda: remove redundant call to v4l2_m2m_get_vqColin Ian King1-2/+0
The call to v4ls_m2m_get_vq is only used to get the return value which is not being used, so it appears to be redundant and can be removed. Detected with CoverityScan, CID#1420674 ("Useless call") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Philipp Zabel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] em28xx: drop last soc_camera linkHans Verkuil1-9/+0
The em28xx driver still used the soc_camera.h header for the ov2640 driver. Since this driver no longer uses soc_camera, that include can be removed. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] ov2640: add MC supportHans Verkuil1-2/+20
The MC support is needed by the em28xx driver. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] ov2640: use standard clk and enable itHans Verkuil1-17/+14
Convert v4l2_clk to normal clk and enable the clock. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Hugues Fruchet <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] ov2640: convert from soc-camera to a standard subdev sensor driverHans Verkuil5-81/+27
Convert ov2640 to a standard subdev driver. The soc-camera driver no longer uses this driver, so it can safely be converted. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Hugues Fruchet <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] cec: fix confusing CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) codeHans Verkuil1-3/+5
It is a bit confusing how CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) interact. By stripping CEC_CAP_RC at the beginning rather than after #else it should be a bit clearer what is going on. Signed-off-by: Hans Verkuil <[email protected]> Reported-by: Lee Jones <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)Lee Jones1-1/+1
Currently when the RC Core is enabled (reachable) core code located in cec_register_adapter() attempts to populate the RC structure with a pointer to the 'parent' passed in by the caller. Unfortunately if the caller did not specify RC capability when calling cec_allocate_adapter(), then there will be no RC structure to populate. This causes a "NULL pointer dereference" error. Fixes: f51e80804f0 ("[media] cec: pass parent device in register(), not allocate()") Signed-off-by: Lee Jones <[email protected]> Cc: <[email protected]> # for v4.10 and up Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] s5p-cec: add cec-notifier support, move out of stagingHans Verkuil12-24/+44
By using the CEC notifier framework there is no longer any reason to manually set the physical address. This was the one blocking issue that prevented this driver from going out of staging, so do this move as well. Update the bindings documenting the new hdmi phandle and update exynos4.dtsi accordingly. Tested with my Odroid U3. Signed-off-by: Hans Verkuil <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> CC: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-04-10[media] s5p-cec.txt: document the HDMI controller phandleHans Verkuil1-0/+2
Update the bindings documenting the new hdmi phandle. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Acked-by: Rob Herring <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>