linux-stable/drivers
Laurent Pinchart 53e269c102 [media] media: Entities, pads and links
As video hardware pipelines become increasingly complex and
configurable, the current hardware description through v4l2 subdevices
reaches its limits. In addition to enumerating and configuring
subdevices, video camera drivers need a way to discover and modify at
runtime how those subdevices are connected. This is done through new
elements called entities, pads and links.

An entity is a basic media hardware building block. It can correspond to
a large variety of logical blocks such as physical hardware devices
(CMOS sensor for instance), logical hardware devices (a building block
in a System-on-Chip image processing pipeline), DMA channels or physical
connectors.

A pad is a connection endpoint through which an entity can interact with
other entities. Data (not restricted to video) produced by an entity
flows from the entity's output to one or more entity inputs. Pads should
not be confused with physical pins at chip boundaries.

A link is a point-to-point oriented connection between two pads, either
on the same entity or on different entities. Data flows from a source
pad to a sink pad.

Links are stored in the source entity. To make backwards graph walk
faster, a copy of all links is also stored in the sink entity. The copy
is known as a backlink and is only used to help graph traversal.

The entity API is made of three functions:

- media_entity_init() initializes an entity. The caller must provide an
array of pads as well as an estimated number of links. The links array
is allocated dynamically and will be reallocated if it grows beyond the
initial estimate.

- media_entity_cleanup() frees resources allocated for an entity. It
must be called during the cleanup phase after unregistering the entity
and before freeing it.

- media_entity_create_link() creates a link between two entities. An
entry in the link array of each entity is allocated and stores pointers
to source and sink pads.

When a media device is unregistered, all its entities are unregistered
automatically.

