aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19[media] SDI: add flag for SDI formats and SMPTE 125M definitionCharles-Antoine Couret1-4/+7
Adding others generic flags, which could be used by many components like GS1662. Signed-off-by: Charles-Antoine Couret <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] vivid: fix error return code in vivid_create_instance()Wei Yongjun1-1/+4
Fix to return error code -ENOMEM from the memory or workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] pxa_camera: remove duplicated include from pxa_camera.cWei Yongjun1-1/+0
Remove duplicated include. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] pxa_camera: fix error return code in pxa_camera_probe()Wei Yongjun1-2/+6
Fix to return error code -ENODEV from dma_request_slave_channel_compat() error handling case instead of 0, as done elsewhere in this function. Also fix to release resources in v4l2_clk_register() error handling. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] tw5864: constify struct video_device templateAndrey Utkin1-1/+1
tw5864_video_template is used for filling of actual video_device structures. It is copied by value, and is not used for anything else. Signed-off-by: Andrey Utkin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] tw5864: constify vb2_ops structureAndrey Utkin1-1/+1
Inspired by "[media] pci: constify vb2_ops structures" patch from Julia Lawall (dated 9 Sep 2016). Signed-off-by: Andrey Utkin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] pulse8-cec: avoid uninitialized data useArnd Bergmann1-1/+3
Building with -Wmaybe-uninitialized reveals the use on an uninitialized variable containing the physical address of the device whenever firmware before version 2 is used: drivers/staging/media/pulse8-cec/pulse8-cec.c: In function 'pulse8_connect': drivers/staging/media/pulse8-cec/pulse8-cec.c:447:2: error: 'pa' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the address to CEC_PHYS_ADDR_INVALID in this case, so we don't try to write back the uninitialized data to the device. Fixes: e28a6c8b3fcc ("[media] pulse8-cec: sync configuration with adapter") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] atmel-isc: set the format on the first openSongjun Wu1-12/+18
Set the current format on the first open. Signed-off-by: Songjun Wu <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] cec: fix Kconfig help textJean Delvare1-3/+0
MEDIA_CEC is no longer a tristate option, so the user can't actually choose M. Whether the code is built-in or built as a module is decided somewhere else. Fixes: 5bb2399a4fe4 ("[media] cec: fix Kconfig dependency problems") Signed-off-by: Jean Delvare <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] pulse8-cec: store logical address maskJohan Fjeldtvedt1-0/+34
In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] vcodec: mediatek: Add V4L2_CAP_TIMEPERFRAME capability settingTiffany Lin1-0/+3
This patch setting V4L2_CAP_TIMEPERFRAME capability in vidioc_venc_s/g_parm functions Signed-off-by: Tiffany Lin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] pxa_camera: fix spelling mistake: "dequeud" -> "dequeued"Colin Ian King1-1/+1
trivial fix to spelling mistake in pr_debug message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-19[media] add stih-cec driverBenjamin Gaignard5-0/+392
This patch implement CEC driver for stih4xx platform. Driver compliance has been test with cec-ctl and cec-compliance tools. Signed-off-by: Benjamin Gaignard <[email protected]> Acked-by: Peter Griffin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-12[media] pulse8-cec: fix compiler warningHans Verkuil1-1/+1
pulse8-cec.c: In function 'pulse8_connect': pulse8-cec.c:447:2: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized] cec_s_phys_addr(pulse8->adap, pa, false); ^ pulse8-cec.c:609:6: note: 'pa' was declared here u16 pa; ^ As far as I can tell, this can't actually happen. Still, it is better to just initialize it. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-12[media] pxa_camera: merge soc_mediabus.c into pxa_camera.cHans Verkuil2-25/+459
Linking soc_mediabus into this driver causes multiple definition linker warnings if soc_camera is also enabled: drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_image_size+0x0): multiple definition of `__ksymtab_soc_mbus_image_size' drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_image_size+0x0): first defined here >> drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): multiple definition of `__ksymtab_soc_mbus_samples_per_pixel' drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): first defined here drivers/media/platform/soc_camera/built-in.o: In function `soc_mbus_config_compatible': (.text+0x3840): multiple definition of `soc_mbus_config_compatible' drivers/media/platform/soc_camera/soc_mediabus.o:(.text+0x134): first defined here Since we really don't want to have to use any of the soc-camera code this patch copies the relevant code and data structures from soc_mediabus and renames it to pxa_mbus_*. The large table of formats has been culled a bit, removing formats that are not supported by this driver. Signed-off-by: Hans Verkuil <[email protected]> Cc: Robert Jarzmik <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: vsp1: Add R8A7792 VSP1V supportSergei Shtylyov2-0/+24
Add support for the R8A7792 VSP1V cores which are different from the other gen2 VSP1 cores. Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: vsp1: Fix tri-planar format support through DRM APILaurent Pinchart1-3/+3
The vsp1 driver supports tri-planar formats, but the DRM API only passes two memory addresses. Add a third one. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: vsp1: Report device model and rev through media device informationLaurent Pinchart2-6/+17
Instead of hardcoding the media device model and hardware revision to "VSP1" and 0 respectively, report the actual hardware device model and IP version number. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: rcar-fcp: Extend compatible list to support the FDPKieran Bingham1-0/+1
The FCP must be powered up for the FDP1 to function, even when the FDP1 does not make use of the FCNL features. Extend the compatible list to allow us to use the power domain and runtime-pm support. Signed-off-by: Kieran Bingham <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: rcar-fcp: Keep the coding style consistentLaurent Pinchart1-4/+4
The Renesas multimedia drivers use ret to store return values, fix the only exception in the rcar-fcp driver to keep the coding style consistent. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l: ioctl: Clear the v4l2_pix_format_mplane reserved fieldLaurent Pinchart1-4/+4
The S_FMT and TRY_FMT handlers in multiplane mode attempt at clearing the reserved fields of the v4l2_format structure after the pix_mp member. However, the reserved fields are inside pix_mp, not after it. Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Kieran Bingham <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] ad5820: Use bool for boolean valuesSakari Ailus1-9/+10
The driver used integers for what boolean would have been a better fit. Use boolean instead. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: Move media_device link_notify operation to an ops structureLaurent Pinchart4-8/+21
This will allow adding new operations without increasing the media_device structure size for drivers that don't implement any media device operation. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] smiapp: Add support for 14 and 16 bits per sample depthsSakari Ailus2-1/+9
SMIA++ supports 14 and 16 bits per pixel formats as well. Add support to these formats in the driver. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] pxa_camera: remove an unused structure pointerMauro Carvalho Chehab1-3/+0
As reported by smatch: drivers/media/platform/pxa_camera.c: In function 'pxa_dma_start_channels': drivers/media/platform/pxa_camera.c:457:21: warning: variable 'active' set but not used [-Wunused-but-set-variable] struct pxa_buffer *active; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] pxa_camera: make soc_mbus_xlate_by_fourcc() staticMauro Carvalho Chehab1-2/+3
As warned by smatch: drivers/media/platform/pxa_camera.c:283:39: warning: no previous prototype for 'soc_mbus_xlate_by_fourcc' [-Wmissing-prototypes] const struct soc_camera_format_xlate *soc_mbus_xlate_by_fourcc( ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] pxa_camera: allow building it if COMPILE_TEST is setHans Verkuil1-1/+2
Allow building this driver if COMPILE_TEST is set. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: fix styleRobert Jarzmik1-0/+2
This is a tiny fix for a switch case which quiets 2 checkpatch harmless warnings. The generated code is not affected. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: move pxa_camera out of soc_cameraRobert Jarzmik5-9/+9
As the conversion to a v4l2 standalone device is finished, move pxa_camera one directory up and finish severing any dependency to soc_camera. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: change stop_streaming semanticsRobert Jarzmik1-3/+12
Instead of the legacy behavior where it was required to wait for all video buffers to be finished by the hardware, use a cancel like strategy : as soon as the stop_streaming() call is done, abort all DMA transfers, report the already buffers as failed and return. This makes stop_streaming() more a "cancel capture" than a "wait for end of capture" semantic. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: add debug register accessRobert Jarzmik1-0/+32
Add pxa_camera registers access through advanced video debugging. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: make a standalone v4l2 deviceRobert Jarzmik2-239/+516
This patch removes the soc_camera API dependency from pxa_camera. In the current status : - all previously captures are working the same on pxa270 - the s_crop() call was removed, judged not working (see what happens soc_camera_s_crop() when get_crop() == NULL) - if the pixel clock is provided by then sensor, ie. not MCLK, the dual stage change is not handled yet. => there is no in-tree user of this, so I'll let it that way - the MCLK is not yet finished, it's as in the legacy way, ie. activated at video device opening and closed at video device closing. In a subsequence patch pxa_camera_mclk_ops should be used, and platform data MCLK ignored. It will be the sensor's duty to request the clock and enable it, which will end in pxa_camera_mclk_ops. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: remove set_selectionRobert Jarzmik1-83/+0
This is to be seen as a regression as the set_selection (former set_crop) function is removed. This is a temporary situation in the v4l2 porting, and will have to be added later. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: add buffer sequencingRobert Jarzmik1-0/+5
Add sequence numbers to completed buffers. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: make printk consistentRobert Jarzmik1-27/+43
Make all print consistent by always using : - dev_xxx(pcdev_to_dev(pcdev), ....) This prepares the soc_camera adherence removal by making these call rely on only pcdev, and not the soc_camera icd structure. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: introduce sensor_callRobert Jarzmik1-12/+15
Introduce sensor_call(), which will be used for all sensor invocations. This is a preparation move to v4l2 device conversion, ie. soc_camera adherence removal. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: trivial move of functionsRobert Jarzmik1-232/+241
Move the functions in the file to be regrouped into meaningful blocks : 1. pxa camera core handling functions, manipulating the herdware 2. videobuf2 functions, dealing with video buffers 3. video ioctl (vidioc) related functions 4. driver probing, removal, suspend and resume This patch doesn't modify a single line of code. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: platform: pxa_camera: convert to vb2Robert Jarzmik2-314/+269
Convert pxa_camera from videobuf to videobuf2. As the soc_camera was already compatible with videobuf2, the port is quite straightforward. The special case of this code in which the vb2 to prepare is "too big" in terms of size for the new capture format, the pxa_camera will fail. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: mt9m111: move mt9m111 out of soc_cameraRobert Jarzmik5-3/+13
As the mt9m111 is now working as a standalone v4l2 subdevice sensor, move it out of soc_camera directory and sever its dependency on soc_camera. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: mt9m111: use only the SRGB colorspaceRobert Jarzmik1-4/+4
mt9m111 being a camera sensor, its colorspace should always be SRGB, for both RGB based formats or YCbCr based ones. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] media: mt9m111: make a standalone v4l2 subdeviceRobert Jarzmik1-36/+15
Remove the soc_camera adherence. Mostly the change removes the power manipulation provided by soc_camera, and instead : - powers on the sensor when the s_power control is activated - powers on the sensor in initial probe - enables and disables the MCLK provided to it in power on/off This patch also drops support for inverters on synchronisation and clock lines. It is assumed, if any board ever needs such inverters, support for them can be added in the future Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] st-hva: add H.264 video encoding supportJean-Christophe Trotin4-7/+1189
This patch adds the H.264 video encoding capability in the V4L2 HVA video encoder driver for STMicroelectronics SoC (hva-h264.c). The main supported features are: - profile: baseline, main, high, stereo high - level: up to 4.2 - bitrate mode: CBR, VBR - entropy mode: CABAC, CAVLC - video aspect: 1x1 only Signed-off-by: Yannick Fertre <[email protected]> Signed-off-by: Jean-Christophe Trotin <[email protected]> Acked-by: Peter Griffin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] st-hva: multi-format video encoder V4L2 driverJean-Christophe Trotin9-0/+2289
This patch adds V4L2 HVA (Hardware Video Accelerator) video encoder driver for STMicroelectronics SoC. It uses the V4L2 mem2mem framework. This patch only contains the core parts of the driver: - the V4L2 interface with the userland (hva-v4l2.c) - the hardware services (hva-hw.c) - the memory management utilities (hva-mem.c) This patch doesn't include the support of specific codec (e.g. H.264) video encoding: this support is part of subsequent patches. Signed-off-by: Yannick Fertre <[email protected]> Signed-off-by: Jean-Christophe Trotin <[email protected]> Acked-by: Peter Griffin <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] videobuf2-v4l2.h: get kernel-doc tags from C fileMauro Carvalho Chehab1-142/+0
There are several functions documented at the C file. Move them to the header, as this is the one used to build the media books. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] videobuf2-core.h: move function descriptions from c fileMauro Carvalho Chehab1-254/+0
There are several functions that were documented at the .c file. As we only include the headers, we need to move them to there, in order to have documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] v4l2-mem2mem.h: move descriptions from .c fileMauro Carvalho Chehab1-127/+1
Several routines are somewhat documented at v4l2-mem2mem.c file. Move what's there to the header file. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] demux.h: fix a documentation warningMauro Carvalho Chehab1-3/+5
The kernel-doc parser didn't handle well the private: tag. Rewrite it. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] demux.h: Fix a few documentation issuesMauro Carvalho Chehab1-20/+16
demux.h was lacking documentation for the DMX_FE_ENTRY macro: ./drivers/media/dvb-core/demux.h:511: WARNING: c:func reference target not found: DMX_FE_ENTRY While here, get rid of unused parameters and fix a few minor issues at the header file. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] dvb_ringbuffer.h: document the define macrosMauro Carvalho Chehab1-8/+19
There are a few define macros not documented, because the ReST output was causing more warnings. Now that this got fixed, document them. While here, fix the remaining coding style issues. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-09-09[media] dtv-core.rst: move DTV ringbuffer notes to kAPI docMauro Carvalho Chehab1-28/+0
Instead of keeping those notes at the file on a non-structured way, move them to dtv-core.rst, using the proper ReST tags. Signed-off-by: Mauro Carvalho Chehab <[email protected]>