aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2011-03-22Merge branch 'slab/urgent' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: Add statistics for this_cmpxchg_double failures slub: Add missing irq restore for the OOM path
2011-03-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-clientLinus Torvalds4-16/+100
* git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: use watch/notify for changes in rbd header libceph: add lingering request and watch/notify event framework rbd: update email address in Documentation ceph: rename dentry_release -> d_release, fix comment ceph: add request to the tail of unsafe write list ceph: remove request from unsafe list if it is canceled/timed out ceph: move readahead default to fs/ceph from libceph ceph: add ino32 mount option ceph: update common header files ceph: remove debugfs debug cruft libceph: fix osd request queuing on osdmap updates ceph: preserve I_COMPLETE across rename libceph: Fix base64-decoding when input ends in newline.
2011-03-22tty: stop using "delayed_work" in the tty layerLinus Torvalds2-2/+2
Using delayed-work for tty flip buffers ends up causing us to wait for the next tick to complete some actions. That's usually not all that noticeable, but for certain latency-critical workloads it ends up being totally unacceptable. As an extreme case of this, passing a token back-and-forth over a pty will take two ticks per iteration, so even just a thousand iterations will take 8 seconds assuming a common 250Hz configuration. Avoiding the whole delayed work issue brings that ping-pong test-case down to 0.009s on my machine. In more practical terms, this latency has been a performance problem for things like dive computer simulators (simulating the serial interface using the ptys) and for other environments (Alan mentions a CP/M emulator). Reported-by: Jef Driesen <[email protected]> Acked-by: Greg KH <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22[media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_tPawel Osciak1-3/+6
dma_addr_t may not fit into void* on some architectures. To be safe, make vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it in vb2_dma_contig_plane_paddr() back to dma_addr_t. Signed-off-by: Pawel Osciak <[email protected]> Reported-by: Hans Verkuil <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: soc-camera: Store negotiated buffer settingsSergio Aguirre1-0/+2
This fixes the problem in which a host driver sets a personalized sizeimage or bytesperline field, and gets ignored when doing G_FMT. Signed-off-by: Sergio Aguirre <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] rc/keymaps: Rename Hauppauge table as rc-hauppaugeMauro Carvalho Chehab1-2/+2
There are two "hauppauge-new" keymaps, one with protocol unknown, and the other with the protocol marked accordingly. However, both tables are miss-named. Also, the old rc-hauppauge-new is broken, as it mixes three different controllers as if they were just one. This patch solves half of the problem by renaming the correct keycode table as just rc-hauppauge. This table contains the codes for the four different types of remote controllers found on Hauppauge cards, properly mapped with their different addresses. create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c [Jarod: fix up RC_MAP_HAUPPAUGE defines] Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] v4l2: use new flag to enable core priority handlingHans Verkuil1-0/+3
Rather than guess which driver supports core priority handling, require drivers that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device. Updated the core prio handling accordingly and set the flag in the three drivers that do. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2-device: add kref and a release functionHans Verkuil1-0/+11
The video_device struct has proper ref counting and its release function will be called when the last user releases it. But no such support was available for struct v4l2_device. This made it hard to determine when a USB driver can release the device if it has multiple device nodes. With one device node it is easy of course, since when the device node is released, the whole device can be released. This patch adds refcounting to v4l2_device. When registering device nodes the v4l2_device refcount will be increased, when releasing device nodes it will be decreased. The (optional) release function will be called when the last device node was released. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2-ioctl: add priority handling supportHans Verkuil1-1/+1
Drivers that use v4l2_fh can now use the core framework support of g/s_priority. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2-fh: add v4l2_fh_is_singularHans Verkuil1-0/+13
Several drivers need to do something when the first filehandle is opened or the last filehandle is closed. Most implement some use count mechanism, but if they use v4l2_fh, then you can also just check if this is the only filehandle for the device node. A simple helper function can do this. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2-fh: add v4l2_fh_open and v4l2_fh_release helper functionsHans Verkuil1-0/+15
Add two new functions: v4l2_fh_open allocates and initializes a struct v4l2_fh based on a struct file pointer and v4l2_fh_release releases and frees a struct v4l2_fh. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2-fh: implement v4l2_priority supportHans Verkuil1-0/+1
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2: add v4l2_prio_state to v4l2_device and video_deviceHans Verkuil2-0/+6
Integrate the v4l2_prio_state into the core, ready for use. One struct v4l2_prio_state is added to v4l2_device and a pointer to a prio state is added to video_device. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l2_prio: move from v4l2-common to v4l2-devHans Verkuil2-15/+15
We are going to move priority handling into the v4l2 core. As a consequence the v4l2_prio helper functions need to be moved into the core videodev module as well to prevent circular dependencies. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22slub: Add statistics for this_cmpxchg_double failuresChristoph Lameter1-0/+1
Add some statistics for debugging. Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
2011-03-22libceph: add lingering request and watch/notify event frameworkYehuda Sadeh1-0/+52
Lingering requests are requests that are sent to the OSD normally but tracked also after we get a successful request. This keeps the OSD connection open and resends the original request if the object moves to another OSD. The OSD can then send notification messages back to us if another client initiates a notify. This framework will be used by RBD so that the client gets notification when a snapshot is created by another node or tool. Signed-off-by: Yehuda Sadeh <[email protected]> Signed-off-by: Sage Weil <[email protected]>
2011-03-22Merge branch 'for-linus/2639/i2c-2' of git://git.fluff.org/bjdooks/linuxLinus Torvalds1-0/+82
* 'for-linus/2639/i2c-2' of git://git.fluff.org/bjdooks/linux: i2c-pxa2xx: Don't clear isr bits too early i2c-pxa2xx: Fix register offsets i2c-pxa2xx: pass of_node from platform driver to adapter and publish i2c-pxa2xx: check timeout correctly i2c-pxa2xx: add support for shared IRQ handler i2c-pxa2xx: Add PCI support for PXA I2C controller ARM: pxa2xx: reorganize I2C files i2c-pxa2xx: use dynamic register layout i2c-mxs: set controller to pio queue mode after reset i2c-eg20t: support new device OKI SEMICONDUCTOR ML7213 IOH i2c/busses: Add support for Diolan U2C-12 USB-I2C adapter
2011-03-22Merge branch 'for-linus' of ↵Linus Torvalds2-3/+6
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: Dont define useless label in the !CONFIG_CMPXCHG_LOCAL case slab,rcu: don't assume the size of struct rcu_head slub,rcu: don't assume the size of struct rcu_head slub: automatically reserve bytes at the end of slab Lockless (and preemptless) fastpaths for slub slub: Get rid of slab_free_hook_irq() slub: min_partial needs to be in first cacheline slub: fix ksize() build error slub: fix kmemcheck calls to match ksize() hints Revert "slab: Fix missing DEBUG_SLAB last user" mm: Remove support for kmem_cache_name()
2011-03-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds10-19/+62
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits) IPVS: Use global mutex in ip_vs_app.c ipvs: fix a typo in __ip_vs_control_init() veth: Fix the byte counters net ipv6: Fix duplicate /proc/sys/net/ipv6/neigh directory entries. macvlan: Fix use after free of struct macvlan_port. net: fix incorrect spelling in drop monitor protocol can: c_can: Do basic c_can configuration _before_ enabling the interrupts net/appletalk: fix atalk_release use after free ipx: fix ipx_release() snmp: SNMP_UPD_PO_STATS_BH() always called from softirq l2tp: fix possible oops on l2tp_eth module unload xfrm: Fix initialize repl field of struct xfrm_state netfilter: ipt_CLUSTERIP: fix buffer overflow netfilter: xtables: fix reentrancy netfilter: ipset: fix checking the type revision at create command netfilter: ipset: fix address ranges at hash:*port* types niu: Rename NIU parent platform device name to fix conflict. r8169: fix a bug in rtl8169_init_phy() bonding: fix a typo in a comment ftmac100: use resource_size() ...
2011-03-22video, sm501: add I/O functions for use on powerpcHeiko Schocher1-0/+8
- add read/write functions for using this driver also on powerpc plattforms Signed-off-by: Heiko Schocher <[email protected]> cc: [email protected] cc: [email protected] cc: Ben Dooks <[email protected]> cc: Vincent Sanders <[email protected]> cc: Samuel Ortiz <[email protected]> cc: [email protected] cc: Randy Dunlap <[email protected]> cc: Paul Mundt <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22[media] Update Pawel Osciak's e-mail addressPawel Osciak5-5/+5
Signed-off-by: Pawel Osciak <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] add TerraTec remoteAntti Palosaari1-0/+1
Remote used for TerraTec Cinergy T Stick RC. Keytable from Martin Groszhauser <[email protected]> Signed-off-by: Antti Palosaari <[email protected]> Cc: Martin Groszhauser <[email protected]> Cc: TerraTux <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] gspca - nw80x: New subdriver for Divio based webcamsJean-François Moine1-0/+1
[[email protected]: Fix a few CodingStyle issues] Tested-by: Kjell Claesson <[email protected]> Tested-by: Hans de Goede <[email protected]> Signed-off-by: Jean-François Moine <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignmentSylwester Nawrocki1-0/+2
Allow the MIPI-CSI data alignment to be defined in the board setup as it may be different across various camera sensors. Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] s5p-fimc: Allow defining number of sensors at runtimeSylwester Nawrocki1-4/+3
Add num_clients field to struct s5p_fimc_isp_info to define exactly size of clients array which simplifies a bit the sensors management. Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] media: Pick a free ioctls rangeLaurent Pinchart1-4/+4
Pick an unused range of ioctls in Documentation/ioctl/ioctl-number.txt and use it for the MEDIA_IOC_* ioctls. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] omap3isp: Kconfig and MakefileLaurent Pinchart1-0/+1
Add the OMAP3 ISP driver to the kernel build system. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] omap3isp: OMAP3 ISP coreSakari Ailus1-0/+646
The Image Signal Processor provides the system interface and the processing capability to connect RAW or YUV image-sensor modules to the OMAP3. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: David Cohen <[email protected]> Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Vimarsh Zutshi <[email protected]> Signed-off-by: Tuukka Toivonen <[email protected]> Signed-off-by: Sergio Aguirre <[email protected]> Signed-off-by: Antti Koskipaa <[email protected]> Signed-off-by: Ivan T. Ivanov <[email protected]> Signed-off-by: RaniSuneela <[email protected]> Signed-off-by: Atanas Filipov <[email protected]> Signed-off-by: Gjorgji Rosikopulos <[email protected]> Signed-off-by: Hiroshi DOYU <[email protected]> Signed-off-by: Nayden Kanchev <[email protected]> Signed-off-by: Phil Carmody <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: Dominic Curran <[email protected]> Signed-off-by: Ilkka Myllyperkio <[email protected]> Signed-off-by: Pallavi Kulkarni <[email protected]> Signed-off-by: Vaibhav Hiremath <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Add 12 bits bayer pixel formatsLaurent Pinchart1-0/+4
Add FCCs for the following pixel formats: - V4L2_PIX_FMT_SBGGR12 - V4L2_PIX_FMT_SGBRG12 - V4L2_PIX_FMT_SGRBG12 - V4L2_PIX_FMT_SRGGB12 Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Add missing 12 bits bayer media bus formatsLaurent Pinchart1-1/+4
Add codes and documentation for the following media bus formats: - V4L2_MBUS_FMT_SGBRG12_1X12 - V4L2_MBUS_FMT_SGRBG12_1X12 - V4L2_MBUS_FMT_SRGGB12_1X12 Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Add remaining RAW10 patterns w DPCM pixel code variantsLaurent Pinchart1-1/+6
This adds following formats: - V4L2_MBUS_FMT_SRGGB10_1X10 - V4L2_MBUS_FMT_SGBRG10_1X10 - V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 - V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 - V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 Signed-off-by: Sergio Aguirre <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Add 8-bit YUYV on 16-bit bus and SGRBG10 media bus pixel codesLaurent Pinchart1-2/+8
Add the following media bus format code definitions: - V4L2_MBUS_FMT_SGRBG10_1X10 for 10-bit GRBG Bayer - V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 for 10-bit DPCM compressed GRBG Bayer - V4L2_MBUS_FMT_YUYV16_1X16 for 8-bit YUYV on 16-bit bus - V4L2_MBUS_FMT_UYVY16_1X16 for 8-bit UYVY on 16-bit bus - V4L2_MBUS_FMT_YVYU16_1X16 for 8-bit YVYU on 16-bit bus - V4L2_MBUS_FMT_VYUY16_1X16 for 8-bit VYUY on 16-bit bus Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Add subdev sensor g_skip_frames operationLaurent Pinchart1-0/+4
Some buggy sensors generate corrupt frames when the stream is started. This new operation return the number of corrupt frames to skip when starting the stream. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: v4l2_subdev userspace crop APIAntti Koskipaa2-0/+19
This patch adds the VIDIOC_SUBDEV_S_CROP and G_CROP ioctls to the userland API. CROPCAP is not implemented because it's redundant. Signed-off-by: Antti Koskipaa <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: v4l2_subdev userspace frame interval APILaurent Pinchart2-0/+43
The three new ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, VIDIOC_SUBDEV_G_FRAME_INTERVAL and VIDIOC_SUBDEV_S_FRAME_INTERVAL can be used to enumerate and configure a subdev's frame rate from userspace. Two new video::g/s_frame_interval subdev operations are introduced to support those ioctls. The existing video::g/s_parm operations are deprecated and shouldn't be used anymore. 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]>
2011-03-22[media] v4l: v4l2_subdev userspace format APILaurent Pinchart3-0/+101
Add a userspace API to get, set and enumerate the media format on a subdev pad. The format at the output of a subdev usually depends on the format at its input(s). The try format operation is thus not suitable for probing format at individual pads, as it can't modify the device state and thus can't remember the format tried at the input to compute the output format. To fix the problem, pass an extra argument to the get/set format operations to select the 'try' or 'active' format. The try format is used when probing the subdev. Setting the try format must not change the device configuration but can store data for later reuse. Data storage is provided at the file-handle level so applications probing the subdev concurently won't interfere with each other. The active format is used when configuring the subdev. It's identical to the format handled by the usual get/set operations. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: v4l2_subdev pad-level operationsLaurent Pinchart1-0/+4
Add a v4l2_subdev_pad_ops structure for the operations that need to be performed at the pad level such as format-related operations. Pad format-related operations use v4l2_mbus_framefmt instead of v4l2_format. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: subdev: Add new file operationsLaurent Pinchart1-0/+7
V4L2 sub-devices store pad formats and crop settings in the file handle. To let drivers initialize those settings properly, add an open operation that is called when the subdev is opened as well as a corresponding close operation. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Create v4l2 subdev file handle structureStanimir Varbanov1-0/+29
Used for storing subdev information per file handle and hold V4L2 file handle. Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Antti Koskipaa <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Group media bus pixel codes by types and sort them alphabeticallyLaurent Pinchart1-31/+46
Adding new pixel codes at the end of the enumeration will soon create a mess, so group the pixel codes by type and sort them by bus_width, bits per component, samples per pixel and order of subsamples. As the codes are part of the kernel ABI their value can't change when a new code is inserted in the enumeration, so they are given an explicit numerical value. When inserting a new pixel code developers must use and update the next free value. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Rename V4L2_MBUS_FMT_GREY8_1X8 to V4L2_MBUS_FMT_Y8_1X8Laurent Pinchart1-1/+1
For consistency with the V4L2_MBUS_FMT_Y10_1X10 format. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Replace enums with fixed-sized fields in public structureLaurent Pinchart1-8/+9
The v4l2_mbus_framefmt structure will be part of the public userspace API and used (albeit indirectly) as an ioctl argument. As such, its size must be fixed across userspace ABIs. Replace the v4l2_field and v4l2_colorspace enums by __u32 fields and add padding for future enhancements. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Move the media/v4l2-mediabus.h header to include/linuxLaurent Pinchart4-62/+81
The header defines the v4l2_mbus_framefmt structure which will be used by the V4L2 subdevs userspace API. Change the type of the v4l2_mbus_framefmt::code field to __u32, as enum sizes can differ between different ABIs on the same architectures. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: Make v4l2_subdev inherit from media_entityLaurent Pinchart1-0/+6
V4L2 subdevices are media entities. As such they need to inherit from (include) the media_entity structure. When registering/unregistering the subdevice, the media entity is automatically registered/unregistered. The entity is acquired on device open and released on device close. 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]>
2011-03-22[media] v4l: Make video_device inherit from media_entityLaurent Pinchart1-0/+7
V4L2 devices are media entities. As such they need to inherit from (include) the media_entity structure. When registering/unregistering the device, the media entity is automatically registered/unregistered. The entity is acquired on device open and released on device close. 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]>
2011-03-22[media] v4l: Add a media_device pointer to the v4l2_device structureLaurent Pinchart1-0/+4
The pointer will later be used to register/unregister media entities when registering/unregistering a v4l2_subdev or a video_device. With the introduction of media devices, device drivers need to store a pointer to a driver-specific structure in the device's drvdata. v4l2_device can't claim ownership of the drvdata anymore. To maintain compatibility with drivers that rely on v4l2_device storing a pointer to itself in the device's drvdata, v4l2_device_register() will keep doing so if the drvdata is NULL. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] media: Pipelines and media streamsLaurent Pinchart2-0/+11
Drivers often need to associate pipeline objects to entities, and to take stream state into account when configuring entities and links. The pipeline API helps drivers manage that information. When starting streaming, drivers call media_entity_pipeline_start(). The function marks all entities connected to the given entity through enabled links, either directly or indirectly, as streaming. Similarly, when stopping the stream, drivers call media_entity_pipeline_stop(). The media_entity_pipeline_start() function takes a pointer to a media pipeline and stores it in every entity in the graph. Drivers should embed the media_pipeline structure in higher-level pipeline structures and can then access the pipeline through the media_entity structure. Link configuration will fail with -EBUSY by default if either end of the link is a streaming entity, unless the link is marked with the MEDIA_LNK_FL_DYNAMIC flag. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] media: Links setupLaurent Pinchart3-0/+21
Create the following ioctl and implement it at the media device level to setup links. - MEDIA_IOC_SETUP_LINK: Modify the properties of a given link The only property that can currently be modified is the ENABLED link flag to enable/disable a link. Links marked with the IMMUTABLE link flag can not be enabled or disabled. Enabling or disabling a link has effects on entities' use count. Those changes are automatically propagated through the graph. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Stanimir Varbanov <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] media: Entities, pads and links enumerationLaurent Pinchart2-23/+86
Create the following two ioctls and implement them at the media device level to enumerate entities, pads and links. - MEDIA_IOC_ENUM_ENTITIES: Enumerate entities and their properties - MEDIA_IOC_ENUM_LINKS: Enumerate all pads and links for a given entity Entity IDs can be non-contiguous. Userspace applications should enumerate entities using the MEDIA_ENT_ID_FLAG_NEXT flag. When the flag is set in the entity ID, the MEDIA_IOC_ENUM_ENTITIES will return the next entity with an ID bigger than the requested one. Only forward links that originate at one of the entity's source pads are returned during the enumeration process. 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]>
2011-03-22[media] media: Media device information queryLaurent Pinchart2-0/+46
Create the following ioctl and implement it at the media device level to query device information. - MEDIA_IOC_DEVICE_INFO: Query media device information The ioctl and its data structure are defined in the new kernel header linux/media.h available to userspace applications. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>