The code is based on Hans Verkuil <hverkuil@xs4all.nl> initial work.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:10 -03:00
..
accessibility
acpi ACPI / ACPICA: Implicit notify for multiple devices 2011-02-24 19:59:21 +01:00
amba
ata libata: set queue DMA alignment to sector size for ATAPI too 2011-01-28 03:16:20 -05:00
atm ATM, Solos PCI ADSL2+: Don't deref NULL pointer if net_ratelimit() and alloc_skb() interact badly. 2011-02-13 16:55:46 -08:00
auxdisplay
base PM / Runtime: Don't enable interrupts while running in_interrupt 2011-01-25 20:50:07 +01:00
block block: kill loop_mutex 2011-03-03 11:53:25 -05:00
bluetooth Revert "Bluetooth: Enable USB autosuspend by default on btusb" 2011-02-23 19:42:03 -08:00
cdrom cdrom: support devices that have check_events but not media_changed 2011-02-09 14:22:37 +01:00
char ipmi: Fix IPMI errors due to timing problems 2011-03-10 13:21:16 -08:00
clk
clocksource drivers/clocksource/tcb_clksrc.c: fix init sequence 2011-01-26 10:50:04 +10:00
connector
cpufreq [CPUFREQ] fix BUG on cpufreq policy init failure 2011-03-01 18:49:44 -05:00
cpuidle
crypto
dca
dio
dma Merge branch 'imx' into dmaengine-fixes 2011-02-14 02:40:46 -08:00
edac amd64_edac: Fix DIMMs per DCTs output 2011-02-10 14:41:49 +01:00
eisa
firewire Merge branches 'fixes' and 'fwnet' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2011-01-21 13:34:39 -08:00
firmware x86, dmi, debug: Log board name (when present) in dmesg/oops output 2011-02-15 04:20:57 +01:00
gpio gpio: add MODULE_DEVICE_TABLE 2011-03-13 15:35:59 -07:00
gpu drm/radeon: fix problem with changing active VRAM size. (v2) 2011-03-14 12:51:04 +10:00
hid kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
hwmon hwmon/f71882fg: Set platform drvdata to NULL later 2011-03-13 07:42:52 -07:00
i2c i2c-eg20t: include slab.h for memory allocations 2011-03-08 23:13:30 +00:00
ide kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
idle intel_idle: disable Atom/Lincroft HW C-state auto-demotion 2011-02-17 17:08:48 -05:00
ieee802154
infiniband Merge branches 'nes' and 'qib' into for-next 2011-02-17 14:04:59 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-02-23 14:44:25 -08:00
isdn drivers:isdn:istream.c Fix typo pice to piece 2011-02-28 12:07:32 -08:00
leds leds: leds-pwm: return proper error if pwm_request failed 2011-01-26 10:49:58 +10:00
lguest lguest: compile fixes 2011-01-20 21:37:29 +10:30
macintosh powerpc/macintosh: Fix wrong test in fan_{read,write}_reg() 2011-01-21 14:08:34 +11:00
mca
md md: Fix - again - partition detection when array becomes active 2011-02-24 17:26:41 +11:00
media [media] media: Entities, pads and links 2011-03-22 04:53:10 -03:00
memstick workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable' 2011-02-16 17:48:59 +01:00
message [SCSI] mptfusion: Bump version 03.04.18 2011-02-12 12:51:21 -06:00
mfd [media] MFD: WL1273 FM Radio: MFD driver for the FM radio 2011-03-21 20:32:39 -03:00
misc drivers/misc/bmp085.c: add MODULE_DEVICE_TABLE 2011-03-04 17:53:38 -08:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc 2011-03-09 14:00:44 -08:00
mtd Merge git://git.infradead.org/users/dwmw2/mtd-2.6.38 2011-03-13 15:56:22 -07:00
net ariadne: remove redundant NULL check 2011-03-10 14:41:51 -08:00
nfc drivers/nfc/pn544.c: add missing regulator 2011-02-25 15:07:36 -08:00
nubus
of of/promtree: allow DT device matching by fixing 'name' brokenness (v5) 2011-03-02 13:45:19 -07:00
oprofile
parisc
parport parport: make lockdep happy with waitlist_lock 2011-01-26 10:49:59 +10:00
pci pci: use security_capable() when checking capablities during config space read 2011-02-15 19:06:31 +11:00
pcmcia Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-07 20:45:42 -08:00
platform dell-laptop: Toggle the unsupported hardware killswitch 2011-02-21 17:06:21 -05:00
pnp
power
pps pps: make pps_gen_parport depend on BROKEN 2011-03-04 17:53:38 -08:00
ps3
rapidio rapidio: fix sysfs config attribute to access 16MB of maint space 2011-02-25 15:07:37 -08:00
regulator regulator, mc13xxx: Remove pointless test for unsigned less than zero 2011-02-25 08:51:07 +00:00
rtc drivers/rtc/rtc-s3c.c: fix prototype for s3c_rtc_setaie() 2011-03-04 17:53:38 -08:00
s390 [S390] tape: deadlock on system work queue 2011-03-03 17:56:14 +01:00
sbus
scsi block: add @force_kblockd to __blk_run_queue() 2011-03-02 08:48:05 -05:00
sfi
sh sh: update INTC to clear IRQ sense valid flag 2011-01-19 19:02:35 +09:00
sn
spi spi/pxa2xx pci: fix the release - remove race 2011-02-15 13:25:36 -07:00
ssb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-02-08 12:03:54 -08:00
staging [media] staging/cx25721: serialize access to devlist 2011-03-21 20:32:41 -03:00
target [SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown 2011-02-28 11:23:32 -06:00
tc
telephony
thermal ACPI: Fix build for CONFIG_NET unset 2011-02-28 18:00:31 -08:00
tty fmvj18x_cs: add new id 2011-02-28 12:06:20 -08:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2011-03-03 15:43:15 -08:00
uwb
vhost vhost: rcu annotation fixup 2011-02-01 16:48:46 +02:00
video matrox: Remove legacy VIDIOC_*_OLD ioctls 2011-03-21 20:32:38 -03:00
virtio virtio: remove virtio-pci root device 2011-01-20 21:37:30 +10:30
vlynq
w1 drivers/w1/masters/omap_hdq.c: add missing clk_put 2011-02-11 16:12:20 -08:00
watchdog watchdog: hpwdt: eliminate section mismatch warning 2011-03-14 10:44:31 +00:00
xen xen: suspend and resume system devices when running PVHVM 2011-02-17 10:31:20 +00:00
zorro
Kconfig
Makefile Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-01-20 16:39:23 -08:00