aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core
AgeCommit message (Collapse)AuthorFilesLines
2012-10-09mm: kill vma flag VM_RESERVED and mm->reserved_vm counterKonstantin Khlebnikov3-3/+3
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA, currently it lost original meaning but still has some effects: | effect | alternative flags -+------------------------+--------------------------------------------- 1| account as reserved_vm | VM_IO 2| skip in core dump | VM_IO, VM_DONTDUMP 3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP 4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP This patch removes reserved_vm counter from mm_struct. Seems like nobody cares about it, it does not exported into userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. [[email protected]: drivers/vfio/pci/vfio_pci.c fixup] Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Carsten Otte <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Eric Paris <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Morris <[email protected]> Cc: Jason Baron <[email protected]> Cc: Kentaro Takeda <[email protected]> Cc: Matt Helsley <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Richter <[email protected]> Cc: Suresh Siddha <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Venkatesh Pallipadi <[email protected]> Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-01[media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handlerHans Verkuil2-2/+25
With a filter function you can control more precisely which controls are added. This is useful in particular for radio device nodes for combined TV/Radio cards where you want to show just the radio-specific controls and not controls like brightness. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-10-01[media] v4l2-ioctl.c: fix overlay supportHans Verkuil1-1/+7
The vidioc_overlay op needs an unsigned int, not an unsigned int pointer. So we need a small function that dereferences the unsigned int pointer. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-27[media] videobuf2-core: Replace BUG_ON and return an error at vb2_queue_init()Ezequiel Garcia1-8/+11
This replaces BUG_ON() calls with WARN_ON(), and returns EINVAL if some parameter is NULL, as suggested by Jonathan and Mauro. The BUG_ON() call is too drastic to be used in this case. See the full discussion here: http://www.spinics.net/lists/linux-media/msg52462.html Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-27[media] v4l2: spi modalias is an arrayAlan Cox1-1/+1
We want to check the contents not the array itself versus NULL Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] vb2: fix wrong owner checkHans Verkuil1-2/+2
Check against q->fileio to see if the queue owner should be set or not. The former check against the return value of read or write is wrong, since read/write can return an error, even if the queue is in streaming mode. For example, EAGAIN when in non-blocking mode. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] v4l2-dev: reorder checks into blocks of ioctls with similar propertiesHans Verkuil1-82/+74
This makes it easier to read and also ties in more closely with the profile concept. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] v4l2-dev: improve ioctl validity checksHans Verkuil2-173/+237
The ioctl validity checks have been improved and now take vfl_type and vfl_dir into account. During the 2012 Media Workshop it was decided that these improved v4l2 core checks should be added as they simplified drivers and made drivers behave consistently. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] v4l2: make vidioc_(un)subscribe_event constHans Verkuil2-3/+3
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_(un)subscribe_event. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] Rename V4L2_(IN|OUT)_CAP_CUSTOM_TIMINGSHans Verkuil1-4/+4
The 'custom' timings are no longer just for custom timings, but also for standard CEA/VESA timings. So rename to V4L2_IN/OUT_CAP_DV_TIMINGS. The old define is still kept for backwards compatibility. This decision was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] v4l2-core: tvnorms may be 0 for a given input, handle that caseHans Verkuil2-2/+7
Currently the core code looks at tvnorms to see whether ENUMSTD or G_PARM should be enabled. This is not a good check for drivers that support the STD API on one input and the DV Timings API on another. In that case tvnorms may be 0. Instead check whether s_std is present (for ENUMSTD) or whether g_std or current_norm is present for g_parm. Also, in the enumstd core function return ENODATA if tvnorms is 0, because in that case the current input does not support the STD API and ENUMSTD should return ENODATA for that. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-26[media] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATEHans Verkuil3-40/+6
This buffer type isn't used at all, and since it is effectively undefined what it should do it is deprecated. The define still exists, but any internal support for such buffers is removed. The decisions to deprecate this was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-18[media] media v4l2-mem2mem: Use list_first_entrySascha Hauer1-3/+3
Use list_first_entry instead of list_entry which makes the intention of the code more clear. Signed-off-by: Sascha Hauer <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Acked-by: Pawel Osciak <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-13[media] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64()Laurent Pinchart1-53/+82
These helper functions get and set a 64-bit control's value from within a driver. They are similar to v4l2_ctrl_[gs]_ctrl() but operate on 64-bit integer controls instead of 32-bit controls. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-13[media] v4l2-common: add CVT and GTF detection functionsHans Verkuil1-0/+325
These two helper functions detect whether the analog video timings detected by the video receiver match the VESA CVT or GTF standards. They basically do the inverse of the CVT and GTF modeline calculations. This patch also adds a helper function that will determine the aspect ratio based on the provided EDID values. This aspect ratio can be given to the GTF helper function. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-13[media] v4l2-common: add v4l_match_dv_timingsHans Verkuil1-0/+33
Add the v4l_match_dv_timings function that can be used to compare two v4l2_dv_timings structs. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-13[media] v4l2-ctrls.c: add support for the new DV controlsHans Verkuil1-0/+39
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-09-13[media] v4l2-subdev: add support for the new edid ioctlsHans Verkuil3-0/+76
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-08-24Merge tag 'v3.6-rc3' into staging/for_v3.7Mauro Carvalho Chehab1-2/+8
Linux 3.6-rc3 * tag 'v3.6-rc3': (764 commits) Linux 3.6-rc3 task_work: add a scheduling point in task_work_run() fs: fix fs/namei.c kernel-doc warnings eventpoll: use-after-possible-free in epoll_create1() vfio: grab vfio_device reference *before* exposing the sucker via fd_install() vfio: get rid of vfio_device_put()/vfio_group_get_device* races vfio: get rid of open-coding kref_put_mutex introduce kref_put_mutex() vfio: don't dereference after kfree... fbcon: fix race condition between console lock and cursor timer (v1.1) mm: compaction: Abort async compaction if locks are contended or taking too long mm: have order > 0 compaction start near a pageblock with free pages rapidio/tsi721: fix unused variable compiler warning rapidio/tsi721: fix inbound doorbell interrupt handling drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode mm: correct page->pfmemalloc to fix deactivate_slab regression drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes mm/compaction.c: fix deferring compaction mistake drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources string: do not export memweight() to userspace ...
2012-08-21[media] Cleanup media Kconfig filesMauro Carvalho Chehab2-12/+17
- 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 <[email protected]>
2012-08-15[media] reorganize the API core itemsMauro Carvalho Chehab1-8/+24
Reorganize the API core changes for them to appear closer to the items that enable them, and not at the drivers part of the menu. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-08-13[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab1-1/+1
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 <[email protected]>
2012-08-13[media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab1-1/+1
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-08-13[media] dvb: move the dvb core one level upMauro Carvalho Chehab1-1/+1
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 <[email protected]>
2012-08-13[media] v4l: move v4l2 core into a separate directoryMauro Carvalho Chehab24-0/+17467
Currently, the v4l2 core is mixed together with other non-core drivers. Move them into a separate directory. Signed-off-by: Mauro Carvalho Chehab <[email protected]>