summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/Makefile
AgeCommit message (Collapse)Author
2017-12-28media: move dvb kAPI headers to include/mediaMauro Carvalho Chehab
Except for DVB, all media kAPI headers are at include/media. Move the headers to it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-28media: move videobuf2 to drivers/media/commonMauro Carvalho Chehab
Now that VB2 is used by both V4L2 and DVB core, move it to the common part of the subsystem. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06[media] v4l: Remove V4L2 OF framework in favour of V4L2 fwnode frameworkSakari Ailus
All drivers have been converted from V4L2 OF to V4L2 fwnode. The V4L2 OF framework is now unused. Remove it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06[media] v4l: fwnode: Support generic fwnode for parsing standardised propertiesSakari Ailus
The fwnode_handle is a more generic way than OF device_node to describe firmware nodes. Instead of the OF API, use more generic fwnode API to obtain the same information. As the V4L2 fwnode support will be required by a small minority of e.g. ACPI based systems (the same might actually go for OF), make this a module instead of embedding it in the videodev module. The origins of the V4L2 fwnode framework is in the V4L2 OF framework. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-02-10[media] v4l2-mc: add a generic function to create the media graphMauro Carvalho Chehab
The em28xx_v4l2_create_media_graph() is almost generic enough to be at the core, as an ancillary function. Make it even more generic, by getting rid of em28xx-specific code, relying only at the media_device, in order to discover all entities found on PC-customer's hardware and add it at the V4L2 core. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Prepare to divide videobuf2Junghak Sung
Prepare to divide videobuf2 - Separate vb2 trace events from v4l2 trace event. - Make wrapper functions that will move to v4l2-side. - Make vb2_core_* functions that will remain in core-side. - Add a callback function table for buffer operation which makes vb2-core to be able to invoke a v4l2-side functions. - Rename internal functions as vb2_*. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2Junghak Sung
Make videobuf2-v4l2 as a wrapper of videobuf2-core for v4l2-use. And replace videobuf2-core.h with videobuf2-v4l2.h. This renaming change should be accompanied by the modifications of all device drivers that include videobuf2-core.h. It can be done with just running this shell script. replace() { str1=$1 str2=$2 dir=$3 for file in $(find $dir -name *.h -o -name *.c -o -name Makefile) do echo $file sed "s/$str1/$str2/g" $file > $file.out mv $file.out $file done } replace "videobuf2-core" "videobuf2-v4l2" "include/media/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/media/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/usb/gadget/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/staging/media/" Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11[media] v4l2: move tracepoint generation into separate filePhilipp Zabel
To compile videobuf2-core as a module, the vb2_* tracepoints must be exported from the videodev module. Instead of exporting vb2 tracepoint symbols from v4l2-ioctl.c, move the tracepoint generation into a separate file. This patch fixes the following build error in the modpost stage, introduced by 2091f5181c66 ("[media] videobuf2: add trace events"): ERROR: "__tracepoint_vb2_buf_done" undefined! ERROR: "__tracepoint_vb2_dqbuf" undefined! ERROR: "__tracepoint_vb2_qbuf" undefined! ERROR: "__tracepoint_vb2_buf_queue" undefined! Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-22media: Add registration helpers for V4L2 flash sub-devicesJacek Anaszewski
This patch adds helper functions for registering/unregistering LED Flash class devices as V4L2 sub-devices. The functions should be called from the LED subsystem device driver. In case the support for V4L2 Flash sub-devices is disabled in the kernel config the functions' empty versions will be used. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-04-16[media] vb2: Add videobuf2-dvb supportHans Verkuil
With the new vb2_thread_start/stop core code it is very easy to implement videobuf2-dvb. This should simplify converting existing videobuf drivers to vb2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-20[media] omap24xx/tcm825x: move to staging for future removalHans Verkuil
The omap24xx driver and the tcm825x sensor driver are the only two remaining drivers to still use the old deprecated v4l2-int-device API. Nobody maintains these drivers anymore. But unfortunately the v4l2-int-device API is used by out-of-tree drivers (MXC platform). This is a very bad situation since as long as this deprecated API stays in the kernel there is no reason for those out-of-tree drivers to convert. This patch moves v4l2-int-device and the two drivers that depend on it to staging in preparation for their removal. If someone would be interested in getting these drivers to work, then start with this since it's not very far from the state where they used to work: <URL:http://vihersipuli.retiisi.org.uk/cgi-bin/gitweb.cgi?p=~sailus/linux-omap/.git;a=summary> The branch is n800-cam. Porting to up-to-date APIs can then be done. David might have done some work in that area, so check with him first. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Cc: David Cohen <dacohen@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-18[media] v4l2-dv-timings: add new helper moduleHans Verkuil
This module makes it easy to filter valid timings from the full list of CEA and DMT timings based on the timings capabilities. Signed-off-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>
2013-06-21[media] V4L2: support asynchronous subdevice registrationGuennadi Liakhovetski
Currently bridge device drivers register devices for all subdevices synchronously, typically, during their probing. E.g. if an I2C CMOS sensor is attached to a video bridge device, the bridge driver will create an I2C device and wait for the respective I2C driver to probe. This makes linking of devices straight forward, but this approach cannot be used with intrinsically asynchronous and unordered device registration systems like the Flattened Device Tree. To support such systems this patch adds an asynchronous subdevice registration framework to V4L2. To use it respective (e.g. I2C) subdevice drivers must register themselves with the framework. A bridge driver on the other hand must register notification callbacks, that will be called upon various related events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21[media] V4L2: add temporary clock helpersGuennadi Liakhovetski
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-01Merge tag 'v3.9-rc5' into patchworkMauro Carvalho Chehab
Linux 3.9-rc5 * tag 'v3.9-rc5': (1080 commits) Linux 3.9-rc5 Revert "lockdep: check that no locks held at freeze time" dw_dmac: adjust slave_id accordingly to request line base dmaengine: dw_dma: fix endianess for DT xlate function PNP: List Rafael Wysocki as a maintainer rbd: don't zero-fill non-image object requests ia64 idle: delete stale (*idle)() function pointer Btrfs: don't drop path when printing out tree errors in scrub target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit Revert "mm: introduce VM_POPULATE flag to better deal with racy userspace programs" usb: ftdi_sio: Add support for Mitsubishi FX-USB-AW/-BD mg_disk: fix error return code in mg_probe() Btrfs: fix wrong return value of btrfs_lookup_csum() Btrfs: fix wrong reservation of csums Btrfs: fix double free in the btrfs_qgroup_account_ref() Btrfs: limit the global reserve to 512mb Btrfs: hold the ordered operations mutex when waiting on ordered extents Btrfs: fix space accounting for unlink and rename Btrfs: fix space leak when we fail to reserve metadata space ...
2013-03-31[media] Add a V4L2 OF parserGuennadi Liakhovetski
Add a V4L2 OF parser, implementing bindings documented in Documentation/devicetree/bindings/media/video-interfaces.txt. [s.nawrocki@samsung.com: various corrections and improvements since the initial version] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> 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>
2013-03-25[media] fix compilation with both V4L2 and I2C as 'm'Mauro Carvalho Chehab
When config options are: CONFIG_VIDEO_DEV=y CONFIG_VIDEO_V4L2=m CONFIG_I2C=m Compilation breaks, as reported by: https://bugzilla.kernel.org/show_bug.cgi?id=55681 Before changeset 7b34be71db533f3e0cf93d53cf62d036cdb5418a, no compilation errors occurred. However, the I2C code there at v4l2-device was incorrectly disabled. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] v4l: Don't compile v4l2-int-device unless really neededSakari Ailus
Add a configuration option for v4l2-int-device so it is only compiled when necessary, which is only by omap24xxcam and tcm825x drivers. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Cleanup media Kconfig filesMauro Carvalho Chehab
- get rid of ridden V4L2_COMMON symbol This symbol is not needed anymore; it can be folded with V4L2 one, simplifying the Kconfig a little bit; - Comment why some Kconfig items are needed; - Remove if test for MEDIA_CAMERA_SUPPORT, replacing it by depends on. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb: move the dvb core one level upMauro Carvalho Chehab
just like the V4L2 core, move the DVB core to drivers/media, as the intention is to get rid of both "video" and "dvb" directories. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] v4l: move v4l2 core into a separate directoryMauro Carvalho Chehab
Currently, the v4l2 core is mixed together with other non-core drivers. Move them into a separate directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>