summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/blackfin
Commit message (Collapse)AuthorAgeFilesLines
* media: drivers: delete error messages for failed memory allocationMarkus Elfring2017-09-231-1/+0Star
| | | | | | | | | | | | Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: fold several similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: blackfin: bfin_capture: constify vb2_ops structuresJulia Lawall2017-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These vb2_ops structures are only stored in the ops field of a vb2_queue structure, which is declared as const. Thus the vb2_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: media/platform: add const to v4l2_file_operations structuresBhumika Goyal2017-07-191-1/+1
| | | | | | | | | | | | | | | | Declare v4l2_file_operations structures as const as they are only stored in the fops field of video_device structures. This field is of type const, so declare v4l2_file_operations structures with similar properties as const. Cross compiled bfin_capture.o for blackfin arch. vpbe_display.o file did not cross compile for arm. Could not find any architecture matching the configuraion symbol for fsl-viu.c file. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: Drop FSF's postal address from the source code filesSakari Ailus2017-01-272-8/+0Star
| | | | | | | | | | | | | | | | | | | | | Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
* [media] blackfin: check devm_pinctrl_get() for errorsDan Carpenter2016-11-181-0/+2
| | | | | | | | | devm_pinctrl_get() can fail so we should check for that. Fixes: 0a6824bc10de ('[media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if CONFIG_PINCTRL is enabled') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] blackfin-capture: Delete an error message for a failed memory allocationMarkus Elfring2016-11-161-3/+1Star
| | | | | | | | | | | | | | The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] blackfin-capture: Use kcalloc() in bcap_init_sensor_formats()Markus Elfring2016-11-161-1/+1
| | | | | | | | | | | | A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil2016-07-081-1/+1
| | | | | | | | | | | | | | | | Make this a proper typed array. Drop the old allocate context code since that is no longer used. Note that the memops functions now get a struct device pointer instead of the struct device ** that was there initially (actually a void pointer to a struct containing only a struct device pointer). This code is now a lot cleaner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil2016-07-081-13/+2Star
| | | | | | | | | | Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung2015-12-181-1/+1
| | | | | | | | | | | | | | Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. 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 <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vb2: drop v4l2_format argument from queue_setupHans Verkuil2015-12-181-7/+5Star
| | | | | | | | | | | | | | | | | | | | | The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: videobuf2: Change queue_setup argumentJunghak Sung2015-10-201-1/+2
| | | | | | | | | | | | | | | Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. 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> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: videobuf2: Restructure vb2_bufferJunghak Sung2015-10-011-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer. Add new member variables - bytesused, length, offset, userptr, fd, data_offset - to struct vb2_plane in order to cover all information of v4l2_plane. struct vb2_plane { <snip> unsigned int bytesused; unsigned int length; union { unsigned int offset; unsigned long userptr; int fd; } m; unsigned int data_offset; } Replace v4l2_buf with new member variables - index, type, memory - which are common fields for buffer management. struct vb2_buffer { <snip> unsigned int index; unsigned int type; unsigned int memory; unsigned int num_planes; struct vb2_plane planes[VIDEO_MAX_PLANES]; <snip> }; v4l2 specific fields - flags, field, timestamp, timecode, sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c struct vb2_v4l2_buffer { struct vb2_buffer vb2_buf; __u32 flags; __u32 field; struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; }; 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>
* [media] v4l2: replace s_mbus_fmt by set_fmt in bridge driversHans Verkuil2015-05-011-3/+5
| | | | | | | | | | | | | | Replace all calls to s_mbus_fmt in bridge drivers by calls to the set_fmt pad op. Remove the old try/s_mbus_fmt video ops since they are now no longer used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2: replace try_mbus_fmt by set_fmt in bridge driversHans Verkuil2015-05-011-6/+9
| | | | | | | | | | | | | Replace all calls to try_mbus_fmt in bridge drivers by calls to the set_fmt pad op. [mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2: replace enum_mbus_fmt by enum_mbus_codeHans Verkuil2015-05-011-6/+11
| | | | | | | | | | | | | Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Kamil Debski <k.debski@samsung.com> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: embed video_device struct in bcap_deviceLad, Prabhakar2015-04-021-19/+8Star
| | | | | | | | | | | Embed video_device struct (video_dev) in bcap_device and Unregister path doesn't need to free the video_device structure, hence, change the video_device.release callback point to video_device_release_empty. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: drop bcap_get_unmapped_area()Lad, Prabhakar2015-04-021-18/+1Star
| | | | | | | | | this patch drops bcap_get_unmapped_area() and uses vb2_fop_get_unmapped_area() helper provided by the vb2 core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: set v4l2 buffer sequenceLad, Prabhakar2015-04-021-0/+5
| | | | | | | | | this patch adds support to set the v4l2 buffer sequence. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: add support for VIDIOC_EXPBUFLad, Prabhakar2015-04-021-0/+1
| | | | | | | | | this patch adds support for VIDIOC_EXPBUF. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: add support for VB2_DMABUFLad, Prabhakar2015-04-021-1/+1
| | | | | | | | | this patch adds support for VB2_DMABUF. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: add support for vidioc_create_bufsLad, Prabhakar2015-04-021-0/+1
| | | | | | | | | this patch adds support for vidioc_create_bufs. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: return -ENODATA for *dv_timings callsLad, Prabhakar2015-04-021-0/+21
| | | | | | | | | | this patch adds support to return -ENODATA for *dv_timings calls if the current output does not support it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: return -ENODATA for *std callsLad, Prabhakar2015-04-021-0/+15
| | | | | | | | | | this patch adds supports to return -ENODATA to *_std calls if the selected output does not support it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: make sure all buffers are returned on ↵Lad, Prabhakar2015-04-021-0/+3
| | | | | | | | | | | | | stop_streaming() callback In start_streaming() callback the buffer is removed from the dma_queue list and assigned to cur_frm, this patch makes sure that is returned to vb2 core with VB2_BUF_STATE_ERROR flag. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: use vb2_ioctl_* helpersLad, Prabhakar2015-04-021-85/+18Star
| | | | | | | | | this patch adds support to vb2_ioctl_* helpers. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: use v4l2_fh_open and vb2_fop_releaseLad, Prabhakar2015-04-021-77/+2Star
| | | | | | | | | | | this patch adds support to use v4l2_fh_open() and vb2_fop_release, which allows to drop driver specific struct bcap_fh, as this is handled by core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: use vb2_fop_mmap/pollLad, Prabhakar2015-04-021-25/+3Star
| | | | | | | | | | No need to reinvent the wheel. Just use the already existing functions provided by vb2. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: improve queue_setup() callbackLad, Prabhakar2015-04-021-4/+6
| | | | | | | | | | | | | | | This patch does the following: a: returns -EINVAL in case format image size is less then current image size. b: assigns nbuffers to two in case the total of vq->num_buffers and nbuffers is less then the number of buffers required by driver. c: sets the sizes[0] of plane according to the fmt passed or which is being set in the device. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: set vb2 buffer fieldLad, Prabhakar2015-04-021-4/+4
| | | | | | | | | | | set the vb2 buffer field in buf_prepare() callback, alongside drop local variable buf as we already have a pointer to vb2 buffer. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: set min_buffers_neededLad, Prabhakar2015-04-021-0/+1
| | | | | | | | | | | this patch sets the min_buffers_needed field of the vb2 queue so that the vb2 core will make sure start_streaming() callback is called only when we have minimum buffers queued. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: release buffers in case ↵Lad, Prabhakar2015-04-021-3/+13
| | | | | | | | | | | | | start_streaming() call back fails this patch adds support to release the buffer by calling vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED if start_streaming() call back fails. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: blackfin: bfin_capture: drop buf_init() callbackLad, Prabhakar2015-04-021-9/+0Star
| | | | | | | | | | this patch drops the buf_init() callback as init of buf list is not required. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Tested-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-151-1/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * media: platform: blackfin: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | [media] media: blackfin: use vb2_ops_wait_prepare/finish helperPrabhakar Lad2014-12-021-14/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch drops driver specific wait_prepare() and wait_finish() callbacks from vb2_ops and instead uses the the helpers vb2_ops_wait_prepare/finish() provided by the vb2 core, the lock member of the queue needs to be initalized to a mutex so that vb2 helpers vb2_ops_wait_prepare/finish() can make use of it. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] media/platform: fix querycapHans Verkuil2014-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Gerhard Sittig <gsi@denx.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] platform: Make use of media_bus_format enumBoris BREZILLON2014-11-141-7/+7
|/ | | | | | | | | | | | | | | | In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] be sure that HAS_DMA is enabled for vb2-dma-contigMauro Carvalho Chehab2014-08-261-0/+1
| | | | | | | vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take it into account at select. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if ↵Sonic Zhang2014-07-261-0/+17
| | | | | | | | | | | CONFIG_PINCTRL is enabled Multiple pinctrl states are defined for 8, 16 and 24 data pin groups in PPI peripheral. The driver should select correct group before set up further PPI parameters. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l2: bfin: Ensure delete and reinit list entry on NOMMU architectureSonic Zhang2014-07-261-3/+3
| | | | | | | | | On NOMMU architecture page fault is not triggered if a deleted list entry is accessed without reinit. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: blackfin: ppi: Pass device pointer to request peripheral pinsSonic Zhang2014-07-262-4/+6
| | | | | | | | if the pinctrl driver is enabled. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan2014-07-041-1/+0Star
| | | | | | | | | | | Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] media: bfin_capture: Switch to pad-level DV operationsLaurent Pinchart2014-05-251-1/+3
| | | | | | | | | | | The video-level enum_dv_timings and dv_timings_cap operations are deprecated in favor of the pad-level versions. All subdev drivers implement the pad-level versions, switch to them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart2014-05-241-2/+2
| | | | | | | | | | | | The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] bfin_capture: drop unnecessary vb2_is_streaming checkHans Verkuil2014-04-231-3/+0Star
| | | | | | | | | | The stop_streaming op is only called if streaming is in progress, so drop the unnecessary 'if (!vb2_is_streaming(vq))' check. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] vb2: stop_streaming should return voidHans Verkuil2014-04-231-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could actually fail, but that's really not the case. The pwc amd sdr-msi3101 drivers both had this construction: if (mutex_lock_interruptible(&s->v4l2_lock)) return -ERESTARTSYS; This has been updated to just call mutex_lock(). The stop_streaming op expects this to really stop streaming and I very much doubt this will work reliably if stop_streaming just returns without really stopping the DMA. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flagsSakari Ailus2014-03-051-1/+1
| | | | | | | | | | | The timestamp_type field used to contain only the timestamp type. Soon it will be used for timestamp source flags as well. Rename the field accordingly. [m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255] Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2013-11-151-1/+1
| | | | | | | | | | | | Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [media] v4l2: use new V4L2_DV_BT_BLANKING/FRAME definesHans Verkuil2013-08-181-7/+2Star
| | | | | | | | | Use the new defines to calculate the full blanking and frame sizes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>