aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /Documentation/DocBook
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/80211.tmpl15
-rw-r--r--Documentation/DocBook/Makefile2
-rw-r--r--Documentation/DocBook/debugobjects.tmpl50
-rw-r--r--Documentation/DocBook/device-drivers.tmpl34
-rw-r--r--Documentation/DocBook/deviceiobook.tmpl2
-rw-r--r--Documentation/DocBook/drm.tmpl2846
-rw-r--r--Documentation/DocBook/filesystems.tmpl6
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/kernel-api.tmpl16
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl2
-rw-r--r--Documentation/DocBook/kgdb.tmpl17
-rw-r--r--Documentation/DocBook/libata.tmpl10
-rw-r--r--Documentation/DocBook/media/Makefile82
-rw-r--r--Documentation/DocBook/media/constraints.png.b6459
-rw-r--r--Documentation/DocBook/media/selection.png.b64206
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia614
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg63
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-full.dia1588
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-full.svg163
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia1152
-rw-r--r--Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg116
-rw-r--r--Documentation/DocBook/media_api.tmpl9
-rw-r--r--Documentation/DocBook/mtdnand.tmpl23
-rw-r--r--Documentation/DocBook/networking.tmpl4
-rw-r--r--Documentation/DocBook/uio-howto.tmpl65
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl123
26 files changed, 774 insertions, 6495 deletions
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 42e7f030cb1..445289cd0e6 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -129,6 +129,7 @@
129!Finclude/net/cfg80211.h cfg80211_pmksa 129!Finclude/net/cfg80211.h cfg80211_pmksa
130!Finclude/net/cfg80211.h cfg80211_send_rx_auth 130!Finclude/net/cfg80211.h cfg80211_send_rx_auth
131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout 131!Finclude/net/cfg80211.h cfg80211_send_auth_timeout
132!Finclude/net/cfg80211.h __cfg80211_auth_canceled
132!Finclude/net/cfg80211.h cfg80211_send_rx_assoc 133!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
133!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout 134!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
134!Finclude/net/cfg80211.h cfg80211_send_deauth 135!Finclude/net/cfg80211.h cfg80211_send_deauth
@@ -404,6 +405,7 @@
404!Finclude/net/mac80211.h ieee80211_get_tkip_p1k 405!Finclude/net/mac80211.h ieee80211_get_tkip_p1k
405!Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv 406!Finclude/net/mac80211.h ieee80211_get_tkip_p1k_iv
406!Finclude/net/mac80211.h ieee80211_get_tkip_p2k 407!Finclude/net/mac80211.h ieee80211_get_tkip_p2k
408!Finclude/net/mac80211.h ieee80211_key_removed
407 </chapter> 409 </chapter>
408 410
409 <chapter id="powersave"> 411 <chapter id="powersave">
@@ -431,18 +433,8 @@
431 Insert notes about VLAN interfaces with hw crypto here or 433 Insert notes about VLAN interfaces with hw crypto here or
432 in the hw crypto chapter. 434 in the hw crypto chapter.
433 </para> 435 </para>
434 <section id="ps-client">
435 <title>support for powersaving clients</title>
436!Pinclude/net/mac80211.h AP support for powersaving clients
437 </section>
438!Finclude/net/mac80211.h ieee80211_get_buffered_bc 436!Finclude/net/mac80211.h ieee80211_get_buffered_bc
439!Finclude/net/mac80211.h ieee80211_beacon_get 437!Finclude/net/mac80211.h ieee80211_beacon_get
440!Finclude/net/mac80211.h ieee80211_sta_eosp_irqsafe
441!Finclude/net/mac80211.h ieee80211_frame_release_type
442!Finclude/net/mac80211.h ieee80211_sta_ps_transition
443!Finclude/net/mac80211.h ieee80211_sta_ps_transition_ni
444!Finclude/net/mac80211.h ieee80211_sta_set_buffered
445!Finclude/net/mac80211.h ieee80211_sta_block_awake
446 </chapter> 438 </chapter>
447 439
448 <chapter id="multi-iface"> 440 <chapter id="multi-iface">
@@ -468,6 +460,7 @@
468!Finclude/net/mac80211.h sta_notify_cmd 460!Finclude/net/mac80211.h sta_notify_cmd
469!Finclude/net/mac80211.h ieee80211_find_sta 461!Finclude/net/mac80211.h ieee80211_find_sta
470!Finclude/net/mac80211.h ieee80211_find_sta_by_ifaddr 462!Finclude/net/mac80211.h ieee80211_find_sta_by_ifaddr
463!Finclude/net/mac80211.h ieee80211_sta_block_awake
471 </chapter> 464 </chapter>
472 465
473 <chapter id="hardware-scan-offload"> 466 <chapter id="hardware-scan-offload">
@@ -515,7 +508,7 @@
515!Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe 508!Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe
516!Finclude/net/mac80211.h ieee80211_stop_tx_ba_session 509!Finclude/net/mac80211.h ieee80211_stop_tx_ba_session
517!Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe 510!Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe
518!Finclude/net/mac80211.h ieee80211_rate_control_changed 511!Finclude/net/mac80211.h rate_control_changed
519!Finclude/net/mac80211.h ieee80211_tx_rate_control 512!Finclude/net/mac80211.h ieee80211_tx_rate_control
520!Finclude/net/mac80211.h rate_control_send_low 513!Finclude/net/mac80211.h rate_control_send_low
521 </chapter> 514 </chapter>
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index bc3d9f8c0a9..66725a3d30d 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -6,7 +6,7 @@
6# To add a new book the only step required is to add the book to the 6# To add a new book the only step required is to add the book to the
7# list of DOCBOOKS. 7# list of DOCBOOKS.
8 8
9DOCBOOKS := z8530book.xml device-drivers.xml \ 9DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ 10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 writing_usb_driver.xml networking.xml \ 11 writing_usb_driver.xml networking.xml \
12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
diff --git a/Documentation/DocBook/debugobjects.tmpl b/Documentation/DocBook/debugobjects.tmpl
index 24979f691e3..08ff908aa7a 100644
--- a/Documentation/DocBook/debugobjects.tmpl
+++ b/Documentation/DocBook/debugobjects.tmpl
@@ -96,7 +96,6 @@
96 <listitem><para>debug_object_deactivate</para></listitem> 96 <listitem><para>debug_object_deactivate</para></listitem>
97 <listitem><para>debug_object_destroy</para></listitem> 97 <listitem><para>debug_object_destroy</para></listitem>
98 <listitem><para>debug_object_free</para></listitem> 98 <listitem><para>debug_object_free</para></listitem>
99 <listitem><para>debug_object_assert_init</para></listitem>
100 </itemizedlist> 99 </itemizedlist>
101 Each of these functions takes the address of the real object and 100 Each of these functions takes the address of the real object and
102 a pointer to the object type specific debug description 101 a pointer to the object type specific debug description
@@ -274,26 +273,6 @@
274 debug checks. 273 debug checks.
275 </para> 274 </para>
276 </sect1> 275 </sect1>
277
278 <sect1 id="debug_object_assert_init">
279 <title>debug_object_assert_init</title>
280 <para>
281 This function is called to assert that an object has been
282 initialized.
283 </para>
284 <para>
285 When the real object is not tracked by debugobjects, it calls
286 fixup_assert_init of the object type description structure
287 provided by the caller, with the hardcoded object state
288 ODEBUG_NOT_AVAILABLE. The fixup function can correct the problem
289 by calling debug_object_init and other specific initializing
290 functions.
291 </para>
292 <para>
293 When the real object is already tracked by debugobjects it is
294 ignored.
295 </para>
296 </sect1>
297 </chapter> 276 </chapter>
298 <chapter id="fixupfunctions"> 277 <chapter id="fixupfunctions">
299 <title>Fixup functions</title> 278 <title>Fixup functions</title>
@@ -402,35 +381,6 @@
402 statistics. 381 statistics.
403 </para> 382 </para>
404 </sect1> 383 </sect1>
405 <sect1 id="fixup_assert_init">
406 <title>fixup_assert_init</title>
407 <para>
408 This function is called from the debug code whenever a problem
409 in debug_object_assert_init is detected.
410 </para>
411 <para>
412 Called from debug_object_assert_init() with a hardcoded state
413 ODEBUG_STATE_NOTAVAILABLE when the object is not found in the
414 debug bucket.
415 </para>
416 <para>
417 The function returns 1 when the fixup was successful,
418 otherwise 0. The return value is used to update the
419 statistics.
420 </para>
421 <para>
422 Note, this function should make sure debug_object_init() is
423 called before returning.
424 </para>
425 <para>
426 The handling of statically initialized objects is a special
427 case. The fixup function should check if this is a legitimate
428 case of a statically initialized object or not. In this case only
429 debug_object_init() should be called to make the object known to
430 the tracker. Then the function should return 0 because this is not
431 a real fixup.
432 </para>
433 </sect1>
434 </chapter> 384 </chapter>
435 <chapter id="bugs"> 385 <chapter id="bugs">
436 <title>Known Bugs And Assumptions</title> 386 <title>Known Bugs And Assumptions</title>
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl
index 7514dbf0a67..b638e50cf8f 100644
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@ -50,9 +50,7 @@
50 50
51 <sect1><title>Delaying, scheduling, and timer routines</title> 51 <sect1><title>Delaying, scheduling, and timer routines</title>
52!Iinclude/linux/sched.h 52!Iinclude/linux/sched.h
53!Ekernel/sched/core.c 53!Ekernel/sched.c
54!Ikernel/sched/cpupri.c
55!Ikernel/sched/fair.c
56!Iinclude/linux/completion.h 54!Iinclude/linux/completion.h
57!Ekernel/timer.c 55!Ekernel/timer.c
58 </sect1> 56 </sect1>
@@ -102,12 +100,9 @@ X!Iinclude/linux/kobject.h
102!Iinclude/linux/device.h 100!Iinclude/linux/device.h
103 </sect1> 101 </sect1>
104 <sect1><title>Device Drivers Base</title> 102 <sect1><title>Device Drivers Base</title>
105!Idrivers/base/init.c
106!Edrivers/base/driver.c 103!Edrivers/base/driver.c
107!Edrivers/base/core.c 104!Edrivers/base/core.c
108!Edrivers/base/syscore.c
109!Edrivers/base/class.c 105!Edrivers/base/class.c
110!Idrivers/base/node.c
111!Edrivers/base/firmware_class.c 106!Edrivers/base/firmware_class.c
112!Edrivers/base/transport_class.c 107!Edrivers/base/transport_class.c
113<!-- Cannot be included, because 108<!-- Cannot be included, because
@@ -116,7 +111,7 @@ X!Iinclude/linux/kobject.h
116 exceed allowed 44 characters maximum 111 exceed allowed 44 characters maximum
117X!Edrivers/base/attribute_container.c 112X!Edrivers/base/attribute_container.c
118--> 113-->
119!Edrivers/base/dd.c 114!Edrivers/base/sys.c
120<!-- 115<!--
121X!Edrivers/base/interface.c 116X!Edrivers/base/interface.c
122--> 117-->
@@ -124,11 +119,6 @@ X!Edrivers/base/interface.c
124!Edrivers/base/platform.c 119!Edrivers/base/platform.c
125!Edrivers/base/bus.c 120!Edrivers/base/bus.c
126 </sect1> 121 </sect1>
127 <sect1><title>Device Drivers DMA Management</title>
128!Edrivers/base/dma-buf.c
129!Edrivers/base/dma-coherent.c
130!Edrivers/base/dma-mapping.c
131 </sect1>
132 <sect1><title>Device Drivers Power Management</title> 122 <sect1><title>Device Drivers Power Management</title>
133!Edrivers/base/power/main.c 123!Edrivers/base/power/main.c
134 </sect1> 124 </sect1>
@@ -226,8 +216,9 @@ X!Isound/sound_firmware.c
226 216
227 <chapter id="uart16x50"> 217 <chapter id="uart16x50">
228 <title>16x50 UART Driver</title> 218 <title>16x50 UART Driver</title>
219!Iinclude/linux/serial_core.h
229!Edrivers/tty/serial/serial_core.c 220!Edrivers/tty/serial/serial_core.c
230!Edrivers/tty/serial/8250/8250.c 221!Edrivers/tty/serial/8250.c
231 </chapter> 222 </chapter>
232 223
233 <chapter id="fbdev"> 224 <chapter id="fbdev">
@@ -446,21 +437,4 @@ X!Idrivers/video/console/fonts.c
446!Edrivers/i2c/i2c-core.c 437!Edrivers/i2c/i2c-core.c
447 </chapter> 438 </chapter>
448 439
449 <chapter id="hsi">
450 <title>High Speed Synchronous Serial Interface (HSI)</title>
451
452 <para>
453 High Speed Synchronous Serial Interface (HSI) is a
454 serial interface mainly used for connecting application
455 engines (APE) with cellular modem engines (CMT) in cellular
456 handsets.
457
458 HSI provides multiplexing for up to 16 logical channels,
459 low-latency and full duplex communication.
460 </para>
461
462!Iinclude/linux/hsi/hsi.h
463!Edrivers/hsi/hsi.c
464 </chapter>
465
466</book> 440</book>
diff --git a/Documentation/DocBook/deviceiobook.tmpl b/Documentation/DocBook/deviceiobook.tmpl
index 54199a0dcf9..c1ed6a49e59 100644
--- a/Documentation/DocBook/deviceiobook.tmpl
+++ b/Documentation/DocBook/deviceiobook.tmpl
@@ -317,7 +317,7 @@ CPU B: spin_unlock_irqrestore(&amp;dev_lock, flags)
317 <chapter id="pubfunctions"> 317 <chapter id="pubfunctions">
318 <title>Public Functions Provided</title> 318 <title>Public Functions Provided</title>
319!Iarch/x86/include/asm/io.h 319!Iarch/x86/include/asm/io.h
320!Elib/pci_iomap.c 320!Elib/iomap.c
321 </chapter> 321 </chapter>
322 322
323</book> 323</book>
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 4ee2304f82f..c2791589397 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -6,36 +6,11 @@
6 <bookinfo> 6 <bookinfo>
7 <title>Linux DRM Developer's Guide</title> 7 <title>Linux DRM Developer's Guide</title>
8 8
9 <authorgroup>
10 <author>
11 <firstname>Jesse</firstname>
12 <surname>Barnes</surname>
13 <contrib>Initial version</contrib>
14 <affiliation>
15 <orgname>Intel Corporation</orgname>
16 <address>
17 <email>jesse.barnes@intel.com</email>
18 </address>
19 </affiliation>
20 </author>
21 <author>
22 <firstname>Laurent</firstname>
23 <surname>Pinchart</surname>
24 <contrib>Driver internals</contrib>
25 <affiliation>
26 <orgname>Ideas on board SPRL</orgname>
27 <address>
28 <email>laurent.pinchart@ideasonboard.com</email>
29 </address>
30 </affiliation>
31 </author>
32 </authorgroup>
33
34 <copyright> 9 <copyright>
35 <year>2008-2009</year> 10 <year>2008-2009</year>
36 <year>2012</year> 11 <holder>
37 <holder>Intel Corporation</holder> 12 Intel Corporation (Jesse Barnes &lt;jesse.barnes@intel.com&gt;)
38 <holder>Laurent Pinchart</holder> 13 </holder>
39 </copyright> 14 </copyright>
40 15
41 <legalnotice> 16 <legalnotice>
@@ -45,17 +20,6 @@
45 the kernel source COPYING file. 20 the kernel source COPYING file.
46 </para> 21 </para>
47 </legalnotice> 22 </legalnotice>
48
49 <revhistory>
50 <!-- Put document revisions here, newest first. -->
51 <revision>
52 <revnumber>1.0</revnumber>
53 <date>2012-07-13</date>
54 <authorinitials>LP</authorinitials>
55 <revremark>Added extensive documentation about driver internals.
56 </revremark>
57 </revision>
58 </revhistory>
59 </bookinfo> 23 </bookinfo>
60 24
61<toc></toc> 25<toc></toc>
@@ -68,7 +32,7 @@
68 The Linux DRM layer contains code intended to support the needs 32 The Linux DRM layer contains code intended to support the needs
69 of complex graphics devices, usually containing programmable 33 of complex graphics devices, usually containing programmable
70 pipelines well suited to 3D graphics acceleration. Graphics 34 pipelines well suited to 3D graphics acceleration. Graphics
71 drivers in the kernel may make use of DRM functions to make 35 drivers in the kernel can make use of DRM functions to make
72 tasks like memory management, interrupt handling and DMA easier, 36 tasks like memory management, interrupt handling and DMA easier,
73 and provide a uniform interface to applications. 37 and provide a uniform interface to applications.
74 </para> 38 </para>
@@ -93,10 +57,10 @@
93 existing drivers. 57 existing drivers.
94 </para> 58 </para>
95 <para> 59 <para>
96 First, we go over some typical driver initialization 60 First, we'll go over some typical driver initialization
97 requirements, like setting up command buffers, creating an 61 requirements, like setting up command buffers, creating an
98 initial output configuration, and initializing core services. 62 initial output configuration, and initializing core services.
99 Subsequent sections cover core internals in more detail, 63 Subsequent sections will cover core internals in more detail,
100 providing implementation notes and examples. 64 providing implementation notes and examples.
101 </para> 65 </para>
102 <para> 66 <para>
@@ -108,361 +72,344 @@
108 submission &amp; fencing, suspend/resume support, and DMA 72 submission &amp; fencing, suspend/resume support, and DMA
109 services. 73 services.
110 </para> 74 </para>
75 <para>
76 The core of every DRM driver is struct drm_driver. Drivers
77 will typically statically initialize a drm_driver structure,
78 then pass it to drm_init() at load time.
79 </para>
111 80
112 <!-- Internals: driver init --> 81 <!-- Internals: driver init -->
113 82
114 <sect1> 83 <sect1>
115 <title>Driver Initialization</title> 84 <title>Driver initialization</title>
116 <para> 85 <para>
117 At the core of every DRM driver is a <structname>drm_driver</structname> 86 Before calling the DRM initialization routines, the driver must
118 structure. Drivers typically statically initialize a drm_driver structure, 87 first create and fill out a struct drm_driver structure.
119 and then pass it to one of the <function>drm_*_init()</function> functions 88 </para>
120 to register it with the DRM subsystem. 89 <programlisting>
90 static struct drm_driver driver = {
91 /* don't use mtrr's here, the Xserver or user space app should
92 * deal with them for intel hardware.
93 */
94 .driver_features =
95 DRIVER_USE_AGP | DRIVER_REQUIRE_AGP |
96 DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_MODESET,
97 .load = i915_driver_load,
98 .unload = i915_driver_unload,
99 .firstopen = i915_driver_firstopen,
100 .lastclose = i915_driver_lastclose,
101 .preclose = i915_driver_preclose,
102 .save = i915_save,
103 .restore = i915_restore,
104 .device_is_agp = i915_driver_device_is_agp,
105 .get_vblank_counter = i915_get_vblank_counter,
106 .enable_vblank = i915_enable_vblank,
107 .disable_vblank = i915_disable_vblank,
108 .irq_preinstall = i915_driver_irq_preinstall,
109 .irq_postinstall = i915_driver_irq_postinstall,
110 .irq_uninstall = i915_driver_irq_uninstall,
111 .irq_handler = i915_driver_irq_handler,
112 .reclaim_buffers = drm_core_reclaim_buffers,
113 .get_map_ofs = drm_core_get_map_ofs,
114 .get_reg_ofs = drm_core_get_reg_ofs,
115 .fb_probe = intelfb_probe,
116 .fb_remove = intelfb_remove,
117 .fb_resize = intelfb_resize,
118 .master_create = i915_master_create,
119 .master_destroy = i915_master_destroy,
120#if defined(CONFIG_DEBUG_FS)
121 .debugfs_init = i915_debugfs_init,
122 .debugfs_cleanup = i915_debugfs_cleanup,
123#endif
124 .gem_init_object = i915_gem_init_object,
125 .gem_free_object = i915_gem_free_object,
126 .gem_vm_ops = &amp;i915_gem_vm_ops,
127 .ioctls = i915_ioctls,
128 .fops = {
129 .owner = THIS_MODULE,
130 .open = drm_open,
131 .release = drm_release,
132 .ioctl = drm_ioctl,
133 .mmap = drm_mmap,
134 .poll = drm_poll,
135 .fasync = drm_fasync,
136#ifdef CONFIG_COMPAT
137 .compat_ioctl = i915_compat_ioctl,
138#endif
139 .llseek = noop_llseek,
140 },
141 .pci_driver = {
142 .name = DRIVER_NAME,
143 .id_table = pciidlist,
144 .probe = probe,
145 .remove = __devexit_p(drm_cleanup_pci),
146 },
147 .name = DRIVER_NAME,
148 .desc = DRIVER_DESC,
149 .date = DRIVER_DATE,
150 .major = DRIVER_MAJOR,
151 .minor = DRIVER_MINOR,
152 .patchlevel = DRIVER_PATCHLEVEL,
153 };
154 </programlisting>
155 <para>
156 In the example above, taken from the i915 DRM driver, the driver
157 sets several flags indicating what core features it supports.
158 We'll go over the individual callbacks in later sections. Since
159 flags indicate which features your driver supports to the DRM
160 core, you need to set most of them prior to calling drm_init(). Some,
161 like DRIVER_MODESET can be set later based on user supplied parameters,
162 but that's the exception rather than the rule.
163 </para>
164 <variablelist>
165 <title>Driver flags</title>
166 <varlistentry>
167 <term>DRIVER_USE_AGP</term>
168 <listitem><para>
169 Driver uses AGP interface
170 </para></listitem>
171 </varlistentry>
172 <varlistentry>
173 <term>DRIVER_REQUIRE_AGP</term>
174 <listitem><para>
175 Driver needs AGP interface to function.
176 </para></listitem>
177 </varlistentry>
178 <varlistentry>
179 <term>DRIVER_USE_MTRR</term>
180 <listitem>
181 <para>
182 Driver uses MTRR interface for mapping memory. Deprecated.
183 </para>
184 </listitem>
185 </varlistentry>
186 <varlistentry>
187 <term>DRIVER_PCI_DMA</term>
188 <listitem><para>
189 Driver is capable of PCI DMA. Deprecated.
190 </para></listitem>
191 </varlistentry>
192 <varlistentry>
193 <term>DRIVER_SG</term>
194 <listitem><para>
195 Driver can perform scatter/gather DMA. Deprecated.
196 </para></listitem>
197 </varlistentry>
198 <varlistentry>
199 <term>DRIVER_HAVE_DMA</term>
200 <listitem><para>Driver supports DMA. Deprecated.</para></listitem>
201 </varlistentry>
202 <varlistentry>
203 <term>DRIVER_HAVE_IRQ</term><term>DRIVER_IRQ_SHARED</term>
204 <listitem>
205 <para>
206 DRIVER_HAVE_IRQ indicates whether the driver has a IRQ
207 handler, DRIVER_IRQ_SHARED indicates whether the device &amp;
208 handler support shared IRQs (note that this is required of
209 PCI drivers).
210 </para>
211 </listitem>
212 </varlistentry>
213 <varlistentry>
214 <term>DRIVER_DMA_QUEUE</term>
215 <listitem>
216 <para>
217 If the driver queues DMA requests and completes them
218 asynchronously, this flag should be set. Deprecated.
219 </para>
220 </listitem>
221 </varlistentry>
222 <varlistentry>
223 <term>DRIVER_FB_DMA</term>
224 <listitem>
225 <para>
226 Driver supports DMA to/from the framebuffer. Deprecated.
227 </para>
228 </listitem>
229 </varlistentry>
230 <varlistentry>
231 <term>DRIVER_MODESET</term>
232 <listitem>
233 <para>
234 Driver supports mode setting interfaces.
235 </para>
236 </listitem>
237 </varlistentry>
238 </variablelist>
239 <para>
240 In this specific case, the driver requires AGP and supports
241 IRQs. DMA, as we'll see, is handled by device specific ioctls
242 in this case. It also supports the kernel mode setting APIs, though
243 unlike in the actual i915 driver source, this example unconditionally
244 exports KMS capability.
121 </para> 245 </para>
122 <para> 246 </sect1>
123 The <structname>drm_driver</structname> structure contains static 247
124 information that describes the driver and features it supports, and 248 <!-- Internals: driver load -->
125 pointers to methods that the DRM core will call to implement the DRM API. 249
126 We will first go through the <structname>drm_driver</structname> static 250 <sect1>
127 information fields, and will then describe individual operations in 251 <title>Driver load</title>
128 details as they get used in later sections. 252 <para>
253 In the previous section, we saw what a typical drm_driver
254 structure might look like. One of the more important fields in
255 the structure is the hook for the load function.
256 </para>
257 <programlisting>
258 static struct drm_driver driver = {
259 ...
260 .load = i915_driver_load,
261 ...
262 };
263 </programlisting>
264 <para>
265 The load function has many responsibilities: allocating a driver
266 private structure, specifying supported performance counters,
267 configuring the device (e.g. mapping registers &amp; command
268 buffers), initializing the memory manager, and setting up the
269 initial output configuration.
270 </para>
271 <para>
272 Note that the tasks performed at driver load time must not
273 conflict with DRM client requirements. For instance, if user
274 level mode setting drivers are in use, it would be problematic
275 to perform output discovery &amp; configuration at load time.
276 Likewise, if pre-memory management aware user level drivers are
277 in use, memory management and command buffer setup may need to
278 be omitted. These requirements are driver specific, and care
279 needs to be taken to keep both old and new applications and
280 libraries working. The i915 driver supports the "modeset"
281 module parameter to control whether advanced features are
282 enabled at load time or in legacy fashion. If compatibility is
283 a concern (e.g. with drivers converted over to the new interfaces
284 from the old ones), care must be taken to prevent incompatible
285 device initialization and control with the currently active
286 userspace drivers.
129 </para> 287 </para>
288
130 <sect2> 289 <sect2>
131 <title>Driver Information</title> 290 <title>Driver private &amp; performance counters</title>
132 <sect3>
133 <title>Driver Features</title>
134 <para>
135 Drivers inform the DRM core about their requirements and supported
136 features by setting appropriate flags in the
137 <structfield>driver_features</structfield> field. Since those flags
138 influence the DRM core behaviour since registration time, most of them
139 must be set to registering the <structname>drm_driver</structname>
140 instance.
141 </para>
142 <synopsis>u32 driver_features;</synopsis>
143 <variablelist>
144 <title>Driver Feature Flags</title>
145 <varlistentry>
146 <term>DRIVER_USE_AGP</term>
147 <listitem><para>
148 Driver uses AGP interface, the DRM core will manage AGP resources.
149 </para></listitem>
150 </varlistentry>
151 <varlistentry>
152 <term>DRIVER_REQUIRE_AGP</term>
153 <listitem><para>
154 Driver needs AGP interface to function. AGP initialization failure
155 will become a fatal error.
156 </para></listitem>
157 </varlistentry>
158 <varlistentry>
159 <term>DRIVER_USE_MTRR</term>
160 <listitem><para>
161 Driver uses MTRR interface for mapping memory, the DRM core will
162 manage MTRR resources. Deprecated.
163 </para></listitem>
164 </varlistentry>
165 <varlistentry>
166 <term>DRIVER_PCI_DMA</term>
167 <listitem><para>
168 Driver is capable of PCI DMA, mapping of PCI DMA buffers to
169 userspace will be enabled. Deprecated.
170 </para></listitem>
171 </varlistentry>
172 <varlistentry>
173 <term>DRIVER_SG</term>
174 <listitem><para>
175 Driver can perform scatter/gather DMA, allocation and mapping of
176 scatter/gather buffers will be enabled. Deprecated.
177 </para></listitem>
178 </varlistentry>
179 <varlistentry>
180 <term>DRIVER_HAVE_DMA</term>
181 <listitem><para>
182 Driver supports DMA, the userspace DMA API will be supported.
183 Deprecated.
184 </para></listitem>
185 </varlistentry>
186 <varlistentry>
187 <term>DRIVER_HAVE_IRQ</term><term>DRIVER_IRQ_SHARED</term>
188 <listitem><para>
189 DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler. The
190 DRM core will automatically register an interrupt handler when the
191 flag is set. DRIVER_IRQ_SHARED indicates whether the device &amp;
192 handler support shared IRQs (note that this is required of PCI
193 drivers).
194 </para></listitem>
195 </varlistentry>
196 <varlistentry>
197 <term>DRIVER_IRQ_VBL</term>
198 <listitem><para>Unused. Deprecated.</para></listitem>
199 </varlistentry>
200 <varlistentry>
201 <term>DRIVER_DMA_QUEUE</term>
202 <listitem><para>
203 Should be set if the driver queues DMA requests and completes them
204 asynchronously. Deprecated.
205 </para></listitem>
206 </varlistentry>
207 <varlistentry>
208 <term>DRIVER_FB_DMA</term>
209 <listitem><para>
210 Driver supports DMA to/from the framebuffer, mapping of frambuffer
211 DMA buffers to userspace will be supported. Deprecated.
212 </para></listitem>
213 </varlistentry>
214 <varlistentry>
215 <term>DRIVER_IRQ_VBL2</term>
216 <listitem><para>Unused. Deprecated.</para></listitem>
217 </varlistentry>
218 <varlistentry>
219 <term>DRIVER_GEM</term>
220 <listitem><para>
221 Driver use the GEM memory manager.
222 </para></listitem>
223 </varlistentry>
224 <varlistentry>
225 <term>DRIVER_MODESET</term>
226 <listitem><para>
227 Driver supports mode setting interfaces (KMS).
228 </para></listitem>
229 </varlistentry>
230 <varlistentry>
231 <term>DRIVER_PRIME</term>
232 <listitem><para>
233 Driver implements DRM PRIME buffer sharing.
234 </para></listitem>
235 </varlistentry>
236 </variablelist>
237 </sect3>
238 <sect3>
239 <title>Major, Minor and Patchlevel</title>
240 <synopsis>int major;
241int minor;
242int patchlevel;</synopsis>
243 <para>
244 The DRM core identifies driver versions by a major, minor and patch
245 level triplet. The information is printed to the kernel log at
246 initialization time and passed to userspace through the
247 DRM_IOCTL_VERSION ioctl.
248 </para>
249 <para>
250 The major and minor numbers are also used to verify the requested driver
251 API version passed to DRM_IOCTL_SET_VERSION. When the driver API changes
252 between minor versions, applications can call DRM_IOCTL_SET_VERSION to
253 select a specific version of the API. If the requested major isn't equal
254 to the driver major, or the requested minor is larger than the driver
255 minor, the DRM_IOCTL_SET_VERSION call will return an error. Otherwise
256 the driver's set_version() method will be called with the requested
257 version.
258 </para>
259 </sect3>
260 <sect3>
261 <title>Name, Description and Date</title>
262 <synopsis>char *name;
263char *desc;
264char *date;</synopsis>
265 <para>
266 The driver name is printed to the kernel log at initialization time,
267 used for IRQ registration and passed to userspace through
268 DRM_IOCTL_VERSION.
269 </para>
270 <para>
271 The driver description is a purely informative string passed to
272 userspace through the DRM_IOCTL_VERSION ioctl and otherwise unused by
273 the kernel.
274 </para>
275 <para>
276 The driver date, formatted as YYYYMMDD, is meant to identify the date of
277 the latest modification to the driver. However, as most drivers fail to
278 update it, its value is mostly useless. The DRM core prints it to the
279 kernel log at initialization time and passes it to userspace through the
280 DRM_IOCTL_VERSION ioctl.
281 </para>
282 </sect3>
283 </sect2>
284 <sect2>
285 <title>Driver Load</title>
286 <para> 291 <para>
287 The <methodname>load</methodname> method is the driver and device 292 The driver private hangs off the main drm_device structure and
288 initialization entry point. The method is responsible for allocating and 293 can be used for tracking various device specific bits of
289 initializing driver private data, specifying supported performance 294 information, like register offsets, command buffer status,
290 counters, performing resource allocation and mapping (e.g. acquiring 295 register state for suspend/resume, etc. At load time, a
291 clocks, mapping registers or allocating command buffers), initializing 296 driver can simply allocate one and set drm_device.dev_priv
292 the memory manager (<xref linkend="drm-memory-management"/>), installing 297 appropriately; at unload the driver can free it and set
293 the IRQ handler (<xref linkend="drm-irq-registration"/>), setting up 298 drm_device.dev_priv to NULL.
294 vertical blanking handling (<xref linkend="drm-vertical-blank"/>), mode
295 setting (<xref linkend="drm-mode-setting"/>) and initial output
296 configuration (<xref linkend="drm-kms-init"/>).
297 </para> 299 </para>
298 <note><para>
299 If compatibility is a concern (e.g. with drivers converted over from
300 User Mode Setting to Kernel Mode Setting), care must be taken to prevent
301 device initialization and control that is incompatible with currently
302 active userspace drivers. For instance, if user level mode setting
303 drivers are in use, it would be problematic to perform output discovery
304 &amp; configuration at load time. Likewise, if user-level drivers
305 unaware of memory management are in use, memory management and command
306 buffer setup may need to be omitted. These requirements are
307 driver-specific, and care needs to be taken to keep both old and new
308 applications and libraries working.
309 </para></note>
310 <synopsis>int (*load) (struct drm_device *, unsigned long flags);</synopsis>
311 <para> 300 <para>
312 The method takes two arguments, a pointer to the newly created 301 The DRM supports several counters which can be used for rough
313 <structname>drm_device</structname> and flags. The flags are used to 302 performance characterization. Note that the DRM stat counter
314 pass the <structfield>driver_data</structfield> field of the device id 303 system is not often used by applications, and supporting
315 corresponding to the device passed to <function>drm_*_init()</function>. 304 additional counters is completely optional.
316 Only PCI devices currently use this, USB and platform DRM drivers have 305 </para>
317 their <methodname>load</methodname> method called with flags to 0. 306 <para>
307 These interfaces are deprecated and should not be used. If performance
308 monitoring is desired, the developer should investigate and
309 potentially enhance the kernel perf and tracing infrastructure to export
310 GPU related performance information to performance monitoring
311 tools and applications.
318 </para> 312 </para>
319 <sect3>
320 <title>Driver Private &amp; Performance Counters</title>
321 <para>
322 The driver private hangs off the main
323 <structname>drm_device</structname> structure and can be used for
324 tracking various device-specific bits of information, like register
325 offsets, command buffer status, register state for suspend/resume, etc.
326 At load time, a driver may simply allocate one and set
327 <structname>drm_device</structname>.<structfield>dev_priv</structfield>
328 appropriately; it should be freed and
329 <structname>drm_device</structname>.<structfield>dev_priv</structfield>
330 set to NULL when the driver is unloaded.
331 </para>
332 <para>
333 DRM supports several counters which were used for rough performance
334 characterization. This stat counter system is deprecated and should not
335 be used. If performance monitoring is desired, the developer should
336 investigate and potentially enhance the kernel perf and tracing
337 infrastructure to export GPU related performance information for
338 consumption by performance monitoring tools and applications.
339 </para>
340 </sect3>
341 <sect3 id="drm-irq-registration">
342 <title>IRQ Registration</title>
343 <para>
344 The DRM core tries to facilitate IRQ handler registration and
345 unregistration by providing <function>drm_irq_install</function> and
346 <function>drm_irq_uninstall</function> functions. Those functions only
347 support a single interrupt per device.
348 </para>
349 <!--!Fdrivers/char/drm/drm_irq.c drm_irq_install-->
350 <para>
351 Both functions get the device IRQ by calling
352 <function>drm_dev_to_irq</function>. This inline function will call a
353 bus-specific operation to retrieve the IRQ number. For platform devices,
354 <function>platform_get_irq</function>(..., 0) is used to retrieve the
355 IRQ number.
356 </para>
357 <para>
358 <function>drm_irq_install</function> starts by calling the
359 <methodname>irq_preinstall</methodname> driver operation. The operation
360 is optional and must make sure that the interrupt will not get fired by
361 clearing all pending interrupt flags or disabling the interrupt.
362 </para>
363 <para>
364 The IRQ will then be requested by a call to
365 <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver
366 feature flag is set, a shared (IRQF_SHARED) IRQ handler will be
367 requested.
368 </para>
369 <para>
370 The IRQ handler function must be provided as the mandatory irq_handler
371 driver operation. It will get passed directly to
372 <function>request_irq</function> and thus has the same prototype as all
373 IRQ handlers. It will get called with a pointer to the DRM device as the
374 second argument.
375 </para>
376 <para>
377 Finally the function calls the optional
378 <methodname>irq_postinstall</methodname> driver operation. The operation
379 usually enables interrupts (excluding the vblank interrupt, which is
380 enabled separately), but drivers may choose to enable/disable interrupts
381 at a different time.
382 </para>
383 <para>
384 <function>drm_irq_uninstall</function> is similarly used to uninstall an
385 IRQ handler. It starts by waking up all processes waiting on a vblank
386 interrupt to make sure they don't hang, and then calls the optional
387 <methodname>irq_uninstall</methodname> driver operation. The operation
388 must disable all hardware interrupts. Finally the function frees the IRQ
389 by calling <function>free_irq</function>.
390 </para>
391 </sect3>
392 <sect3>
393 <title>Memory Manager Initialization</title>
394 <para>
395 Every DRM driver requires a memory manager which must be initialized at
396 load time. DRM currently contains two memory managers, the Translation
397 Table Manager (TTM) and the Graphics Execution Manager (GEM).
398 This document describes the use of the GEM memory manager only. See
399 <xref linkend="drm-memory-management"/> for details.
400 </para>
401 </sect3>
402 <sect3>
403 <title>Miscellaneous Device Configuration</title>
404 <para>
405 Another task that may be necessary for PCI devices during configuration
406 is mapping the video BIOS. On many devices, the VBIOS describes device
407 configuration, LCD panel timings (if any), and contains flags indicating
408 device state. Mapping the BIOS can be done using the pci_map_rom() call,
409 a convenience function that takes care of mapping the actual ROM,
410 whether it has been shadowed into memory (typically at address 0xc0000)
411 or exists on the PCI device in the ROM BAR. Note that after the ROM has
412 been mapped and any necessary information has been extracted, it should
413 be unmapped; on many devices, the ROM address decoder is shared with
414 other BARs, so leaving it mapped could cause undesired behaviour like
415 hangs or memory corruption.
416 <!--!Fdrivers/pci/rom.c pci_map_rom-->
417 </para>
418 </sect3>
419 </sect2> 313 </sect2>
420 </sect1>
421 314
422 <!-- Internals: memory management --> 315 <sect2>
316 <title>Configuring the device</title>
317 <para>
318 Obviously, device configuration will be device specific.
319 However, there are several common operations: finding a
320 device's PCI resources, mapping them, and potentially setting
321 up an IRQ handler.
322 </para>
323 <para>
324 Finding &amp; mapping resources is fairly straightforward. The
325 DRM wrapper functions, drm_get_resource_start() and
326 drm_get_resource_len() can be used to find BARs on the given
327 drm_device struct. Once those values have been retrieved, the
328 driver load function can call drm_addmap() to create a new
329 mapping for the BAR in question. Note you'll probably want a
330 drm_local_map_t in your driver private structure to track any
331 mappings you create.
332<!-- !Fdrivers/gpu/drm/drm_bufs.c drm_get_resource_* -->
333<!-- !Finclude/drm/drmP.h drm_local_map_t -->
334 </para>
335 <para>
336 if compatibility with other operating systems isn't a concern
337 (DRM drivers can run under various BSD variants and OpenSolaris),
338 native Linux calls can be used for the above, e.g. pci_resource_*
339 and iomap*/iounmap. See the Linux device driver book for more
340 info.
341 </para>
342 <para>
343 Once you have a register map, you can use the DRM_READn() and
344 DRM_WRITEn() macros to access the registers on your device, or
345 use driver specific versions to offset into your MMIO space
346 relative to a driver specific base pointer (see I915_READ for
347 example).
348 </para>
349 <para>
350 If your device supports interrupt generation, you may want to
351 setup an interrupt handler at driver load time as well. This
352 is done using the drm_irq_install() function. If your device
353 supports vertical blank interrupts, it should call
354 drm_vblank_init() to initialize the core vblank handling code before
355 enabling interrupts on your device. This ensures the vblank related
356 structures are allocated and allows the core to handle vblank events.
357 </para>
358<!--!Fdrivers/char/drm/drm_irq.c drm_irq_install-->
359 <para>
360 Once your interrupt handler is registered (it'll use your
361 drm_driver.irq_handler as the actual interrupt handling
362 function), you can safely enable interrupts on your device,
363 assuming any other state your interrupt handler uses is also
364 initialized.
365 </para>
366 <para>
367 Another task that may be necessary during configuration is
368 mapping the video BIOS. On many devices, the VBIOS describes
369 device configuration, LCD panel timings (if any), and contains
370 flags indicating device state. Mapping the BIOS can be done
371 using the pci_map_rom() call, a convenience function that
372 takes care of mapping the actual ROM, whether it has been
373 shadowed into memory (typically at address 0xc0000) or exists
374 on the PCI device in the ROM BAR. Note that once you've
375 mapped the ROM and extracted any necessary information, be
376 sure to unmap it; on many devices the ROM address decoder is
377 shared with other BARs, so leaving it mapped can cause
378 undesired behavior like hangs or memory corruption.
379<!--!Fdrivers/pci/rom.c pci_map_rom-->
380 </para>
381 </sect2>
423 382
424 <sect1 id="drm-memory-management">
425 <title>Memory management</title>
426 <para>
427 Modern Linux systems require large amount of graphics memory to store
428 frame buffers, textures, vertices and other graphics-related data. Given
429 the very dynamic nature of many of that data, managing graphics memory
430 efficiently is thus crucial for the graphics stack and plays a central
431 role in the DRM infrastructure.
432 </para>
433 <para>
434 The DRM core includes two memory managers, namely Translation Table Maps
435 (TTM) and Graphics Execution Manager (GEM). TTM was the first DRM memory
436 manager to be developed and tried to be a one-size-fits-them all
437 solution. It provides a single userspace API to accomodate the need of
438 all hardware, supporting both Unified Memory Architecture (UMA) devices
439 and devices with dedicated video RAM (i.e. most discrete video cards).
440 This resulted in a large, complex piece of code that turned out to be
441 hard to use for driver development.
442 </para>
443 <para>
444 GEM started as an Intel-sponsored project in reaction to TTM's
445 complexity. Its design philosophy is completely different: instead of
446 providing a solution to every graphics memory-related problems, GEM
447 identified common code between drivers and created a support library to
448 share it. GEM has simpler initialization and execution requirements than
449 TTM, but has no video RAM management capabitilies and is thus limited to
450 UMA devices.
451 </para>
452 <sect2> 383 <sect2>
453 <title>The Translation Table Manager (TTM)</title> 384 <title>Memory manager initialization</title>
454 <para> 385 <para>
455 TTM design background and information belongs here. 386 In order to allocate command buffers, cursor memory, scanout
387 buffers, etc., as well as support the latest features provided
388 by packages like Mesa and the X.Org X server, your driver
389 should support a memory manager.
390 </para>
391 <para>
392 If your driver supports memory management (it should!), you'll
393 need to set that up at load time as well. How you initialize
394 it depends on which memory manager you're using, TTM or GEM.
456 </para> 395 </para>
457 <sect3> 396 <sect3>
458 <title>TTM initialization</title> 397 <title>TTM initialization</title>
459 <warning><para>This section is outdated.</para></warning> 398 <para>
460 <para> 399 TTM (for Translation Table Manager) manages video memory and
461 Drivers wishing to support TTM must fill out a drm_bo_driver 400 aperture space for graphics devices. TTM supports both UMA devices
462 structure. The structure contains several fields with function 401 and devices with dedicated video RAM (VRAM), i.e. most discrete
463 pointers for initializing the TTM, allocating and freeing memory, 402 graphics devices. If your device has dedicated RAM, supporting
464 waiting for command completion and fence synchronization, and memory 403 TTM is desirable. TTM also integrates tightly with your
465 migration. See the radeon_ttm.c file for an example of usage. 404 driver specific buffer execution function. See the radeon
405 driver for examples.
406 </para>
407 <para>
408 The core TTM structure is the ttm_bo_driver struct. It contains
409 several fields with function pointers for initializing the TTM,
410 allocating and freeing memory, waiting for command completion
411 and fence synchronization, and memory migration. See the
412 radeon_ttm.c file for an example of usage.
466 </para> 413 </para>
467 <para> 414 <para>
468 The ttm_global_reference structure is made up of several fields: 415 The ttm_global_reference structure is made up of several fields:
@@ -482,1089 +429,92 @@ char *date;</synopsis>
482 created by the memory manager at runtime. Your global TTM should 429 created by the memory manager at runtime. Your global TTM should
483 have a type of TTM_GLOBAL_TTM_MEM. The size field for the global 430 have a type of TTM_GLOBAL_TTM_MEM. The size field for the global
484 object should be sizeof(struct ttm_mem_global), and the init and 431 object should be sizeof(struct ttm_mem_global), and the init and
485 release hooks should point at your driver-specific init and 432 release hooks should point at your driver specific init and
486 release routines, which probably eventually call 433 release routines, which will probably eventually call
487 ttm_mem_global_init and ttm_mem_global_release, respectively. 434 ttm_mem_global_init and ttm_mem_global_release respectively.
488 </para> 435 </para>
489 <para> 436 <para>
490 Once your global TTM accounting structure is set up and initialized 437 Once your global TTM accounting structure is set up and initialized
491 by calling ttm_global_item_ref() on it, 438 (done by calling ttm_global_item_ref on the global object you
492 you need to create a buffer object TTM to 439 just created), you'll need to create a buffer object TTM to
493 provide a pool for buffer object allocation by clients and the 440 provide a pool for buffer object allocation by clients and the
494 kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, 441 kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO,
495 and its size should be sizeof(struct ttm_bo_global). Again, 442 and its size should be sizeof(struct ttm_bo_global). Again,
496 driver-specific init and release functions may be provided, 443 driver specific init and release functions can be provided,
497 likely eventually calling ttm_bo_global_init() and 444 likely eventually calling ttm_bo_global_init and
498 ttm_bo_global_release(), respectively. Also, like the previous 445 ttm_bo_global_release, respectively. Also like the previous
499 object, ttm_global_item_ref() is used to create an initial reference 446 object, ttm_global_item_ref is used to create an initial reference
500 count for the TTM, which will call your initialization function. 447 count for the TTM, which will call your initialization function.
501 </para> 448 </para>
502 </sect3> 449 </sect3>
503 </sect2>
504 <sect2 id="drm-gem">
505 <title>The Graphics Execution Manager (GEM)</title>
506 <para>
507 The GEM design approach has resulted in a memory manager that doesn't
508 provide full coverage of all (or even all common) use cases in its
509 userspace or kernel API. GEM exposes a set of standard memory-related
510 operations to userspace and a set of helper functions to drivers, and let
511 drivers implement hardware-specific operations with their own private API.
512 </para>
513 <para>
514 The GEM userspace API is described in the
515 <ulink url="http://lwn.net/Articles/283798/"><citetitle>GEM - the Graphics
516 Execution Manager</citetitle></ulink> article on LWN. While slightly
517 outdated, the document provides a good overview of the GEM API principles.
518 Buffer allocation and read and write operations, described as part of the
519 common GEM API, are currently implemented using driver-specific ioctls.
520 </para>
521 <para>
522 GEM is data-agnostic. It manages abstract buffer objects without knowing
523 what individual buffers contain. APIs that require knowledge of buffer
524 contents or purpose, such as buffer allocation or synchronization
525 primitives, are thus outside of the scope of GEM and must be implemented
526 using driver-specific ioctls.
527 </para>
528 <para>
529 On a fundamental level, GEM involves several operations:
530 <itemizedlist>
531 <listitem>Memory allocation and freeing</listitem>
532 <listitem>Command execution</listitem>
533 <listitem>Aperture management at command execution time</listitem>
534 </itemizedlist>
535 Buffer object allocation is relatively straightforward and largely
536 provided by Linux's shmem layer, which provides memory to back each
537 object.
538 </para>
539 <para>
540 Device-specific operations, such as command execution, pinning, buffer
541 read &amp; write, mapping, and domain ownership transfers are left to
542 driver-specific ioctls.
543 </para>
544 <sect3>
545 <title>GEM Initialization</title>
546 <para>
547 Drivers that use GEM must set the DRIVER_GEM bit in the struct
548 <structname>drm_driver</structname>
549 <structfield>driver_features</structfield> field. The DRM core will
550 then automatically initialize the GEM core before calling the
551 <methodname>load</methodname> operation. Behind the scene, this will
552 create a DRM Memory Manager object which provides an address space
553 pool for object allocation.
554 </para>
555 <para>
556 In a KMS configuration, drivers need to allocate and initialize a
557 command ring buffer following core GEM initialization if required by
558 the hardware. UMA devices usually have what is called a "stolen"
559 memory region, which provides space for the initial framebuffer and
560 large, contiguous memory regions required by the device. This space is
561 typically not managed by GEM, and must be initialized separately into
562 its own DRM MM object.
563 </para>
564 </sect3>
565 <sect3>
566 <title>GEM Objects Creation</title>
567 <para>
568 GEM splits creation of GEM objects and allocation of the memory that
569 backs them in two distinct operations.
570 </para>
571 <para>
572 GEM objects are represented by an instance of struct
573 <structname>drm_gem_object</structname>. Drivers usually need to extend
574 GEM objects with private information and thus create a driver-specific
575 GEM object structure type that embeds an instance of struct
576 <structname>drm_gem_object</structname>.
577 </para>
578 <para>
579 To create a GEM object, a driver allocates memory for an instance of its
580 specific GEM object type and initializes the embedded struct
581 <structname>drm_gem_object</structname> with a call to
582 <function>drm_gem_object_init</function>. The function takes a pointer to
583 the DRM device, a pointer to the GEM object and the buffer object size
584 in bytes.
585 </para>
586 <para>
587 GEM uses shmem to allocate anonymous pageable memory.
588 <function>drm_gem_object_init</function> will create an shmfs file of
589 the requested size and store it into the struct
590 <structname>drm_gem_object</structname> <structfield>filp</structfield>
591 field. The memory is used as either main storage for the object when the
592 graphics hardware uses system memory directly or as a backing store
593 otherwise.
594 </para>
595 <para>
596 Drivers are responsible for the actual physical pages allocation by
597 calling <function>shmem_read_mapping_page_gfp</function> for each page.
598 Note that they can decide to allocate pages when initializing the GEM
599 object, or to delay allocation until the memory is needed (for instance
600 when a page fault occurs as a result of a userspace memory access or
601 when the driver needs to start a DMA transfer involving the memory).
602 </para>
603 <para>
604 Anonymous pageable memory allocation is not always desired, for instance
605 when the hardware requires physically contiguous system memory as is
606 often the case in embedded devices. Drivers can create GEM objects with
607 no shmfs backing (called private GEM objects) by initializing them with
608 a call to <function>drm_gem_private_object_init</function> instead of
609 <function>drm_gem_object_init</function>. Storage for private GEM
610 objects must be managed by drivers.
611 </para>
612 <para>
613 Drivers that do not need to extend GEM objects with private information
614 can call the <function>drm_gem_object_alloc</function> function to
615 allocate and initialize a struct <structname>drm_gem_object</structname>
616 instance. The GEM core will call the optional driver
617 <methodname>gem_init_object</methodname> operation after initializing
618 the GEM object with <function>drm_gem_object_init</function>.
619 <synopsis>int (*gem_init_object) (struct drm_gem_object *obj);</synopsis>
620 </para>
621 <para>
622 No alloc-and-init function exists for private GEM objects.
623 </para>
624 </sect3>
625 <sect3>
626 <title>GEM Objects Lifetime</title>
627 <para>
628 All GEM objects are reference-counted by the GEM core. References can be
629 acquired and release by <function>calling drm_gem_object_reference</function>
630 and <function>drm_gem_object_unreference</function> respectively. The
631 caller must hold the <structname>drm_device</structname>
632 <structfield>struct_mutex</structfield> lock. As a convenience, GEM
633 provides the <function>drm_gem_object_reference_unlocked</function> and
634 <function>drm_gem_object_unreference_unlocked</function> functions that
635 can be called without holding the lock.
636 </para>
637 <para>
638 When the last reference to a GEM object is released the GEM core calls
639 the <structname>drm_driver</structname>
640 <methodname>gem_free_object</methodname> operation. That operation is
641 mandatory for GEM-enabled drivers and must free the GEM object and all
642 associated resources.
643 </para>
644 <para>
645 <synopsis>void (*gem_free_object) (struct drm_gem_object *obj);</synopsis>
646 Drivers are responsible for freeing all GEM object resources, including
647 the resources created by the GEM core. If an mmap offset has been
648 created for the object (in which case
649 <structname>drm_gem_object</structname>::<structfield>map_list</structfield>::<structfield>map</structfield>
650 is not NULL) it must be freed by a call to
651 <function>drm_gem_free_mmap_offset</function>. The shmfs backing store
652 must be released by calling <function>drm_gem_object_release</function>
653 (that function can safely be called if no shmfs backing store has been
654 created).
655 </para>
656 </sect3>
657 <sect3>
658 <title>GEM Objects Naming</title>
659 <para>
660 Communication between userspace and the kernel refers to GEM objects
661 using local handles, global names or, more recently, file descriptors.
662 All of those are 32-bit integer values; the usual Linux kernel limits
663 apply to the file descriptors.
664 </para>
665 <para>
666 GEM handles are local to a DRM file. Applications get a handle to a GEM
667 object through a driver-specific ioctl, and can use that handle to refer
668 to the GEM object in other standard or driver-specific ioctls. Closing a
669 DRM file handle frees all its GEM handles and dereferences the
670 associated GEM objects.
671 </para>
672 <para>
673 To create a handle for a GEM object drivers call
674 <function>drm_gem_handle_create</function>. The function takes a pointer
675 to the DRM file and the GEM object and returns a locally unique handle.
676 When the handle is no longer needed drivers delete it with a call to
677 <function>drm_gem_handle_delete</function>. Finally the GEM object
678 associated with a handle can be retrieved by a call to
679 <function>drm_gem_object_lookup</function>.
680 </para>
681 <para>
682 Handles don't take ownership of GEM objects, they only take a reference
683 to the object that will be dropped when the handle is destroyed. To
684 avoid leaking GEM objects, drivers must make sure they drop the
685 reference(s) they own (such as the initial reference taken at object
686 creation time) as appropriate, without any special consideration for the
687 handle. For example, in the particular case of combined GEM object and
688 handle creation in the implementation of the
689 <methodname>dumb_create</methodname> operation, drivers must drop the
690 initial reference to the GEM object before returning the handle.
691 </para>
692 <para>
693 GEM names are similar in purpose to handles but are not local to DRM
694 files. They can be passed between processes to reference a GEM object
695 globally. Names can't be used directly to refer to objects in the DRM
696 API, applications must convert handles to names and names to handles
697 using the DRM_IOCTL_GEM_FLINK and DRM_IOCTL_GEM_OPEN ioctls
698 respectively. The conversion is handled by the DRM core without any
699 driver-specific support.
700 </para>
701 <para>
702 Similar to global names, GEM file descriptors are also used to share GEM
703 objects across processes. They offer additional security: as file
704 descriptors must be explictly sent over UNIX domain sockets to be shared
705 between applications, they can't be guessed like the globally unique GEM
706 names.
707 </para>
708 <para>
709 Drivers that support GEM file descriptors, also known as the DRM PRIME
710 API, must set the DRIVER_PRIME bit in the struct
711 <structname>drm_driver</structname>
712 <structfield>driver_features</structfield> field, and implement the
713 <methodname>prime_handle_to_fd</methodname> and
714 <methodname>prime_fd_to_handle</methodname> operations.
715 </para>
716 <para>
717 <synopsis>int (*prime_handle_to_fd)(struct drm_device *dev,
718 struct drm_file *file_priv, uint32_t handle,
719 uint32_t flags, int *prime_fd);
720 int (*prime_fd_to_handle)(struct drm_device *dev,
721 struct drm_file *file_priv, int prime_fd,
722 uint32_t *handle);</synopsis>
723 Those two operations convert a handle to a PRIME file descriptor and
724 vice versa. Drivers must use the kernel dma-buf buffer sharing framework
725 to manage the PRIME file descriptors.
726 </para>
727 <para>
728 While non-GEM drivers must implement the operations themselves, GEM
729 drivers must use the <function>drm_gem_prime_handle_to_fd</function>
730 and <function>drm_gem_prime_fd_to_handle</function> helper functions.
731 Those helpers rely on the driver
732 <methodname>gem_prime_export</methodname> and
733 <methodname>gem_prime_import</methodname> operations to create a dma-buf
734 instance from a GEM object (dma-buf exporter role) and to create a GEM
735 object from a dma-buf instance (dma-buf importer role).
736 </para>
737 <para>
738 <synopsis>struct dma_buf * (*gem_prime_export)(struct drm_device *dev,
739 struct drm_gem_object *obj,
740 int flags);
741 struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev,
742 struct dma_buf *dma_buf);</synopsis>
743 These two operations are mandatory for GEM drivers that support DRM
744 PRIME.
745 </para>
746 </sect3>
747 <sect3 id="drm-gem-objects-mapping">
748 <title>GEM Objects Mapping</title>
749 <para>
750 Because mapping operations are fairly heavyweight GEM favours
751 read/write-like access to buffers, implemented through driver-specific
752 ioctls, over mapping buffers to userspace. However, when random access
753 to the buffer is needed (to perform software rendering for instance),
754 direct access to the object can be more efficient.
755 </para>
756 <para>
757 The mmap system call can't be used directly to map GEM objects, as they
758 don't have their own file handle. Two alternative methods currently
759 co-exist to map GEM objects to userspace. The first method uses a
760 driver-specific ioctl to perform the mapping operation, calling
761 <function>do_mmap</function> under the hood. This is often considered
762 dubious, seems to be discouraged for new GEM-enabled drivers, and will
763 thus not be described here.
764 </para>
765 <para>
766 The second method uses the mmap system call on the DRM file handle.
767 <synopsis>void *mmap(void *addr, size_t length, int prot, int flags, int fd,
768 off_t offset);</synopsis>
769 DRM identifies the GEM object to be mapped by a fake offset passed
770 through the mmap offset argument. Prior to being mapped, a GEM object
771 must thus be associated with a fake offset. To do so, drivers must call
772 <function>drm_gem_create_mmap_offset</function> on the object. The
773 function allocates a fake offset range from a pool and stores the
774 offset divided by PAGE_SIZE in
775 <literal>obj-&gt;map_list.hash.key</literal>. Care must be taken not to
776 call <function>drm_gem_create_mmap_offset</function> if a fake offset
777 has already been allocated for the object. This can be tested by
778 <literal>obj-&gt;map_list.map</literal> being non-NULL.
779 </para>
780 <para>
781 Once allocated, the fake offset value
782 (<literal>obj-&gt;map_list.hash.key &lt;&lt; PAGE_SHIFT</literal>)
783 must be passed to the application in a driver-specific way and can then
784 be used as the mmap offset argument.
785 </para>
786 <para>
787 The GEM core provides a helper method <function>drm_gem_mmap</function>
788 to handle object mapping. The method can be set directly as the mmap
789 file operation handler. It will look up the GEM object based on the
790 offset value and set the VMA operations to the
791 <structname>drm_driver</structname> <structfield>gem_vm_ops</structfield>
792 field. Note that <function>drm_gem_mmap</function> doesn't map memory to
793 userspace, but relies on the driver-provided fault handler to map pages
794 individually.
795 </para>
796 <para>
797 To use <function>drm_gem_mmap</function>, drivers must fill the struct
798 <structname>drm_driver</structname> <structfield>gem_vm_ops</structfield>
799 field with a pointer to VM operations.
800 </para>
801 <para>
802 <synopsis>struct vm_operations_struct *gem_vm_ops
803
804 struct vm_operations_struct {
805 void (*open)(struct vm_area_struct * area);
806 void (*close)(struct vm_area_struct * area);
807 int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
808 };</synopsis>
809 </para>
810 <para>
811 The <methodname>open</methodname> and <methodname>close</methodname>
812 operations must update the GEM object reference count. Drivers can use
813 the <function>drm_gem_vm_open</function> and
814 <function>drm_gem_vm_close</function> helper functions directly as open
815 and close handlers.
816 </para>
817 <para>
818 The fault operation handler is responsible for mapping individual pages
819 to userspace when a page fault occurs. Depending on the memory
820 allocation scheme, drivers can allocate pages at fault time, or can
821 decide to allocate memory for the GEM object at the time the object is
822 created.
823 </para>
824 <para>
825 Drivers that want to map the GEM object upfront instead of handling page
826 faults can implement their own mmap file operation handler.
827 </para>
828 </sect3>
829 <sect3>
830 <title>Dumb GEM Objects</title>
831 <para>
832 The GEM API doesn't standardize GEM objects creation and leaves it to
833 driver-specific ioctls. While not an issue for full-fledged graphics
834 stacks that include device-specific userspace components (in libdrm for
835 instance), this limit makes DRM-based early boot graphics unnecessarily
836 complex.
837 </para>
838 <para>
839 Dumb GEM objects partly alleviate the problem by providing a standard
840 API to create dumb buffers suitable for scanout, which can then be used
841 to create KMS frame buffers.
842 </para>
843 <para>
844 To support dumb GEM objects drivers must implement the
845 <methodname>dumb_create</methodname>,
846 <methodname>dumb_destroy</methodname> and
847 <methodname>dumb_map_offset</methodname> operations.
848 </para>
849 <itemizedlist>
850 <listitem>
851 <synopsis>int (*dumb_create)(struct drm_file *file_priv, struct drm_device *dev,
852 struct drm_mode_create_dumb *args);</synopsis>
853 <para>
854 The <methodname>dumb_create</methodname> operation creates a GEM
855 object suitable for scanout based on the width, height and depth
856 from the struct <structname>drm_mode_create_dumb</structname>
857 argument. It fills the argument's <structfield>handle</structfield>,
858 <structfield>pitch</structfield> and <structfield>size</structfield>
859 fields with a handle for the newly created GEM object and its line
860 pitch and size in bytes.
861 </para>
862 </listitem>
863 <listitem>
864 <synopsis>int (*dumb_destroy)(struct drm_file *file_priv, struct drm_device *dev,
865 uint32_t handle);</synopsis>
866 <para>
867 The <methodname>dumb_destroy</methodname> operation destroys a dumb
868 GEM object created by <methodname>dumb_create</methodname>.
869 </para>
870 </listitem>
871 <listitem>
872 <synopsis>int (*dumb_map_offset)(struct drm_file *file_priv, struct drm_device *dev,
873 uint32_t handle, uint64_t *offset);</synopsis>
874 <para>
875 The <methodname>dumb_map_offset</methodname> operation associates an
876 mmap fake offset with the GEM object given by the handle and returns
877 it. Drivers must use the
878 <function>drm_gem_create_mmap_offset</function> function to
879 associate the fake offset as described in
880 <xref linkend="drm-gem-objects-mapping"/>.
881 </para>
882 </listitem>
883 </itemizedlist>
884 </sect3>
885 <sect3>
886 <title>Memory Coherency</title>
887 <para>
888 When mapped to the device or used in a command buffer, backing pages
889 for an object are flushed to memory and marked write combined so as to
890 be coherent with the GPU. Likewise, if the CPU accesses an object
891 after the GPU has finished rendering to the object, then the object
892 must be made coherent with the CPU's view of memory, usually involving
893 GPU cache flushing of various kinds. This core CPU&lt;-&gt;GPU
894 coherency management is provided by a device-specific ioctl, which
895 evaluates an object's current domain and performs any necessary
896 flushing or synchronization to put the object into the desired
897 coherency domain (note that the object may be busy, i.e. an active
898 render target; in that case, setting the domain blocks the client and
899 waits for rendering to complete before performing any necessary
900 flushing operations).
901 </para>
902 </sect3>
903 <sect3> 450 <sect3>
904 <title>Command Execution</title> 451 <title>GEM initialization</title>
905 <para> 452 <para>
906 Perhaps the most important GEM function for GPU devices is providing a 453 GEM is an alternative to TTM, designed specifically for UMA
907 command execution interface to clients. Client programs construct 454 devices. It has simpler initialization and execution requirements
908 command buffers containing references to previously allocated memory 455 than TTM, but has no VRAM management capability. Core GEM
909 objects, and then submit them to GEM. At that point, GEM takes care to 456 initialization is comprised of a basic drm_mm_init call to create
910 bind all the objects into the GTT, execute the buffer, and provide 457 a GTT DRM MM object, which provides an address space pool for
911 necessary synchronization between clients accessing the same buffers. 458 object allocation. In a KMS configuration, the driver will
912 This often involves evicting some objects from the GTT and re-binding 459 need to allocate and initialize a command ring buffer following
913 others (a fairly expensive operation), and providing relocation 460 basic GEM initialization. Most UMA devices have a so-called
914 support which hides fixed GTT offsets from clients. Clients must take 461 "stolen" memory region, which provides space for the initial
915 care not to submit command buffers that reference more objects than 462 framebuffer and large, contiguous memory regions required by the
916 can fit in the GTT; otherwise, GEM will reject them and no rendering 463 device. This space is not typically managed by GEM, and must
917 will occur. Similarly, if several objects in the buffer require fence 464 be initialized separately into its own DRM MM object.
918 registers to be allocated for correct rendering (e.g. 2D blits on 465 </para>
919 pre-965 chips), care must be taken not to require more fence registers 466 <para>
920 than are available to the client. Such resource management should be 467 Initialization will be driver specific, and will depend on
921 abstracted from the client in libdrm. 468 the architecture of the device. In the case of Intel
922 </para> 469 integrated graphics chips like 965GM, GEM initialization can
923 </sect3> 470 be done by calling the internal GEM init function,
924 </sect2> 471 i915_gem_do_init(). Since the 965GM is a UMA device
925 </sect1> 472 (i.e. it doesn't have dedicated VRAM), GEM will manage
926 473 making regular RAM available for GPU operations. Memory set
927 <!-- Internals: mode setting --> 474 aside by the BIOS (called "stolen" memory by the i915
928 475 driver) will be managed by the DRM memrange allocator; the
929 <sect1 id="drm-mode-setting"> 476 rest of the aperture will be managed by GEM.
930 <title>Mode Setting</title> 477 <programlisting>
931 <para> 478 /* Basic memrange allocator for stolen space (aka vram) */
932 Drivers must initialize the mode setting core by calling 479 drm_memrange_init(&amp;dev_priv->vram, 0, prealloc_size);
933 <function>drm_mode_config_init</function> on the DRM device. The function 480 /* Let GEM Manage from end of prealloc space to end of aperture */
934 initializes the <structname>drm_device</structname> 481 i915_gem_do_init(dev, prealloc_size, agp_size);
935 <structfield>mode_config</structfield> field and never fails. Once done, 482 </programlisting>
936 mode configuration must be setup by initializing the following fields. 483<!--!Edrivers/char/drm/drm_memrange.c-->
937 </para> 484 </para>
938 <itemizedlist> 485 <para>
939 <listitem> 486 Once the memory manager has been set up, we can allocate the
940 <synopsis>int min_width, min_height; 487 command buffer. In the i915 case, this is also done with a
941int max_width, max_height;</synopsis> 488 GEM function, i915_gem_init_ringbuffer().
942 <para>
943 Minimum and maximum width and height of the frame buffers in pixel
944 units.
945 </para> 489 </para>
946 </listitem>
947 <listitem>
948 <synopsis>struct drm_mode_config_funcs *funcs;</synopsis>
949 <para>Mode setting functions.</para>
950 </listitem>
951 </itemizedlist>
952 <sect2>
953 <title>Frame Buffer Creation</title>
954 <synopsis>struct drm_framebuffer *(*fb_create)(struct drm_device *dev,
955 struct drm_file *file_priv,
956 struct drm_mode_fb_cmd2 *mode_cmd);</synopsis>
957 <para>
958 Frame buffers are abstract memory objects that provide a source of
959 pixels to scanout to a CRTC. Applications explicitly request the
960 creation of frame buffers through the DRM_IOCTL_MODE_ADDFB(2) ioctls and
961 receive an opaque handle that can be passed to the KMS CRTC control,
962 plane configuration and page flip functions.
963 </para>
964 <para>
965 Frame buffers rely on the underneath memory manager for low-level memory
966 operations. When creating a frame buffer applications pass a memory
967 handle (or a list of memory handles for multi-planar formats) through
968 the <parameter>drm_mode_fb_cmd2</parameter> argument. This document
969 assumes that the driver uses GEM, those handles thus reference GEM
970 objects.
971 </para>
972 <para>
973 Drivers must first validate the requested frame buffer parameters passed
974 through the mode_cmd argument. In particular this is where invalid
975 sizes, pixel formats or pitches can be caught.
976 </para>
977 <para>
978 If the parameters are deemed valid, drivers then create, initialize and
979 return an instance of struct <structname>drm_framebuffer</structname>.
980 If desired the instance can be embedded in a larger driver-specific
981 structure. The new instance is initialized with a call to
982 <function>drm_framebuffer_init</function> which takes a pointer to DRM
983 frame buffer operations (struct
984 <structname>drm_framebuffer_funcs</structname>). Frame buffer operations are
985 <itemizedlist>
986 <listitem>
987 <synopsis>int (*create_handle)(struct drm_framebuffer *fb,
988 struct drm_file *file_priv, unsigned int *handle);</synopsis>
989 <para>
990 Create a handle to the frame buffer underlying memory object. If
991 the frame buffer uses a multi-plane format, the handle will
992 reference the memory object associated with the first plane.
993 </para>
994 <para>
995 Drivers call <function>drm_gem_handle_create</function> to create
996 the handle.
997 </para>
998 </listitem>
999 <listitem>
1000 <synopsis>void (*destroy)(struct drm_framebuffer *framebuffer);</synopsis>
1001 <para>
1002 Destroy the frame buffer object and frees all associated
1003 resources. Drivers must call
1004 <function>drm_framebuffer_cleanup</function> to free resources
1005 allocated by the DRM core for the frame buffer object, and must
1006 make sure to unreference all memory objects associated with the
1007 frame buffer. Handles created by the
1008 <methodname>create_handle</methodname> operation are released by
1009 the DRM core.
1010 </para>
1011 </listitem>
1012 <listitem>
1013 <synopsis>int (*dirty)(struct drm_framebuffer *framebuffer,
1014 struct drm_file *file_priv, unsigned flags, unsigned color,
1015 struct drm_clip_rect *clips, unsigned num_clips);</synopsis>
1016 <para>
1017 This optional operation notifies the driver that a region of the
1018 frame buffer has changed in response to a DRM_IOCTL_MODE_DIRTYFB
1019 ioctl call.
1020 </para>
1021 </listitem>
1022 </itemizedlist>
1023 </para>
1024 <para>
1025 After initializing the <structname>drm_framebuffer</structname>
1026 instance drivers must fill its <structfield>width</structfield>,
1027 <structfield>height</structfield>, <structfield>pitches</structfield>,
1028 <structfield>offsets</structfield>, <structfield>depth</structfield>,
1029 <structfield>bits_per_pixel</structfield> and
1030 <structfield>pixel_format</structfield> fields from the values passed
1031 through the <parameter>drm_mode_fb_cmd2</parameter> argument. They
1032 should call the <function>drm_helper_mode_fill_fb_struct</function>
1033 helper function to do so.
1034 </para>
1035 </sect2>
1036 <sect2>
1037 <title>Output Polling</title>
1038 <synopsis>void (*output_poll_changed)(struct drm_device *dev);</synopsis>
1039 <para>
1040 This operation notifies the driver that the status of one or more
1041 connectors has changed. Drivers that use the fb helper can just call the
1042 <function>drm_fb_helper_hotplug_event</function> function to handle this
1043 operation.
1044 </para>
1045 </sect2>
1046 </sect1>
1047
1048 <!-- Internals: kms initialization and cleanup -->
1049
1050 <sect1 id="drm-kms-init">
1051 <title>KMS Initialization and Cleanup</title>
1052 <para>
1053 A KMS device is abstracted and exposed as a set of planes, CRTCs, encoders
1054 and connectors. KMS drivers must thus create and initialize all those
1055 objects at load time after initializing mode setting.
1056 </para>
1057 <sect2>
1058 <title>CRTCs (struct <structname>drm_crtc</structname>)</title>
1059 <para>
1060 A CRTC is an abstraction representing a part of the chip that contains a
1061 pointer to a scanout buffer. Therefore, the number of CRTCs available
1062 determines how many independent scanout buffers can be active at any
1063 given time. The CRTC structure contains several fields to support this:
1064 a pointer to some video memory (abstracted as a frame buffer object), a
1065 display mode, and an (x, y) offset into the video memory to support
1066 panning or configurations where one piece of video memory spans multiple
1067 CRTCs.
1068 </para>
1069 <sect3>
1070 <title>CRTC Initialization</title>
1071 <para>
1072 A KMS device must create and register at least one struct
1073 <structname>drm_crtc</structname> instance. The instance is allocated
1074 and zeroed by the driver, possibly as part of a larger structure, and
1075 registered with a call to <function>drm_crtc_init</function> with a
1076 pointer to CRTC functions.
1077 </para>
1078 </sect3>
1079 <sect3>
1080 <title>CRTC Operations</title>
1081 <sect4>
1082 <title>Set Configuration</title>
1083 <synopsis>int (*set_config)(struct drm_mode_set *set);</synopsis>
1084 <para>
1085 Apply a new CRTC configuration to the device. The configuration
1086 specifies a CRTC, a frame buffer to scan out from, a (x,y) position in
1087 the frame buffer, a display mode and an array of connectors to drive
1088 with the CRTC if possible.
1089 </para>
1090 <para>
1091 If the frame buffer specified in the configuration is NULL, the driver
1092 must detach all encoders connected to the CRTC and all connectors
1093 attached to those encoders and disable them.
1094 </para>
1095 <para>
1096 This operation is called with the mode config lock held.
1097 </para>
1098 <note><para>
1099 FIXME: How should set_config interact with DPMS? If the CRTC is
1100 suspended, should it be resumed?
1101 </para></note>
1102 </sect4>
1103 <sect4>
1104 <title>Page Flipping</title>
1105 <synopsis>int (*page_flip)(struct drm_crtc *crtc, struct drm_framebuffer *fb,
1106 struct drm_pending_vblank_event *event);</synopsis>
1107 <para>
1108 Schedule a page flip to the given frame buffer for the CRTC. This
1109 operation is called with the mode config mutex held.
1110 </para>
1111 <para>
1112 Page flipping is a synchronization mechanism that replaces the frame
1113 buffer being scanned out by the CRTC with a new frame buffer during
1114 vertical blanking, avoiding tearing. When an application requests a page
1115 flip the DRM core verifies that the new frame buffer is large enough to
1116 be scanned out by the CRTC in the currently configured mode and then
1117 calls the CRTC <methodname>page_flip</methodname> operation with a
1118 pointer to the new frame buffer.
1119 </para>
1120 <para>
1121 The <methodname>page_flip</methodname> operation schedules a page flip.
1122 Once any pending rendering targetting the new frame buffer has
1123 completed, the CRTC will be reprogrammed to display that frame buffer
1124 after the next vertical refresh. The operation must return immediately
1125 without waiting for rendering or page flip to complete and must block
1126 any new rendering to the frame buffer until the page flip completes.
1127 </para>
1128 <para>
1129 If a page flip is already pending, the
1130 <methodname>page_flip</methodname> operation must return
1131 -<errorname>EBUSY</errorname>.
1132 </para>
1133 <para>
1134 To synchronize page flip to vertical blanking the driver will likely
1135 need to enable vertical blanking interrupts. It should call
1136 <function>drm_vblank_get</function> for that purpose, and call
1137 <function>drm_vblank_put</function> after the page flip completes.
1138 </para>
1139 <para>
1140 If the application has requested to be notified when page flip completes
1141 the <methodname>page_flip</methodname> operation will be called with a
1142 non-NULL <parameter>event</parameter> argument pointing to a
1143 <structname>drm_pending_vblank_event</structname> instance. Upon page
1144 flip completion the driver must call <methodname>drm_send_vblank_event</methodname>
1145 to fill in the event and send to wake up any waiting processes.
1146 This can be performed with
1147 <programlisting><![CDATA[
1148 spin_lock_irqsave(&dev->event_lock, flags);
1149 ...
1150 drm_send_vblank_event(dev, pipe, event);
1151 spin_unlock_irqrestore(&dev->event_lock, flags);
1152 ]]></programlisting>
1153 </para>
1154 <note><para>
1155 FIXME: Could drivers that don't need to wait for rendering to complete
1156 just add the event to <literal>dev-&gt;vblank_event_list</literal> and
1157 let the DRM core handle everything, as for "normal" vertical blanking
1158 events?
1159 </para></note>
1160 <para>
1161 While waiting for the page flip to complete, the
1162 <literal>event-&gt;base.link</literal> list head can be used freely by
1163 the driver to store the pending event in a driver-specific list.
1164 </para>
1165 <para>
1166 If the file handle is closed before the event is signaled, drivers must
1167 take care to destroy the event in their
1168 <methodname>preclose</methodname> operation (and, if needed, call
1169 <function>drm_vblank_put</function>).
1170 </para>
1171 </sect4>
1172 <sect4>
1173 <title>Miscellaneous</title>
1174 <itemizedlist>
1175 <listitem>
1176 <synopsis>void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
1177 uint32_t start, uint32_t size);</synopsis>
1178 <para>
1179 Apply a gamma table to the device. The operation is optional.
1180 </para>
1181 </listitem>
1182 <listitem>
1183 <synopsis>void (*destroy)(struct drm_crtc *crtc);</synopsis>
1184 <para>
1185 Destroy the CRTC when not needed anymore. See
1186 <xref linkend="drm-kms-init"/>.
1187 </para>
1188 </listitem>
1189 </itemizedlist>
1190 </sect4>
1191 </sect3>
1192 </sect2>
1193 <sect2>
1194 <title>Planes (struct <structname>drm_plane</structname>)</title>
1195 <para>
1196 A plane represents an image source that can be blended with or overlayed
1197 on top of a CRTC during the scanout process. Planes are associated with
1198 a frame buffer to crop a portion of the image memory (source) and
1199 optionally scale it to a destination size. The result is then blended
1200 with or overlayed on top of a CRTC.
1201 </para>
1202 <sect3>
1203 <title>Plane Initialization</title>
1204 <para>
1205 Planes are optional. To create a plane, a KMS drivers allocates and
1206 zeroes an instances of struct <structname>drm_plane</structname>
1207 (possibly as part of a larger structure) and registers it with a call
1208 to <function>drm_plane_init</function>. The function takes a bitmask
1209 of the CRTCs that can be associated with the plane, a pointer to the
1210 plane functions and a list of format supported formats.
1211 </para>
1212 </sect3>
1213 <sect3>
1214 <title>Plane Operations</title>
1215 <itemizedlist>
1216 <listitem>
1217 <synopsis>int (*update_plane)(struct drm_plane *plane, struct drm_crtc *crtc,
1218 struct drm_framebuffer *fb, int crtc_x, int crtc_y,
1219 unsigned int crtc_w, unsigned int crtc_h,
1220 uint32_t src_x, uint32_t src_y,
1221 uint32_t src_w, uint32_t src_h);</synopsis>
1222 <para>
1223 Enable and configure the plane to use the given CRTC and frame buffer.
1224 </para>
1225 <para>
1226 The source rectangle in frame buffer memory coordinates is given by
1227 the <parameter>src_x</parameter>, <parameter>src_y</parameter>,
1228 <parameter>src_w</parameter> and <parameter>src_h</parameter>
1229 parameters (as 16.16 fixed point values). Devices that don't support
1230 subpixel plane coordinates can ignore the fractional part.
1231 </para>
1232 <para>
1233 The destination rectangle in CRTC coordinates is given by the
1234 <parameter>crtc_x</parameter>, <parameter>crtc_y</parameter>,
1235 <parameter>crtc_w</parameter> and <parameter>crtc_h</parameter>
1236 parameters (as integer values). Devices scale the source rectangle to
1237 the destination rectangle. If scaling is not supported, and the source
1238 rectangle size doesn't match the destination rectangle size, the
1239 driver must return a -<errorname>EINVAL</errorname> error.
1240 </para>
1241 </listitem>
1242 <listitem>
1243 <synopsis>int (*disable_plane)(struct drm_plane *plane);</synopsis>
1244 <para>
1245 Disable the plane. The DRM core calls this method in response to a
1246 DRM_IOCTL_MODE_SETPLANE ioctl call with the frame buffer ID set to 0.
1247 Disabled planes must not be processed by the CRTC.
1248 </para>
1249 </listitem>
1250 <listitem>
1251 <synopsis>void (*destroy)(struct drm_plane *plane);</synopsis>
1252 <para>
1253 Destroy the plane when not needed anymore. See
1254 <xref linkend="drm-kms-init"/>.
1255 </para>
1256 </listitem>
1257 </itemizedlist>
1258 </sect3>
1259 </sect2>
1260 <sect2>
1261 <title>Encoders (struct <structname>drm_encoder</structname>)</title>
1262 <para>
1263 An encoder takes pixel data from a CRTC and converts it to a format
1264 suitable for any attached connectors. On some devices, it may be
1265 possible to have a CRTC send data to more than one encoder. In that
1266 case, both encoders would receive data from the same scanout buffer,
1267 resulting in a "cloned" display configuration across the connectors
1268 attached to each encoder.
1269 </para>
1270 <sect3>
1271 <title>Encoder Initialization</title>
1272 <para>
1273 As for CRTCs, a KMS driver must create, initialize and register at
1274 least one struct <structname>drm_encoder</structname> instance. The
1275 instance is allocated and zeroed by the driver, possibly as part of a
1276 larger structure.
1277 </para>
1278 <para>
1279 Drivers must initialize the struct <structname>drm_encoder</structname>
1280 <structfield>possible_crtcs</structfield> and
1281 <structfield>possible_clones</structfield> fields before registering the
1282 encoder. Both fields are bitmasks of respectively the CRTCs that the
1283 encoder can be connected to, and sibling encoders candidate for cloning.
1284 </para>
1285 <para>
1286 After being initialized, the encoder must be registered with a call to
1287 <function>drm_encoder_init</function>. The function takes a pointer to
1288 the encoder functions and an encoder type. Supported types are
1289 <itemizedlist>
1290 <listitem>
1291 DRM_MODE_ENCODER_DAC for VGA and analog on DVI-I/DVI-A
1292 </listitem>
1293 <listitem>
1294 DRM_MODE_ENCODER_TMDS for DVI, HDMI and (embedded) DisplayPort
1295 </listitem>
1296 <listitem>
1297 DRM_MODE_ENCODER_LVDS for display panels
1298 </listitem>
1299 <listitem>
1300 DRM_MODE_ENCODER_TVDAC for TV output (Composite, S-Video, Component,
1301 SCART)
1302 </listitem>
1303 <listitem>
1304 DRM_MODE_ENCODER_VIRTUAL for virtual machine displays
1305 </listitem>
1306 </itemizedlist>
1307 </para>
1308 <para>
1309 Encoders must be attached to a CRTC to be used. DRM drivers leave
1310 encoders unattached at initialization time. Applications (or the fbdev
1311 compatibility layer when implemented) are responsible for attaching the
1312 encoders they want to use to a CRTC.
1313 </para>
1314 </sect3>
1315 <sect3>
1316 <title>Encoder Operations</title>
1317 <itemizedlist>
1318 <listitem>
1319 <synopsis>void (*destroy)(struct drm_encoder *encoder);</synopsis>
1320 <para>
1321 Called to destroy the encoder when not needed anymore. See
1322 <xref linkend="drm-kms-init"/>.
1323 </para>
1324 </listitem>
1325 </itemizedlist>
1326 </sect3> 490 </sect3>
1327 </sect2> 491 </sect2>
492
1328 <sect2> 493 <sect2>
1329 <title>Connectors (struct <structname>drm_connector</structname>)</title> 494 <title>Output configuration</title>
1330 <para> 495 <para>
1331 A connector is the final destination for pixel data on a device, and 496 The final initialization task is output configuration. This involves
1332 usually connects directly to an external display device like a monitor 497 finding and initializing the CRTCs, encoders and connectors
1333 or laptop panel. A connector can only be attached to one encoder at a 498 for your device, creating an initial configuration and
1334 time. The connector is also the structure where information about the 499 registering a framebuffer console driver.
1335 attached display is kept, so it contains fields for display data, EDID
1336 data, DPMS &amp; connection status, and information about modes
1337 supported on the attached displays.
1338 </para> 500 </para>
1339 <sect3> 501 <sect3>
1340 <title>Connector Initialization</title> 502 <title>Output discovery and initialization</title>
1341 <para> 503 <para>
1342 Finally a KMS driver must create, initialize, register and attach at 504 Several core functions exist to create CRTCs, encoders and
1343 least one struct <structname>drm_connector</structname> instance. The 505 connectors, namely drm_crtc_init(), drm_connector_init() and
1344 instance is created as other KMS objects and initialized by setting the 506 drm_encoder_init(), along with several "helper" functions to
1345 following fields. 507 perform common tasks.
1346 </para> 508 </para>
1347 <variablelist> 509 <para>
1348 <varlistentry> 510 Connectors should be registered with sysfs once they've been
1349 <term><structfield>interlace_allowed</structfield></term> 511 detected and initialized, using the
1350 <listitem><para> 512 drm_sysfs_connector_add() function. Likewise, when they're
1351 Whether the connector can handle interlaced modes. 513 removed from the system, they should be destroyed with
1352 </para></listitem> 514 drm_sysfs_connector_remove().
1353 </varlistentry> 515 </para>
1354 <varlistentry> 516 <programlisting>
1355 <term><structfield>doublescan_allowed</structfield></term> 517<![CDATA[
1356 <listitem><para>
1357 Whether the connector can handle doublescan.
1358 </para></listitem>
1359 </varlistentry>
1360 <varlistentry>
1361 <term><structfield>display_info
1362 </structfield></term>
1363 <listitem><para>
1364 Display information is filled from EDID information when a display
1365 is detected. For non hot-pluggable displays such as flat panels in
1366 embedded systems, the driver should initialize the
1367 <structfield>display_info</structfield>.<structfield>width_mm</structfield>
1368 and
1369 <structfield>display_info</structfield>.<structfield>height_mm</structfield>
1370 fields with the physical size of the display.
1371 </para></listitem>
1372 </varlistentry>
1373 <varlistentry>
1374 <term id="drm-kms-connector-polled"><structfield>polled</structfield></term>
1375 <listitem><para>
1376 Connector polling mode, a combination of
1377 <variablelist>
1378 <varlistentry>
1379 <term>DRM_CONNECTOR_POLL_HPD</term>
1380 <listitem><para>
1381 The connector generates hotplug events and doesn't need to be
1382 periodically polled. The CONNECT and DISCONNECT flags must not
1383 be set together with the HPD flag.
1384 </para></listitem>
1385 </varlistentry>
1386 <varlistentry>
1387 <term>DRM_CONNECTOR_POLL_CONNECT</term>
1388 <listitem><para>
1389 Periodically poll the connector for connection.
1390 </para></listitem>
1391 </varlistentry>
1392 <varlistentry>
1393 <term>DRM_CONNECTOR_POLL_DISCONNECT</term>
1394 <listitem><para>
1395 Periodically poll the connector for disconnection.
1396 </para></listitem>
1397 </varlistentry>
1398 </variablelist>
1399 Set to 0 for connectors that don't support connection status
1400 discovery.
1401 </para></listitem>
1402 </varlistentry>
1403 </variablelist>
1404 <para>
1405 The connector is then registered with a call to
1406 <function>drm_connector_init</function> with a pointer to the connector
1407 functions and a connector type, and exposed through sysfs with a call to
1408 <function>drm_sysfs_connector_add</function>.
1409 </para>
1410 <para>
1411 Supported connector types are
1412 <itemizedlist>
1413 <listitem>DRM_MODE_CONNECTOR_VGA</listitem>
1414 <listitem>DRM_MODE_CONNECTOR_DVII</listitem>
1415 <listitem>DRM_MODE_CONNECTOR_DVID</listitem>
1416 <listitem>DRM_MODE_CONNECTOR_DVIA</listitem>
1417 <listitem>DRM_MODE_CONNECTOR_Composite</listitem>
1418 <listitem>DRM_MODE_CONNECTOR_SVIDEO</listitem>
1419 <listitem>DRM_MODE_CONNECTOR_LVDS</listitem>
1420 <listitem>DRM_MODE_CONNECTOR_Component</listitem>
1421 <listitem>DRM_MODE_CONNECTOR_9PinDIN</listitem>
1422 <listitem>DRM_MODE_CONNECTOR_DisplayPort</listitem>
1423 <listitem>DRM_MODE_CONNECTOR_HDMIA</listitem>
1424 <listitem>DRM_MODE_CONNECTOR_HDMIB</listitem>
1425 <listitem>DRM_MODE_CONNECTOR_TV</listitem>
1426 <listitem>DRM_MODE_CONNECTOR_eDP</listitem>
1427 <listitem>DRM_MODE_CONNECTOR_VIRTUAL</listitem>
1428 </itemizedlist>
1429 </para>
1430 <para>
1431 Connectors must be attached to an encoder to be used. For devices that
1432 map connectors to encoders 1:1, the connector should be attached at
1433 initialization time with a call to
1434 <function>drm_mode_connector_attach_encoder</function>. The driver must
1435 also set the <structname>drm_connector</structname>
1436 <structfield>encoder</structfield> field to point to the attached
1437 encoder.
1438 </para>
1439 <para>
1440 Finally, drivers must initialize the connectors state change detection
1441 with a call to <function>drm_kms_helper_poll_init</function>. If at
1442 least one connector is pollable but can't generate hotplug interrupts
1443 (indicated by the DRM_CONNECTOR_POLL_CONNECT and
1444 DRM_CONNECTOR_POLL_DISCONNECT connector flags), a delayed work will
1445 automatically be queued to periodically poll for changes. Connectors
1446 that can generate hotplug interrupts must be marked with the
1447 DRM_CONNECTOR_POLL_HPD flag instead, and their interrupt handler must
1448 call <function>drm_helper_hpd_irq_event</function>. The function will
1449 queue a delayed work to check the state of all connectors, but no
1450 periodic polling will be done.
1451 </para>
1452 </sect3>
1453 <sect3>
1454 <title>Connector Operations</title>
1455 <note><para>
1456 Unless otherwise state, all operations are mandatory.
1457 </para></note>
1458 <sect4>
1459 <title>DPMS</title>
1460 <synopsis>void (*dpms)(struct drm_connector *connector, int mode);</synopsis>
1461 <para>
1462 The DPMS operation sets the power state of a connector. The mode
1463 argument is one of
1464 <itemizedlist>
1465 <listitem><para>DRM_MODE_DPMS_ON</para></listitem>
1466 <listitem><para>DRM_MODE_DPMS_STANDBY</para></listitem>
1467 <listitem><para>DRM_MODE_DPMS_SUSPEND</para></listitem>
1468 <listitem><para>DRM_MODE_DPMS_OFF</para></listitem>
1469 </itemizedlist>
1470 </para>
1471 <para>
1472 In all but DPMS_ON mode the encoder to which the connector is attached
1473 should put the display in low-power mode by driving its signals
1474 appropriately. If more than one connector is attached to the encoder
1475 care should be taken not to change the power state of other displays as
1476 a side effect. Low-power mode should be propagated to the encoders and
1477 CRTCs when all related connectors are put in low-power mode.
1478 </para>
1479 </sect4>
1480 <sect4>
1481 <title>Modes</title>
1482 <synopsis>int (*fill_modes)(struct drm_connector *connector, uint32_t max_width,
1483 uint32_t max_height);</synopsis>
1484 <para>
1485 Fill the mode list with all supported modes for the connector. If the
1486 <parameter>max_width</parameter> and <parameter>max_height</parameter>
1487 arguments are non-zero, the implementation must ignore all modes wider
1488 than <parameter>max_width</parameter> or higher than
1489 <parameter>max_height</parameter>.
1490 </para>
1491 <para>
1492 The connector must also fill in this operation its
1493 <structfield>display_info</structfield>
1494 <structfield>width_mm</structfield> and
1495 <structfield>height_mm</structfield> fields with the connected display
1496 physical size in millimeters. The fields should be set to 0 if the value
1497 isn't known or is not applicable (for instance for projector devices).
1498 </para>
1499 </sect4>
1500 <sect4>
1501 <title>Connection Status</title>
1502 <para>
1503 The connection status is updated through polling or hotplug events when
1504 supported (see <xref linkend="drm-kms-connector-polled"/>). The status
1505 value is reported to userspace through ioctls and must not be used
1506 inside the driver, as it only gets initialized by a call to
1507 <function>drm_mode_getconnector</function> from userspace.
1508 </para>
1509 <synopsis>enum drm_connector_status (*detect)(struct drm_connector *connector,
1510 bool force);</synopsis>
1511 <para>
1512 Check to see if anything is attached to the connector. The
1513 <parameter>force</parameter> parameter is set to false whilst polling or
1514 to true when checking the connector due to user request.
1515 <parameter>force</parameter> can be used by the driver to avoid
1516 expensive, destructive operations during automated probing.
1517 </para>
1518 <para>
1519 Return connector_status_connected if something is connected to the
1520 connector, connector_status_disconnected if nothing is connected and
1521 connector_status_unknown if the connection state isn't known.
1522 </para>
1523 <para>
1524 Drivers should only return connector_status_connected if the connection
1525 status has really been probed as connected. Connectors that can't detect
1526 the connection status, or failed connection status probes, should return
1527 connector_status_unknown.
1528 </para>
1529 </sect4>
1530 <sect4>
1531 <title>Miscellaneous</title>
1532 <itemizedlist>
1533 <listitem>
1534 <synopsis>void (*destroy)(struct drm_connector *connector);</synopsis>
1535 <para>
1536 Destroy the connector when not needed anymore. See
1537 <xref linkend="drm-kms-init"/>.
1538 </para>
1539 </listitem>
1540 </itemizedlist>
1541 </sect4>
1542 </sect3>
1543 </sect2>
1544 <sect2>
1545 <title>Cleanup</title>
1546 <para>
1547 The DRM core manages its objects' lifetime. When an object is not needed
1548 anymore the core calls its destroy function, which must clean up and
1549 free every resource allocated for the object. Every
1550 <function>drm_*_init</function> call must be matched with a
1551 corresponding <function>drm_*_cleanup</function> call to cleanup CRTCs
1552 (<function>drm_crtc_cleanup</function>), planes
1553 (<function>drm_plane_cleanup</function>), encoders
1554 (<function>drm_encoder_cleanup</function>) and connectors
1555 (<function>drm_connector_cleanup</function>). Furthermore, connectors
1556 that have been added to sysfs must be removed by a call to
1557 <function>drm_sysfs_connector_remove</function> before calling
1558 <function>drm_connector_cleanup</function>.
1559 </para>
1560 <para>
1561 Connectors state change detection must be cleanup up with a call to
1562 <function>drm_kms_helper_poll_fini</function>.
1563 </para>
1564 </sect2>
1565 <sect2>
1566 <title>Output discovery and initialization example</title>
1567 <programlisting><![CDATA[
1568void intel_crt_init(struct drm_device *dev) 518void intel_crt_init(struct drm_device *dev)
1569{ 519{
1570 struct drm_connector *connector; 520 struct drm_connector *connector;
@@ -1600,784 +550,249 @@ void intel_crt_init(struct drm_device *dev)
1600 drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs); 550 drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
1601 551
1602 drm_sysfs_connector_add(connector); 552 drm_sysfs_connector_add(connector);
1603}]]></programlisting> 553}
1604 <para> 554]]>
1605 In the example above (taken from the i915 driver), a CRTC, connector and 555 </programlisting>
1606 encoder combination is created. A device-specific i2c bus is also 556 <para>
1607 created for fetching EDID data and performing monitor detection. Once 557 In the example above (again, taken from the i915 driver), a
1608 the process is complete, the new connector is registered with sysfs to 558 CRT connector and encoder combination is created. A device
1609 make its properties available to applications. 559 specific i2c bus is also created, for fetching EDID data and
1610 </para> 560 performing monitor detection. Once the process is complete,
561 the new connector is registered with sysfs, to make its
562 properties available to applications.
563 </para>
564 <sect4>
565 <title>Helper functions and core functions</title>
566 <para>
567 Since many PC-class graphics devices have similar display output
568 designs, the DRM provides a set of helper functions to make
569 output management easier. The core helper routines handle
570 encoder re-routing and disabling of unused functions following
571 mode set. Using the helpers is optional, but recommended for
572 devices with PC-style architectures (i.e. a set of display planes
573 for feeding pixels to encoders which are in turn routed to
574 connectors). Devices with more complex requirements needing
575 finer grained management can opt to use the core callbacks
576 directly.
577 </para>
578 <para>
579 [Insert typical diagram here.] [Insert OMAP style config here.]
580 </para>
581 </sect4>
582 <para>
583 For each encoder, CRTC and connector, several functions must
584 be provided, depending on the object type. Encoder objects
585 need to provide a DPMS (basically on/off) function, mode fixup
586 (for converting requested modes into native hardware timings),
587 and prepare, set and commit functions for use by the core DRM
588 helper functions. Connector helpers need to provide mode fetch and
589 validity functions as well as an encoder matching function for
590 returning an ideal encoder for a given connector. The core
591 connector functions include a DPMS callback, (deprecated)
592 save/restore routines, detection, mode probing, property handling,
593 and cleanup functions.
594 </para>
595<!--!Edrivers/char/drm/drm_crtc.h-->
596<!--!Edrivers/char/drm/drm_crtc.c-->
597<!--!Edrivers/char/drm/drm_crtc_helper.c-->
598 </sect3>
1611 </sect2> 599 </sect2>
1612 </sect1> 600 </sect1>
1613 601
1614 <!-- Internals: kms helper functions --> 602 <!-- Internals: vblank handling -->
1615 603
1616 <sect1> 604 <sect1>
1617 <title>Mode Setting Helper Functions</title> 605 <title>VBlank event handling</title>
1618 <para> 606 <para>
1619 The CRTC, encoder and connector functions provided by the drivers 607 The DRM core exposes two vertical blank related ioctls:
1620 implement the DRM API. They're called by the DRM core and ioctl handlers 608 DRM_IOCTL_WAIT_VBLANK and DRM_IOCTL_MODESET_CTL.
1621 to handle device state changes and configuration request. As implementing 609<!--!Edrivers/char/drm/drm_irq.c-->
1622 those functions often requires logic not specific to drivers, mid-layer
1623 helper functions are available to avoid duplicating boilerplate code.
1624 </para> 610 </para>
1625 <para> 611 <para>
1626 The DRM core contains one mid-layer implementation. The mid-layer provides 612 DRM_IOCTL_WAIT_VBLANK takes a struct drm_wait_vblank structure
1627 implementations of several CRTC, encoder and connector functions (called 613 as its argument, and is used to block or request a signal when a
1628 from the top of the mid-layer) that pre-process requests and call 614 specified vblank event occurs.
1629 lower-level functions provided by the driver (at the bottom of the
1630 mid-layer). For instance, the
1631 <function>drm_crtc_helper_set_config</function> function can be used to
1632 fill the struct <structname>drm_crtc_funcs</structname>
1633 <structfield>set_config</structfield> field. When called, it will split
1634 the <methodname>set_config</methodname> operation in smaller, simpler
1635 operations and call the driver to handle them.
1636 </para> 615 </para>
1637 <para> 616 <para>
1638 To use the mid-layer, drivers call <function>drm_crtc_helper_add</function>, 617 DRM_IOCTL_MODESET_CTL should be called by application level
1639 <function>drm_encoder_helper_add</function> and 618 drivers before and after mode setting, since on many devices the
1640 <function>drm_connector_helper_add</function> functions to install their 619 vertical blank counter will be reset at that time. Internally,
1641 mid-layer bottom operations handlers, and fill the 620 the DRM snapshots the last vblank count when the ioctl is called
1642 <structname>drm_crtc_funcs</structname>, 621 with the _DRM_PRE_MODESET command so that the counter won't go
1643 <structname>drm_encoder_funcs</structname> and 622 backwards (which is dealt with when _DRM_POST_MODESET is used).
1644 <structname>drm_connector_funcs</structname> structures with pointers to
1645 the mid-layer top API functions. Installing the mid-layer bottom operation
1646 handlers is best done right after registering the corresponding KMS object.
1647 </para> 623 </para>
1648 <para> 624 <para>
1649 The mid-layer is not split between CRTC, encoder and connector operations. 625 To support the functions above, the DRM core provides several
1650 To use it, a driver must provide bottom functions for all of the three KMS 626 helper functions for tracking vertical blank counters, and
1651 entities. 627 requires drivers to provide several callbacks:
628 get_vblank_counter(), enable_vblank() and disable_vblank(). The
629 core uses get_vblank_counter() to keep the counter accurate
630 across interrupt disable periods. It should return the current
631 vertical blank event count, which is often tracked in a device
632 register. The enable and disable vblank callbacks should enable
633 and disable vertical blank interrupts, respectively. In the
634 absence of DRM clients waiting on vblank events, the core DRM
635 code will use the disable_vblank() function to disable
636 interrupts, which saves power. They'll be re-enabled again when
637 a client calls the vblank wait ioctl above.
1652 </para> 638 </para>
1653 <sect2> 639 <para>
1654 <title>Helper Functions</title> 640 Devices that don't provide a count register can simply use an
1655 <itemizedlist> 641 internal atomic counter incremented on every vertical blank
1656 <listitem> 642 interrupt, and can make their enable and disable vblank
1657 <synopsis>int drm_crtc_helper_set_config(struct drm_mode_set *set);</synopsis> 643 functions into no-ops.
1658 <para> 644 </para>
1659 The <function>drm_crtc_helper_set_config</function> helper function 645 </sect1>
1660 is a CRTC <methodname>set_config</methodname> implementation. It
1661 first tries to locate the best encoder for each connector by calling
1662 the connector <methodname>best_encoder</methodname> helper
1663 operation.
1664 </para>
1665 <para>
1666 After locating the appropriate encoders, the helper function will
1667 call the <methodname>mode_fixup</methodname> encoder and CRTC helper
1668 operations to adjust the requested mode, or reject it completely in
1669 which case an error will be returned to the application. If the new
1670 configuration after mode adjustment is identical to the current
1671 configuration the helper function will return without performing any
1672 other operation.
1673 </para>
1674 <para>
1675 If the adjusted mode is identical to the current mode but changes to
1676 the frame buffer need to be applied, the
1677 <function>drm_crtc_helper_set_config</function> function will call
1678 the CRTC <methodname>mode_set_base</methodname> helper operation. If
1679 the adjusted mode differs from the current mode, or if the
1680 <methodname>mode_set_base</methodname> helper operation is not
1681 provided, the helper function performs a full mode set sequence by
1682 calling the <methodname>prepare</methodname>,
1683 <methodname>mode_set</methodname> and
1684 <methodname>commit</methodname> CRTC and encoder helper operations,
1685 in that order.
1686 </para>
1687 </listitem>
1688 <listitem>
1689 <synopsis>void drm_helper_connector_dpms(struct drm_connector *connector, int mode);</synopsis>
1690 <para>
1691 The <function>drm_helper_connector_dpms</function> helper function
1692 is a connector <methodname>dpms</methodname> implementation that
1693 tracks power state of connectors. To use the function, drivers must
1694 provide <methodname>dpms</methodname> helper operations for CRTCs
1695 and encoders to apply the DPMS state to the device.
1696 </para>
1697 <para>
1698 The mid-layer doesn't track the power state of CRTCs and encoders.
1699 The <methodname>dpms</methodname> helper operations can thus be
1700 called with a mode identical to the currently active mode.
1701 </para>
1702 </listitem>
1703 <listitem>
1704 <synopsis>int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
1705 uint32_t maxX, uint32_t maxY);</synopsis>
1706 <para>
1707 The <function>drm_helper_probe_single_connector_modes</function> helper
1708 function is a connector <methodname>fill_modes</methodname>
1709 implementation that updates the connection status for the connector
1710 and then retrieves a list of modes by calling the connector
1711 <methodname>get_modes</methodname> helper operation.
1712 </para>
1713 <para>
1714 The function filters out modes larger than
1715 <parameter>max_width</parameter> and <parameter>max_height</parameter>
1716 if specified. It then calls the connector
1717 <methodname>mode_valid</methodname> helper operation for each mode in
1718 the probed list to check whether the mode is valid for the connector.
1719 </para>
1720 </listitem>
1721 </itemizedlist>
1722 </sect2>
1723 <sect2>
1724 <title>CRTC Helper Operations</title>
1725 <itemizedlist>
1726 <listitem id="drm-helper-crtc-mode-fixup">
1727 <synopsis>bool (*mode_fixup)(struct drm_crtc *crtc,
1728 const struct drm_display_mode *mode,
1729 struct drm_display_mode *adjusted_mode);</synopsis>
1730 <para>
1731 Let CRTCs adjust the requested mode or reject it completely. This
1732 operation returns true if the mode is accepted (possibly after being
1733 adjusted) or false if it is rejected.
1734 </para>
1735 <para>
1736 The <methodname>mode_fixup</methodname> operation should reject the
1737 mode if it can't reasonably use it. The definition of "reasonable"
1738 is currently fuzzy in this context. One possible behaviour would be
1739 to set the adjusted mode to the panel timings when a fixed-mode
1740 panel is used with hardware capable of scaling. Another behaviour
1741 would be to accept any input mode and adjust it to the closest mode
1742 supported by the hardware (FIXME: This needs to be clarified).
1743 </para>
1744 </listitem>
1745 <listitem>
1746 <synopsis>int (*mode_set_base)(struct drm_crtc *crtc, int x, int y,
1747 struct drm_framebuffer *old_fb)</synopsis>
1748 <para>
1749 Move the CRTC on the current frame buffer (stored in
1750 <literal>crtc-&gt;fb</literal>) to position (x,y). Any of the frame
1751 buffer, x position or y position may have been modified.
1752 </para>
1753 <para>
1754 This helper operation is optional. If not provided, the
1755 <function>drm_crtc_helper_set_config</function> function will fall
1756 back to the <methodname>mode_set</methodname> helper operation.
1757 </para>
1758 <note><para>
1759 FIXME: Why are x and y passed as arguments, as they can be accessed
1760 through <literal>crtc-&gt;x</literal> and
1761 <literal>crtc-&gt;y</literal>?
1762 </para></note>
1763 </listitem>
1764 <listitem>
1765 <synopsis>void (*prepare)(struct drm_crtc *crtc);</synopsis>
1766 <para>
1767 Prepare the CRTC for mode setting. This operation is called after
1768 validating the requested mode. Drivers use it to perform
1769 device-specific operations required before setting the new mode.
1770 </para>
1771 </listitem>
1772 <listitem>
1773 <synopsis>int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
1774 struct drm_display_mode *adjusted_mode, int x, int y,
1775 struct drm_framebuffer *old_fb);</synopsis>
1776 <para>
1777 Set a new mode, position and frame buffer. Depending on the device
1778 requirements, the mode can be stored internally by the driver and
1779 applied in the <methodname>commit</methodname> operation, or
1780 programmed to the hardware immediately.
1781 </para>
1782 <para>
1783 The <methodname>mode_set</methodname> operation returns 0 on success
1784 or a negative error code if an error occurs.
1785 </para>
1786 </listitem>
1787 <listitem>
1788 <synopsis>void (*commit)(struct drm_crtc *crtc);</synopsis>
1789 <para>
1790 Commit a mode. This operation is called after setting the new mode.
1791 Upon return the device must use the new mode and be fully
1792 operational.
1793 </para>
1794 </listitem>
1795 </itemizedlist>
1796 </sect2>
1797 <sect2>
1798 <title>Encoder Helper Operations</title>
1799 <itemizedlist>
1800 <listitem>
1801 <synopsis>bool (*mode_fixup)(struct drm_encoder *encoder,
1802 const struct drm_display_mode *mode,
1803 struct drm_display_mode *adjusted_mode);</synopsis>
1804 <note><para>
1805 FIXME: The mode argument be const, but the i915 driver modifies
1806 mode-&gt;clock in <function>intel_dp_mode_fixup</function>.
1807 </para></note>
1808 <para>
1809 Let encoders adjust the requested mode or reject it completely. This
1810 operation returns true if the mode is accepted (possibly after being
1811 adjusted) or false if it is rejected. See the
1812 <link linkend="drm-helper-crtc-mode-fixup">mode_fixup CRTC helper
1813 operation</link> for an explanation of the allowed adjustments.
1814 </para>
1815 </listitem>
1816 <listitem>
1817 <synopsis>void (*prepare)(struct drm_encoder *encoder);</synopsis>
1818 <para>
1819 Prepare the encoder for mode setting. This operation is called after
1820 validating the requested mode. Drivers use it to perform
1821 device-specific operations required before setting the new mode.
1822 </para>
1823 </listitem>
1824 <listitem>
1825 <synopsis>void (*mode_set)(struct drm_encoder *encoder,
1826 struct drm_display_mode *mode,
1827 struct drm_display_mode *adjusted_mode);</synopsis>
1828 <para>
1829 Set a new mode. Depending on the device requirements, the mode can
1830 be stored internally by the driver and applied in the
1831 <methodname>commit</methodname> operation, or programmed to the
1832 hardware immediately.
1833 </para>
1834 </listitem>
1835 <listitem>
1836 <synopsis>void (*commit)(struct drm_encoder *encoder);</synopsis>
1837 <para>
1838 Commit a mode. This operation is called after setting the new mode.
1839 Upon return the device must use the new mode and be fully
1840 operational.
1841 </para>
1842 </listitem>
1843 </itemizedlist>
1844 </sect2>
1845 <sect2>
1846 <title>Connector Helper Operations</title>
1847 <itemizedlist>
1848 <listitem>
1849 <synopsis>struct drm_encoder *(*best_encoder)(struct drm_connector *connector);</synopsis>
1850 <para>
1851 Return a pointer to the best encoder for the connecter. Device that
1852 map connectors to encoders 1:1 simply return the pointer to the
1853 associated encoder. This operation is mandatory.
1854 </para>
1855 </listitem>
1856 <listitem>
1857 <synopsis>int (*get_modes)(struct drm_connector *connector);</synopsis>
1858 <para>
1859 Fill the connector's <structfield>probed_modes</structfield> list
1860 by parsing EDID data with <function>drm_add_edid_modes</function> or
1861 calling <function>drm_mode_probed_add</function> directly for every
1862 supported mode and return the number of modes it has detected. This
1863 operation is mandatory.
1864 </para>
1865 <para>
1866 When adding modes manually the driver creates each mode with a call to
1867 <function>drm_mode_create</function> and must fill the following fields.
1868 <itemizedlist>
1869 <listitem>
1870 <synopsis>__u32 type;</synopsis>
1871 <para>
1872 Mode type bitmask, a combination of
1873 <variablelist>
1874 <varlistentry>
1875 <term>DRM_MODE_TYPE_BUILTIN</term>
1876 <listitem><para>not used?</para></listitem>
1877 </varlistentry>
1878 <varlistentry>
1879 <term>DRM_MODE_TYPE_CLOCK_C</term>
1880 <listitem><para>not used?</para></listitem>
1881 </varlistentry>
1882 <varlistentry>
1883 <term>DRM_MODE_TYPE_CRTC_C</term>
1884 <listitem><para>not used?</para></listitem>
1885 </varlistentry>
1886 <varlistentry>
1887 <term>
1888 DRM_MODE_TYPE_PREFERRED - The preferred mode for the connector
1889 </term>
1890 <listitem>
1891 <para>not used?</para>
1892 </listitem>
1893 </varlistentry>
1894 <varlistentry>
1895 <term>DRM_MODE_TYPE_DEFAULT</term>
1896 <listitem><para>not used?</para></listitem>
1897 </varlistentry>
1898 <varlistentry>
1899 <term>DRM_MODE_TYPE_USERDEF</term>
1900 <listitem><para>not used?</para></listitem>
1901 </varlistentry>
1902 <varlistentry>
1903 <term>DRM_MODE_TYPE_DRIVER</term>
1904 <listitem>
1905 <para>
1906 The mode has been created by the driver (as opposed to
1907 to user-created modes).
1908 </para>
1909 </listitem>
1910 </varlistentry>
1911 </variablelist>
1912 Drivers must set the DRM_MODE_TYPE_DRIVER bit for all modes they
1913 create, and set the DRM_MODE_TYPE_PREFERRED bit for the preferred
1914 mode.
1915 </para>
1916 </listitem>
1917 <listitem>
1918 <synopsis>__u32 clock;</synopsis>
1919 <para>Pixel clock frequency in kHz unit</para>
1920 </listitem>
1921 <listitem>
1922 <synopsis>__u16 hdisplay, hsync_start, hsync_end, htotal;
1923 __u16 vdisplay, vsync_start, vsync_end, vtotal;</synopsis>
1924 <para>Horizontal and vertical timing information</para>
1925 <screen><![CDATA[
1926 Active Front Sync Back
1927 Region Porch Porch
1928 <-----------------------><----------------><-------------><-------------->
1929 646
1930 //////////////////////| 647 <sect1>
1931 ////////////////////// | 648 <title>Memory management</title>
1932 ////////////////////// |.................. ................ 649 <para>
1933 _______________ 650 The memory manager lies at the heart of many DRM operations, and
651 is also required to support advanced client features like OpenGL
652 pbuffers. The DRM currently contains two memory managers, TTM
653 and GEM.
654 </para>
1934 655
1935 <----- [hv]display ----->
1936 <------------- [hv]sync_start ------------>
1937 <--------------------- [hv]sync_end --------------------->
1938 <-------------------------------- [hv]total ----------------------------->
1939]]></screen>
1940 </listitem>
1941 <listitem>
1942 <synopsis>__u16 hskew;
1943 __u16 vscan;</synopsis>
1944 <para>Unknown</para>
1945 </listitem>
1946 <listitem>
1947 <synopsis>__u32 flags;</synopsis>
1948 <para>
1949 Mode flags, a combination of
1950 <variablelist>
1951 <varlistentry>
1952 <term>DRM_MODE_FLAG_PHSYNC</term>
1953 <listitem><para>
1954 Horizontal sync is active high
1955 </para></listitem>
1956 </varlistentry>
1957 <varlistentry>
1958 <term>DRM_MODE_FLAG_NHSYNC</term>
1959 <listitem><para>
1960 Horizontal sync is active low
1961 </para></listitem>
1962 </varlistentry>
1963 <varlistentry>
1964 <term>DRM_MODE_FLAG_PVSYNC</term>
1965 <listitem><para>
1966 Vertical sync is active high
1967 </para></listitem>
1968 </varlistentry>
1969 <varlistentry>
1970 <term>DRM_MODE_FLAG_NVSYNC</term>
1971 <listitem><para>
1972 Vertical sync is active low
1973 </para></listitem>
1974 </varlistentry>
1975 <varlistentry>
1976 <term>DRM_MODE_FLAG_INTERLACE</term>
1977 <listitem><para>
1978 Mode is interlaced
1979 </para></listitem>
1980 </varlistentry>
1981 <varlistentry>
1982 <term>DRM_MODE_FLAG_DBLSCAN</term>
1983 <listitem><para>
1984 Mode uses doublescan
1985 </para></listitem>
1986 </varlistentry>
1987 <varlistentry>
1988 <term>DRM_MODE_FLAG_CSYNC</term>
1989 <listitem><para>
1990 Mode uses composite sync
1991 </para></listitem>
1992 </varlistentry>
1993 <varlistentry>
1994 <term>DRM_MODE_FLAG_PCSYNC</term>
1995 <listitem><para>
1996 Composite sync is active high
1997 </para></listitem>
1998 </varlistentry>
1999 <varlistentry>
2000 <term>DRM_MODE_FLAG_NCSYNC</term>
2001 <listitem><para>
2002 Composite sync is active low
2003 </para></listitem>
2004 </varlistentry>
2005 <varlistentry>
2006 <term>DRM_MODE_FLAG_HSKEW</term>
2007 <listitem><para>
2008 hskew provided (not used?)
2009 </para></listitem>
2010 </varlistentry>
2011 <varlistentry>
2012 <term>DRM_MODE_FLAG_BCAST</term>
2013 <listitem><para>
2014 not used?
2015 </para></listitem>
2016 </varlistentry>
2017 <varlistentry>
2018 <term>DRM_MODE_FLAG_PIXMUX</term>
2019 <listitem><para>
2020 not used?
2021 </para></listitem>
2022 </varlistentry>
2023 <varlistentry>
2024 <term>DRM_MODE_FLAG_DBLCLK</term>
2025 <listitem><para>
2026 not used?
2027 </para></listitem>
2028 </varlistentry>
2029 <varlistentry>
2030 <term>DRM_MODE_FLAG_CLKDIV2</term>
2031 <listitem><para>
2032 ?
2033 </para></listitem>
2034 </varlistentry>
2035 </variablelist>
2036 </para>
2037 <para>
2038 Note that modes marked with the INTERLACE or DBLSCAN flags will be
2039 filtered out by
2040 <function>drm_helper_probe_single_connector_modes</function> if
2041 the connector's <structfield>interlace_allowed</structfield> or
2042 <structfield>doublescan_allowed</structfield> field is set to 0.
2043 </para>
2044 </listitem>
2045 <listitem>
2046 <synopsis>char name[DRM_DISPLAY_MODE_LEN];</synopsis>
2047 <para>
2048 Mode name. The driver must call
2049 <function>drm_mode_set_name</function> to fill the mode name from
2050 <structfield>hdisplay</structfield>,
2051 <structfield>vdisplay</structfield> and interlace flag after
2052 filling the corresponding fields.
2053 </para>
2054 </listitem>
2055 </itemizedlist>
2056 </para>
2057 <para>
2058 The <structfield>vrefresh</structfield> value is computed by
2059 <function>drm_helper_probe_single_connector_modes</function>.
2060 </para>
2061 <para>
2062 When parsing EDID data, <function>drm_add_edid_modes</function> fill the
2063 connector <structfield>display_info</structfield>
2064 <structfield>width_mm</structfield> and
2065 <structfield>height_mm</structfield> fields. When creating modes
2066 manually the <methodname>get_modes</methodname> helper operation must
2067 set the <structfield>display_info</structfield>
2068 <structfield>width_mm</structfield> and
2069 <structfield>height_mm</structfield> fields if they haven't been set
2070 already (for instance at initilization time when a fixed-size panel is
2071 attached to the connector). The mode <structfield>width_mm</structfield>
2072 and <structfield>height_mm</structfield> fields are only used internally
2073 during EDID parsing and should not be set when creating modes manually.
2074 </para>
2075 </listitem>
2076 <listitem>
2077 <synopsis>int (*mode_valid)(struct drm_connector *connector,
2078 struct drm_display_mode *mode);</synopsis>
2079 <para>
2080 Verify whether a mode is valid for the connector. Return MODE_OK for
2081 supported modes and one of the enum drm_mode_status values (MODE_*)
2082 for unsupported modes. This operation is mandatory.
2083 </para>
2084 <para>
2085 As the mode rejection reason is currently not used beside for
2086 immediately removing the unsupported mode, an implementation can
2087 return MODE_BAD regardless of the exact reason why the mode is not
2088 valid.
2089 </para>
2090 <note><para>
2091 Note that the <methodname>mode_valid</methodname> helper operation is
2092 only called for modes detected by the device, and
2093 <emphasis>not</emphasis> for modes set by the user through the CRTC
2094 <methodname>set_config</methodname> operation.
2095 </para></note>
2096 </listitem>
2097 </itemizedlist>
2098 </sect2>
2099 <sect2>
2100 <title>Modeset Helper Functions Reference</title>
2101!Edrivers/gpu/drm/drm_crtc_helper.c
2102 </sect2>
2103 <sect2> 656 <sect2>
2104 <title>fbdev Helper Functions Reference</title> 657 <title>The Translation Table Manager (TTM)</title>
2105!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers 658 <para>
2106!Edrivers/gpu/drm/drm_fb_helper.c 659 TTM was developed by Tungsten Graphics, primarily by Thomas
660 Hellström, and is intended to be a flexible, high performance
661 graphics memory manager.
662 </para>
663 <para>
664 Drivers wishing to support TTM must fill out a drm_bo_driver
665 structure.
666 </para>
667 <para>
668 TTM design background and information belongs here.
669 </para>
2107 </sect2> 670 </sect2>
671
2108 <sect2> 672 <sect2>
2109 <title>Display Port Helper Functions Reference</title> 673 <title>The Graphics Execution Manager (GEM)</title>
2110!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers 674 <para>
2111!Iinclude/drm/drm_dp_helper.h 675 GEM is an Intel project, authored by Eric Anholt and Keith
2112!Edrivers/gpu/drm/drm_dp_helper.c 676 Packard. It provides simpler interfaces than TTM, and is well
677 suited for UMA devices.
678 </para>
679 <para>
680 GEM-enabled drivers must provide gem_init_object() and
681 gem_free_object() callbacks to support the core memory
682 allocation routines. They should also provide several driver
683 specific ioctls to support command execution, pinning, buffer
684 read &amp; write, mapping, and domain ownership transfers.
685 </para>
686 <para>
687 On a fundamental level, GEM involves several operations: memory
688 allocation and freeing, command execution, and aperture management
689 at command execution time. Buffer object allocation is relatively
690 straightforward and largely provided by Linux's shmem layer, which
691 provides memory to back each object. When mapped into the GTT
692 or used in a command buffer, the backing pages for an object are
693 flushed to memory and marked write combined so as to be coherent
694 with the GPU. Likewise, when the GPU finishes rendering to an object,
695 if the CPU accesses it, it must be made coherent with the CPU's view
696 of memory, usually involving GPU cache flushing of various kinds.
697 This core CPU&lt;-&gt;GPU coherency management is provided by the GEM
698 set domain function, which evaluates an object's current domain and
699 performs any necessary flushing or synchronization to put the object
700 into the desired coherency domain (note that the object may be busy,
701 i.e. an active render target; in that case the set domain function
702 will block the client and wait for rendering to complete before
703 performing any necessary flushing operations).
704 </para>
705 <para>
706 Perhaps the most important GEM function is providing a command
707 execution interface to clients. Client programs construct command
708 buffers containing references to previously allocated memory objects
709 and submit them to GEM. At that point, GEM will take care to bind
710 all the objects into the GTT, execute the buffer, and provide
711 necessary synchronization between clients accessing the same buffers.
712 This often involves evicting some objects from the GTT and re-binding
713 others (a fairly expensive operation), and providing relocation
714 support which hides fixed GTT offsets from clients. Clients must
715 take care not to submit command buffers that reference more objects
716 than can fit in the GTT or GEM will reject them and no rendering
717 will occur. Similarly, if several objects in the buffer require
718 fence registers to be allocated for correct rendering (e.g. 2D blits
719 on pre-965 chips), care must be taken not to require more fence
720 registers than are available to the client. Such resource management
721 should be abstracted from the client in libdrm.
722 </para>
2113 </sect2> 723 </sect2>
2114 </sect1>
2115 724
2116 <!-- Internals: vertical blanking --> 725 </sect1>
2117 726
2118 <sect1 id="drm-vertical-blank"> 727 <!-- Output management -->
2119 <title>Vertical Blanking</title> 728 <sect1>
2120 <para> 729 <title>Output management</title>
2121 Vertical blanking plays a major role in graphics rendering. To achieve
2122 tear-free display, users must synchronize page flips and/or rendering to
2123 vertical blanking. The DRM API offers ioctls to perform page flips
2124 synchronized to vertical blanking and wait for vertical blanking.
2125 </para>
2126 <para>
2127 The DRM core handles most of the vertical blanking management logic, which
2128 involves filtering out spurious interrupts, keeping race-free blanking
2129 counters, coping with counter wrap-around and resets and keeping use
2130 counts. It relies on the driver to generate vertical blanking interrupts
2131 and optionally provide a hardware vertical blanking counter. Drivers must
2132 implement the following operations.
2133 </para>
2134 <itemizedlist>
2135 <listitem>
2136 <synopsis>int (*enable_vblank) (struct drm_device *dev, int crtc);
2137void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis>
2138 <para>
2139 Enable or disable vertical blanking interrupts for the given CRTC.
2140 </para>
2141 </listitem>
2142 <listitem>
2143 <synopsis>u32 (*get_vblank_counter) (struct drm_device *dev, int crtc);</synopsis>
2144 <para>
2145 Retrieve the value of the vertical blanking counter for the given
2146 CRTC. If the hardware maintains a vertical blanking counter its value
2147 should be returned. Otherwise drivers can use the
2148 <function>drm_vblank_count</function> helper function to handle this
2149 operation.
2150 </para>
2151 </listitem>
2152 </itemizedlist>
2153 <para>
2154 Drivers must initialize the vertical blanking handling core with a call to
2155 <function>drm_vblank_init</function> in their
2156 <methodname>load</methodname> operation. The function will set the struct
2157 <structname>drm_device</structname>
2158 <structfield>vblank_disable_allowed</structfield> field to 0. This will
2159 keep vertical blanking interrupts enabled permanently until the first mode
2160 set operation, where <structfield>vblank_disable_allowed</structfield> is
2161 set to 1. The reason behind this is not clear. Drivers can set the field
2162 to 1 after <function>calling drm_vblank_init</function> to make vertical
2163 blanking interrupts dynamically managed from the beginning.
2164 </para>
2165 <para> 730 <para>
2166 Vertical blanking interrupts can be enabled by the DRM core or by drivers 731 At the core of the DRM output management code is a set of
2167 themselves (for instance to handle page flipping operations). The DRM core 732 structures representing CRTCs, encoders and connectors.
2168 maintains a vertical blanking use count to ensure that the interrupts are
2169 not disabled while a user still needs them. To increment the use count,
2170 drivers call <function>drm_vblank_get</function>. Upon return vertical
2171 blanking interrupts are guaranteed to be enabled.
2172 </para> 733 </para>
2173 <para> 734 <para>
2174 To decrement the use count drivers call 735 A CRTC is an abstraction representing a part of the chip that
2175 <function>drm_vblank_put</function>. Only when the use count drops to zero 736 contains a pointer to a scanout buffer. Therefore, the number
2176 will the DRM core disable the vertical blanking interrupts after a delay 737 of CRTCs available determines how many independent scanout
2177 by scheduling a timer. The delay is accessible through the vblankoffdelay 738 buffers can be active at any given time. The CRTC structure
2178 module parameter or the <varname>drm_vblank_offdelay</varname> global 739 contains several fields to support this: a pointer to some video
2179 variable and expressed in milliseconds. Its default value is 5000 ms. 740 memory, a display mode, and an (x, y) offset into the video
741 memory to support panning or configurations where one piece of
742 video memory spans multiple CRTCs.
2180 </para> 743 </para>
2181 <para> 744 <para>
2182 When a vertical blanking interrupt occurs drivers only need to call the 745 An encoder takes pixel data from a CRTC and converts it to a
2183 <function>drm_handle_vblank</function> function to account for the 746 format suitable for any attached connectors. On some devices,
2184 interrupt. 747 it may be possible to have a CRTC send data to more than one
748 encoder. In that case, both encoders would receive data from
749 the same scanout buffer, resulting in a "cloned" display
750 configuration across the connectors attached to each encoder.
2185 </para> 751 </para>
2186 <para> 752 <para>
2187 Resources allocated by <function>drm_vblank_init</function> must be freed 753 A connector is the final destination for pixel data on a device,
2188 with a call to <function>drm_vblank_cleanup</function> in the driver 754 and usually connects directly to an external display device like
2189 <methodname>unload</methodname> operation handler. 755 a monitor or laptop panel. A connector can only be attached to
756 one encoder at a time. The connector is also the structure
757 where information about the attached display is kept, so it
758 contains fields for display data, EDID data, DPMS &amp;
759 connection status, and information about modes supported on the
760 attached displays.
2190 </para> 761 </para>
762<!--!Edrivers/char/drm/drm_crtc.c-->
2191 </sect1> 763 </sect1>
2192 764
2193 <!-- Internals: open/close, file operations and ioctls -->
2194
2195 <sect1> 765 <sect1>
2196 <title>Open/Close, File Operations and IOCTLs</title> 766 <title>Framebuffer management</title>
2197 <sect2> 767 <para>
2198 <title>Open and Close</title> 768 In order to set a mode on a given CRTC, encoder and connector
2199 <synopsis>int (*firstopen) (struct drm_device *); 769 configuration, clients need to provide a framebuffer object which
2200void (*lastclose) (struct drm_device *); 770 will provide a source of pixels for the CRTC to deliver to the encoder(s)
2201int (*open) (struct drm_device *, struct drm_file *); 771 and ultimately the connector(s) in the configuration. A framebuffer
2202void (*preclose) (struct drm_device *, struct drm_file *); 772 is fundamentally a driver specific memory object, made into an opaque
2203void (*postclose) (struct drm_device *, struct drm_file *);</synopsis> 773 handle by the DRM addfb function. Once an fb has been created this
2204 <abstract>Open and close handlers. None of those methods are mandatory. 774 way it can be passed to the KMS mode setting routines for use in
2205 </abstract> 775 a configuration.
2206 <para> 776 </para>
2207 The <methodname>firstopen</methodname> method is called by the DRM core
2208 when an application opens a device that has no other opened file handle.
2209 Similarly the <methodname>lastclose</methodname> method is called when
2210 the last application holding a file handle opened on the device closes
2211 it. Both methods are mostly used for UMS (User Mode Setting) drivers to
2212 acquire and release device resources which should be done in the
2213 <methodname>load</methodname> and <methodname>unload</methodname>
2214 methods for KMS drivers.
2215 </para>
2216 <para>
2217 Note that the <methodname>lastclose</methodname> method is also called
2218 at module unload time or, for hot-pluggable devices, when the device is
2219 unplugged. The <methodname>firstopen</methodname> and
2220 <methodname>lastclose</methodname> calls can thus be unbalanced.
2221 </para>
2222 <para>
2223 The <methodname>open</methodname> method is called every time the device
2224 is opened by an application. Drivers can allocate per-file private data
2225 in this method and store them in the struct
2226 <structname>drm_file</structname> <structfield>driver_priv</structfield>
2227 field. Note that the <methodname>open</methodname> method is called
2228 before <methodname>firstopen</methodname>.
2229 </para>
2230 <para>
2231 The close operation is split into <methodname>preclose</methodname> and
2232 <methodname>postclose</methodname> methods. Drivers must stop and
2233 cleanup all per-file operations in the <methodname>preclose</methodname>
2234 method. For instance pending vertical blanking and page flip events must
2235 be cancelled. No per-file operation is allowed on the file handle after
2236 returning from the <methodname>preclose</methodname> method.
2237 </para>
2238 <para>
2239 Finally the <methodname>postclose</methodname> method is called as the
2240 last step of the close operation, right before calling the
2241 <methodname>lastclose</methodname> method if no other open file handle
2242 exists for the device. Drivers that have allocated per-file private data
2243 in the <methodname>open</methodname> method should free it here.
2244 </para>
2245 <para>
2246 The <methodname>lastclose</methodname> method should restore CRTC and
2247 plane properties to default value, so that a subsequent open of the
2248 device will not inherit state from the previous user.
2249 </para>
2250 </sect2>
2251 <sect2>
2252 <title>File Operations</title>
2253 <synopsis>const struct file_operations *fops</synopsis>
2254 <abstract>File operations for the DRM device node.</abstract>
2255 <para>
2256 Drivers must define the file operations structure that forms the DRM
2257 userspace API entry point, even though most of those operations are
2258 implemented in the DRM core. The <methodname>open</methodname>,
2259 <methodname>release</methodname> and <methodname>ioctl</methodname>
2260 operations are handled by
2261 <programlisting>
2262 .owner = THIS_MODULE,
2263 .open = drm_open,
2264 .release = drm_release,
2265 .unlocked_ioctl = drm_ioctl,
2266 #ifdef CONFIG_COMPAT
2267 .compat_ioctl = drm_compat_ioctl,
2268 #endif
2269 </programlisting>
2270 </para>
2271 <para>
2272 Drivers that implement private ioctls that requires 32/64bit
2273 compatibility support must provide their own
2274 <methodname>compat_ioctl</methodname> handler that processes private
2275 ioctls and calls <function>drm_compat_ioctl</function> for core ioctls.
2276 </para>
2277 <para>
2278 The <methodname>read</methodname> and <methodname>poll</methodname>
2279 operations provide support for reading DRM events and polling them. They
2280 are implemented by
2281 <programlisting>
2282 .poll = drm_poll,
2283 .read = drm_read,
2284 .fasync = drm_fasync,
2285 .llseek = no_llseek,
2286 </programlisting>
2287 </para>
2288 <para>
2289 The memory mapping implementation varies depending on how the driver
2290 manages memory. Pre-GEM drivers will use <function>drm_mmap</function>,
2291 while GEM-aware drivers will use <function>drm_gem_mmap</function>. See
2292 <xref linkend="drm-gem"/>.
2293 <programlisting>
2294 .mmap = drm_gem_mmap,
2295 </programlisting>
2296 </para>
2297 <para>
2298 No other file operation is supported by the DRM API.
2299 </para>
2300 </sect2>
2301 <sect2>
2302 <title>IOCTLs</title>
2303 <synopsis>struct drm_ioctl_desc *ioctls;
2304int num_ioctls;</synopsis>
2305 <abstract>Driver-specific ioctls descriptors table.</abstract>
2306 <para>
2307 Driver-specific ioctls numbers start at DRM_COMMAND_BASE. The ioctls
2308 descriptors table is indexed by the ioctl number offset from the base
2309 value. Drivers can use the DRM_IOCTL_DEF_DRV() macro to initialize the
2310 table entries.
2311 </para>
2312 <para>
2313 <programlisting>DRM_IOCTL_DEF_DRV(ioctl, func, flags)</programlisting>
2314 <para>
2315 <parameter>ioctl</parameter> is the ioctl name. Drivers must define
2316 the DRM_##ioctl and DRM_IOCTL_##ioctl macros to the ioctl number
2317 offset from DRM_COMMAND_BASE and the ioctl number respectively. The
2318 first macro is private to the device while the second must be exposed
2319 to userspace in a public header.
2320 </para>
2321 <para>
2322 <parameter>func</parameter> is a pointer to the ioctl handler function
2323 compatible with the <type>drm_ioctl_t</type> type.
2324 <programlisting>typedef int drm_ioctl_t(struct drm_device *dev, void *data,
2325 struct drm_file *file_priv);</programlisting>
2326 </para>
2327 <para>
2328 <parameter>flags</parameter> is a bitmask combination of the following
2329 values. It restricts how the ioctl is allowed to be called.
2330 <itemizedlist>
2331 <listitem><para>
2332 DRM_AUTH - Only authenticated callers allowed
2333 </para></listitem>
2334 <listitem><para>
2335 DRM_MASTER - The ioctl can only be called on the master file
2336 handle
2337 </para></listitem>
2338 <listitem><para>
2339 DRM_ROOT_ONLY - Only callers with the SYSADMIN capability allowed
2340 </para></listitem>
2341 <listitem><para>
2342 DRM_CONTROL_ALLOW - The ioctl can only be called on a control
2343 device
2344 </para></listitem>
2345 <listitem><para>
2346 DRM_UNLOCKED - The ioctl handler will be called without locking
2347 the DRM global mutex
2348 </para></listitem>
2349 </itemizedlist>
2350 </para>
2351 </para>
2352 </sect2>
2353 </sect1> 777 </sect1>
2354 778
2355 <sect1> 779 <sect1>
2356 <title>Command submission &amp; fencing</title> 780 <title>Command submission &amp; fencing</title>
2357 <para> 781 <para>
2358 This should cover a few device-specific command submission 782 This should cover a few device specific command submission
2359 implementations. 783 implementations.
2360 </para> 784 </para>
2361 </sect1> 785 </sect1>
2362 786
2363 <!-- Internals: suspend/resume -->
2364
2365 <sect1> 787 <sect1>
2366 <title>Suspend/Resume</title> 788 <title>Suspend/resume</title>
2367 <para> 789 <para>
2368 The DRM core provides some suspend/resume code, but drivers wanting full 790 The DRM core provides some suspend/resume code, but drivers
2369 suspend/resume support should provide save() and restore() functions. 791 wanting full suspend/resume support should provide save() and
2370 These are called at suspend, hibernate, or resume time, and should perform 792 restore() functions. These will be called at suspend,
2371 any state save or restore required by your device across suspend or 793 hibernate, or resume time, and should perform any state save or
2372 hibernate states. 794 restore required by your device across suspend or hibernate
2373 </para> 795 states.
2374 <synopsis>int (*suspend) (struct drm_device *, pm_message_t state);
2375int (*resume) (struct drm_device *);</synopsis>
2376 <para>
2377 Those are legacy suspend and resume methods. New driver should use the
2378 power management interface provided by their bus type (usually through
2379 the struct <structname>device_driver</structname> dev_pm_ops) and set
2380 these methods to NULL.
2381 </para> 796 </para>
2382 </sect1> 797 </sect1>
2383 798
@@ -2390,35 +805,6 @@ int (*resume) (struct drm_device *);</synopsis>
2390 </sect1> 805 </sect1>
2391 </chapter> 806 </chapter>
2392 807
2393<!-- TODO
2394
2395- Add a glossary
2396- Document the struct_mutex catch-all lock
2397- Document connector properties
2398
2399- Why is the load method optional?
2400- What are drivers supposed to set the initial display state to, and how?
2401 Connector's DPMS states are not initialized and are thus equal to
2402 DRM_MODE_DPMS_ON. The fbcon compatibility layer calls
2403 drm_helper_disable_unused_functions(), which disables unused encoders and
2404 CRTCs, but doesn't touch the connectors' DPMS state, and
2405 drm_helper_connector_dpms() in reaction to fbdev blanking events. Do drivers
2406 that don't implement (or just don't use) fbcon compatibility need to call
2407 those functions themselves?
2408- KMS drivers must call drm_vblank_pre_modeset() and drm_vblank_post_modeset()
2409 around mode setting. Should this be done in the DRM core?
2410- vblank_disable_allowed is set to 1 in the first drm_vblank_post_modeset()
2411 call and never set back to 0. It seems to be safe to permanently set it to 1
2412 in drm_vblank_init() for KMS driver, and it might be safe for UMS drivers as
2413 well. This should be investigated.
2414- crtc and connector .save and .restore operations are only used internally in
2415 drivers, should they be removed from the core?
2416- encoder mid-layer .save and .restore operations are only used internally in
2417 drivers, should they be removed from the core?
2418- encoder mid-layer .detect operation is only used internally in drivers,
2419 should it be removed from the core?
2420-->
2421
2422 <!-- External interfaces --> 808 <!-- External interfaces -->
2423 809
2424 <chapter id="drmExternals"> 810 <chapter id="drmExternals">
@@ -2426,8 +812,8 @@ int (*resume) (struct drm_device *);</synopsis>
2426 <para> 812 <para>
2427 The DRM core exports several interfaces to applications, 813 The DRM core exports several interfaces to applications,
2428 generally intended to be used through corresponding libdrm 814 generally intended to be used through corresponding libdrm
2429 wrapper functions. In addition, drivers export device-specific 815 wrapper functions. In addition, drivers export device specific
2430 interfaces for use by userspace drivers &amp; device-aware 816 interfaces for use by userspace drivers &amp; device aware
2431 applications through ioctls and sysfs files. 817 applications through ioctls and sysfs files.
2432 </para> 818 </para>
2433 <para> 819 <para>
@@ -2436,45 +822,9 @@ int (*resume) (struct drm_device *);</synopsis>
2436 management, memory management, and output management. 822 management, memory management, and output management.
2437 </para> 823 </para>
2438 <para> 824 <para>
2439 Cover generic ioctls and sysfs layout here. We only need high-level 825 Cover generic ioctls and sysfs layout here. Only need high
2440 info, since man pages should cover the rest. 826 level info, since man pages will cover the rest.
2441 </para> 827 </para>
2442
2443 <!-- External: vblank handling -->
2444
2445 <sect1>
2446 <title>VBlank event handling</title>
2447 <para>
2448 The DRM core exposes two vertical blank related ioctls:
2449 <variablelist>
2450 <varlistentry>
2451 <term>DRM_IOCTL_WAIT_VBLANK</term>
2452 <listitem>
2453 <para>
2454 This takes a struct drm_wait_vblank structure as its argument,
2455 and it is used to block or request a signal when a specified
2456 vblank event occurs.
2457 </para>
2458 </listitem>
2459 </varlistentry>
2460 <varlistentry>
2461 <term>DRM_IOCTL_MODESET_CTL</term>
2462 <listitem>
2463 <para>
2464 This should be called by application level drivers before and
2465 after mode setting, since on many devices the vertical blank
2466 counter is reset at that time. Internally, the DRM snapshots
2467 the last vblank count when the ioctl is called with the
2468 _DRM_PRE_MODESET command, so that the counter won't go backwards
2469 (which is dealt with when _DRM_POST_MODESET is used).
2470 </para>
2471 </listitem>
2472 </varlistentry>
2473 </variablelist>
2474<!--!Edrivers/char/drm/drm_irq.c-->
2475 </para>
2476 </sect1>
2477
2478 </chapter> 828 </chapter>
2479 829
2480 <!-- API reference --> 830 <!-- API reference -->
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl
index 25b58efd955..f51f28531b8 100644
--- a/Documentation/DocBook/filesystems.tmpl
+++ b/Documentation/DocBook/filesystems.tmpl
@@ -224,8 +224,8 @@ all your transactions.
224</para> 224</para>
225 225
226<para> 226<para>
227Then at umount time , in your put_super() you can then call journal_destroy() 227Then at umount time , in your put_super() (2.4) or write_super() (2.5)
228to clean up your in-core journal object. 228you can then call journal_destroy() to clean up your in-core journal object.
229</para> 229</para>
230 230
231<para> 231<para>
@@ -387,7 +387,7 @@ an example.
387 <title>See also</title> 387 <title>See also</title>
388 <para> 388 <para>
389 <citation> 389 <citation>
390 <ulink url="http://kernel.org/pub/linux/kernel/people/sct/ext3/journal-design.ps.gz"> 390 <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz">
391 Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie 391 Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie
392 </ulink> 392 </ulink>
393 </citation> 393 </citation>
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 4017f147ba2..6ef2f0073e5 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -671,7 +671,7 @@ than a kernel driver.
671<para>There's a USB Mass Storage class driver, which provides 671<para>There's a USB Mass Storage class driver, which provides
672a different solution for interoperability with systems such 672a different solution for interoperability with systems such
673as MS-Windows and MacOS. 673as MS-Windows and MacOS.
674That <emphasis>Mass Storage</emphasis> driver uses a 674That <emphasis>File-backed Storage</emphasis> driver uses a
675file or block device as backing store for a drive, 675file or block device as backing store for a drive,
676like the <filename>loop</filename> driver. 676like the <filename>loop</filename> driver.
677The USB host uses the BBB, CB, or CBI versions of the mass 677The USB host uses the BBB, CB, or CBI versions of the mass
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index f75ab4c1b28..7160652a873 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -58,9 +58,6 @@
58 58
59 <sect1><title>String Conversions</title> 59 <sect1><title>String Conversions</title>
60!Elib/vsprintf.c 60!Elib/vsprintf.c
61!Finclude/linux/kernel.h kstrtol
62!Finclude/linux/kernel.h kstrtoul
63!Elib/kstrtox.c
64 </sect1> 61 </sect1>
65 <sect1><title>String Manipulation</title> 62 <sect1><title>String Manipulation</title>
66<!-- All functions are exported at now 63<!-- All functions are exported at now
@@ -215,6 +212,19 @@ X!Edrivers/pci/hotplug.c
215 <sect1><title>PCI Hotplug Support Library</title> 212 <sect1><title>PCI Hotplug Support Library</title>
216!Edrivers/pci/hotplug/pci_hotplug_core.c 213!Edrivers/pci/hotplug/pci_hotplug_core.c
217 </sect1> 214 </sect1>
215 <sect1><title>MCA Architecture</title>
216 <sect2><title>MCA Device Functions</title>
217 <para>
218 Refer to the file arch/x86/kernel/mca_32.c for more information.
219 </para>
220<!-- FIXME: Removed for now since no structured comments in source
221X!Earch/x86/kernel/mca_32.c
222-->
223 </sect2>
224 <sect2><title>MCA Bus DMA</title>
225!Iarch/x86/include/asm/mca_dma.h
226 </sect2>
227 </sect1>
218 </chapter> 228 </chapter>
219 229
220 <chapter id="firmware"> 230 <chapter id="firmware">
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index eee71426ecb..07a9c48de5a 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -1289,7 +1289,7 @@ static struct block_device_operations opt_fops = {
1289 * Sparc assembly will do this to ya. 1289 * Sparc assembly will do this to ya.
1290 */ 1290 */
1291C_LABEL(cputypvar): 1291C_LABEL(cputypvar):
1292 .asciz "compatibility" 1292 .asciz "compatability"
1293 1293
1294/* Tested on SS-5, SS-10. Probably someone at Sun applied a spell-checker. */ 1294/* Tested on SS-5, SS-10. Probably someone at Sun applied a spell-checker. */
1295 .align 4 1295 .align 4
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 4ee4ba3509f..d71b57fcf11 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -362,23 +362,6 @@
362 </para> 362 </para>
363 </para> 363 </para>
364 </sect1> 364 </sect1>
365 <sect1 id="kgdbreboot">
366 <title>Run time parameter: kgdbreboot</title>
367 <para> The kgdbreboot feature allows you to change how the debugger
368 deals with the reboot notification. You have 3 choices for the
369 behavior. The default behavior is always set to 0.</para>
370 <orderedlist>
371 <listitem><para>echo -1 > /sys/module/debug_core/parameters/kgdbreboot</para>
372 <para>Ignore the reboot notification entirely.</para>
373 </listitem>
374 <listitem><para>echo 0 > /sys/module/debug_core/parameters/kgdbreboot</para>
375 <para>Send the detach message to any attached debugger client.</para>
376 </listitem>
377 <listitem><para>echo 1 > /sys/module/debug_core/parameters/kgdbreboot</para>
378 <para>Enter the debugger on reboot notify.</para>
379 </listitem>
380 </orderedlist>
381 </sect1>
382 </chapter> 365 </chapter>
383 <chapter id="usingKDB"> 366 <chapter id="usingKDB">
384 <title>Using kdb</title> 367 <title>Using kdb</title>
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index deb71baed32..cdd1bb9aac0 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -22,8 +22,8 @@
22 <para> 22 <para>
23 The contents of this file are subject to the Open 23 The contents of this file are subject to the Open
24 Software License version 1.1 that can be found at 24 Software License version 1.1 that can be found at
25 <ulink url="http://fedoraproject.org/wiki/Licensing:OSL1.1">http://fedoraproject.org/wiki/Licensing:OSL1.1</ulink> 25 <ulink url="http://www.opensource.org/licenses/osl-1.1.txt">http://www.opensource.org/licenses/osl-1.1.txt</ulink> and is included herein
26 and is included herein by reference. 26 by reference.
27 </para> 27 </para>
28 28
29 <para> 29 <para>
@@ -918,7 +918,7 @@ and other resources, etc.
918 <title>HSM violation</title> 918 <title>HSM violation</title>
919 <para> 919 <para>
920 This error is indicated when STATUS value doesn't match HSM 920 This error is indicated when STATUS value doesn't match HSM
921 requirement during issuing or execution any ATA/ATAPI command. 921 requirement during issuing or excution any ATA/ATAPI command.
922 </para> 922 </para>
923 923
924 <itemizedlist> 924 <itemizedlist>
@@ -945,7 +945,7 @@ and other resources, etc.
945 945
946 <listitem> 946 <listitem>
947 <para> 947 <para>
948 !BSY &amp;&amp; ERR after CDB transfer starts but before the 948 !BSY &amp;&amp; ERR after CDB tranfer starts but before the
949 last byte of CDB is transferred. ATA/ATAPI standard states 949 last byte of CDB is transferred. ATA/ATAPI standard states
950 that &quot;The device shall not terminate the PACKET command 950 that &quot;The device shall not terminate the PACKET command
951 with an error before the last byte of the command packet has 951 with an error before the last byte of the command packet has
@@ -1050,7 +1050,7 @@ and other resources, etc.
1050 to complete a command. Combined with the fact that MWDMA 1050 to complete a command. Combined with the fact that MWDMA
1051 and PIO transfer errors aren't allowed to use ICRC bit up to 1051 and PIO transfer errors aren't allowed to use ICRC bit up to
1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could 1052 ATA/ATAPI-7, it seems to imply that ABRT bit alone could
1053 indicate transfer errors. 1053 indicate tranfer errors.
1054 </para> 1054 </para>
1055 <para> 1055 <para>
1056 However, ATA/ATAPI-8 draft revision 1f removes the part 1056 However, ATA/ATAPI-8 draft revision 1f removes the part
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index f9fd615427f..6628b4b9cac 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -56,50 +56,48 @@ FUNCS = \
56 write \ 56 write \
57 57
58IOCTLS = \ 58IOCTLS = \
59 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/videodev2.h) \ 59 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/videodev2.h) \
60 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/audio.h) \ 60 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/audio.h) \
61 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/ca.h) \ 61 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/ca.h) \
62 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ 62 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/dmx.h) \
63 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ 63 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/frontend.h) \
64 $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/net.h) \ 64 $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/net.h) \
65 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \ 65 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/video.h) \
66 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \ 66 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/media.h) \
67 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ 67 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/v4l2-subdev.h) \
68 VIDIOC_SUBDEV_G_FRAME_INTERVAL \ 68 VIDIOC_SUBDEV_G_FRAME_INTERVAL \
69 VIDIOC_SUBDEV_S_FRAME_INTERVAL \ 69 VIDIOC_SUBDEV_S_FRAME_INTERVAL \
70 VIDIOC_SUBDEV_ENUM_MBUS_CODE \ 70 VIDIOC_SUBDEV_ENUM_MBUS_CODE \
71 VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ 71 VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
72 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ 72 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
73 VIDIOC_SUBDEV_G_SELECTION \
74 VIDIOC_SUBDEV_S_SELECTION \
75 73
76TYPES = \ 74TYPES = \
77 $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \ 75 $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/linux/videodev2.h) \
78 $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/uapi/linux/dvb/frontend.h) 76 $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/linux/dvb/frontend.h)
79 77
80ENUMS = \ 78ENUMS = \
81 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ 79 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \
82 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/audio.h) \ 80 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/audio.h) \
83 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/ca.h) \ 81 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/ca.h) \
84 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ 82 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/dmx.h) \
85 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ 83 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/frontend.h) \
86 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/net.h) \ 84 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/net.h) \
87 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/video.h) \ 85 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/video.h) \
88 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ 86 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \
89 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) \ 87 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) \
90 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) 88 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h)
91 89
92STRUCTS = \ 90STRUCTS = \
93 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ 91 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \
94 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/uapi/linux/dvb/audio.h) \ 92 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/linux/dvb/audio.h) \
95 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \ 93 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/ca.h) \
96 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \ 94 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/dmx.h) \
97 $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \ 95 $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/frontend.h) \
98 $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/net.h) \ 96 $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/linux/dvb/net.h) \
99 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \ 97 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/video.h) \
100 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ 98 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \
101 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ 99 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) \
102 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) 100 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h)
103 101
104ERRORS = \ 102ERRORS = \
105 E2BIG \ 103 E2BIG \
@@ -195,7 +193,7 @@ DVB_DOCUMENTED = \
195# 193#
196 194
197install_media_images = \ 195install_media_images = \
198 $(Q)cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api 196 $(Q)cp $(OBJIMGFILES) $(MEDIA_OBJ_DIR)/media_api
199 197
200$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 198$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
201 $(Q)base64 -d $< >$@ 199 $(Q)base64 -d $< >$@
@@ -205,7 +203,7 @@ $(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES)
205 @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) 203 @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/)
206 @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) 204 @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/)
207 205
208$(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml 206$(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml
209 @$($(quiet)gen_xml) 207 @$($(quiet)gen_xml)
210 @( \ 208 @( \
211 echo "<programlisting>") > $@ 209 echo "<programlisting>") > $@
@@ -216,7 +214,7 @@ $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(ME
216 @( \ 214 @( \
217 echo "</programlisting>") >> $@ 215 echo "</programlisting>") >> $@
218 216
219$(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/uapi/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml 217$(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml
220 @$($(quiet)gen_xml) 218 @$($(quiet)gen_xml)
221 @( \ 219 @( \
222 echo "<programlisting>") > $@ 220 echo "<programlisting>") > $@
@@ -227,7 +225,7 @@ $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/uapi/linux/dvb/audio.h $(MEDIA_
227 @( \ 225 @( \
228 echo "</programlisting>") >> $@ 226 echo "</programlisting>") >> $@
229 227
230$(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/uapi/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml 228$(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml
231 @$($(quiet)gen_xml) 229 @$($(quiet)gen_xml)
232 @( \ 230 @( \
233 echo "<programlisting>") > $@ 231 echo "<programlisting>") > $@
@@ -238,7 +236,7 @@ $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/uapi/linux/dvb/ca.h $(MEDIA_OBJ_DI
238 @( \ 236 @( \
239 echo "</programlisting>") >> $@ 237 echo "</programlisting>") >> $@
240 238
241$(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml 239$(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml
242 @$($(quiet)gen_xml) 240 @$($(quiet)gen_xml)
243 @( \ 241 @( \
244 echo "<programlisting>") > $@ 242 echo "<programlisting>") > $@
@@ -249,7 +247,7 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_
249 @( \ 247 @( \
250 echo "</programlisting>") >> $@ 248 echo "</programlisting>") >> $@
251 249
252$(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml 250$(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml
253 @$($(quiet)gen_xml) 251 @$($(quiet)gen_xml)
254 @( \ 252 @( \
255 echo "<programlisting>") > $@ 253 echo "<programlisting>") > $@
@@ -260,7 +258,7 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(
260 @( \ 258 @( \
261 echo "</programlisting>") >> $@ 259 echo "</programlisting>") >> $@
262 260
263$(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/uapi/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml 261$(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml
264 @$($(quiet)gen_xml) 262 @$($(quiet)gen_xml)
265 @( \ 263 @( \
266 echo "<programlisting>") > $@ 264 echo "<programlisting>") > $@
@@ -271,7 +269,7 @@ $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/uapi/linux/dvb/net.h $(MEDIA_OBJ_
271 @( \ 269 @( \
272 echo "</programlisting>") >> $@ 270 echo "</programlisting>") >> $@
273 271
274$(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/uapi/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml 272$(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml
275 @$($(quiet)gen_xml) 273 @$($(quiet)gen_xml)
276 @( \ 274 @( \
277 echo "<programlisting>") > $@ 275 echo "<programlisting>") > $@
@@ -300,7 +298,7 @@ $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml
300 @( \ 298 @( \
301 for ident in $(IOCTLS) ; do \ 299 for ident in $(IOCTLS) ; do \
302 entity=`echo $$ident | tr _ -` ; \ 300 entity=`echo $$ident | tr _ -` ; \
303 id=`grep "<refname>$$ident" $(MEDIA_OBJ_DIR)/vidioc-*.xml $(MEDIA_OBJ_DIR)/media-ioc-*.xml | sed -r s,"^.*/(.*).xml.*","\1",` ; \ 301 id=`grep "<refname>$$ident" $(MEDIA_OBJ_DIR)/vidioc-*.xml | sed -r s,"^.*/(.*).xml.*","\1",` ; \
304 echo "<!ENTITY $$entity \"<link" \ 302 echo "<!ENTITY $$entity \"<link" \
305 "linkend='$$id'><constant>$$ident</constant></link>\">" \ 303 "linkend='$$id'><constant>$$ident</constant></link>\">" \
306 >>$@ ; \ 304 >>$@ ; \
diff --git a/Documentation/DocBook/media/constraints.png.b64 b/Documentation/DocBook/media/constraints.png.b64
deleted file mode 100644
index 125b4a94962..00000000000
--- a/Documentation/DocBook/media/constraints.png.b64
+++ /dev/null
@@ -1,59 +0,0 @@
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
59RU5ErkJggg==
diff --git a/Documentation/DocBook/media/selection.png.b64 b/Documentation/DocBook/media/selection.png.b64
deleted file mode 100644
index 416186558cb..00000000000
--- a/Documentation/DocBook/media/selection.png.b64
+++ /dev/null
@@ -1,206 +0,0 @@
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
177wiIAAAAAHn5oAgAAgLG1OKcKkI/KIgAAAAAehEUAAAAAPAiLAAAAAHgQFgEAAADwYIJrAAAAivq4
178frz9+7mJtre8/vm1SxN3z71ubl1bl5n6PUe2K3adW4/DWvsfPb5737PlmJrc/T2VRQAAABSzNHB/
179929bX3/W9u/ZzjO2/+gxOrrcrcve856alt8qlUUAAAAUsVb18zpoX3r9/d8+rh+L1Sdbq19itu91
180uXu28/73qapz9tiyjyWWneo9Z+xvb1QWAQAAkF3M7WGxAczSa3Pac9vbnu08M7RYu+3r8/b5eM3W
181dj/aFjmO8xnnUQuERQAAABSzNQhZen3Mv81VK6UOZPZu52i3Qe1p99zhmYqi79yGBgAAABFShjqf
182t88vy4sNsfZMon10H9fmYzozbMndHqMSFgEAANCleyBzDzS2VBWVmDfoXfVTrsqnFPv4/HevYRd9
183ERYBAABApBwhzlxodHRC59T7WGM4pIIoD2ERAAAAxWy9bWntaWdrnquL7v8dY2sIcXQ7n9d55oTd
184e7Z9yzHds2+520OF1HcmuAYAACC7mKdOzT1ZbG0enVqeHrZlO1sLKO5PQXv9s8WeY5b7ONdyHtVG
185ZREAAABFPM9zs6UqaOn1MQP8Ek/T2rOde+ZFamVC55T7lqo9SsxD1QuVRQAAABSz9RHzex9Jb7+O
186i7l1b8utc3uqkfa8p6blt+oyTdO0+U2XSwghhNvtpgUBgOyu12sIIYQd3RZKdix/9xGnRwdcXxEA
187zvbxux91+f3fMf0plUUAAAAAPJizCACA09yrxl7NVbBvef3za5cq4udeN7eurctM/Z4j2xW7ztT7
188eH/t2nGda//YZS7tz1q77DlmAL1SWQQAwCmWBvbv/m3r68/a/j3becb2x+5jDccixTLn9qXm9oc9
189Pq4fi38gRrHKopikvvQvG3vWs+fLxS8yfpEBAOb7DDH9taXX3//ter0u9pP29AvXtu91uXu2c6mP
190d6RftsWWdR89FiXsOWZ7zw+ojcmaSaFIZVGqXx5S/nqzd3v37r9fZAAA1sOGd3+/9votPz6msue2
191tz3bWWvgcsaxOLq81tof4EzZK4u2/mq05XVry1/7ZWPLLw4pvlBTbXcNHQS/yAAAOfoae19/u90W
192K5zvP3jN9V9S9lf2budaFXlpe6uacrRnquW11P4AZ8paWbT1V6PUy6/h1wO/yPjCBQD6kzNcWqrk
193fve61z9792duOTX05e7bkONHyL3tD9CzIreh5f6CWftlo9aORMntzn1Puy9XAKBmr2HDliqSEkHK
1947XYTWpx8fmh/gD9+1LhRZ06SfOQLodQEhEe+BN+VYKdc9mtbqCoCAHqVo5/zroJmy5QKqfclV9+x
195tr7snvYH6NmPkXe+9nCn1Q6T0AgAiO2LbekjrD3tLKav8lwtErvuPU/KPbKdc/2qVo5diW0+crtd
196D+0PkNtfNW7UvQz0tRz0zKdb7Nnu5+2v5YumxPbMlfECALz2tbY+DGTtCbO1PBxky3a21E86eiy2
197PiE4VT+9l/YHKKVIZdHR0s21JyDs/WWjhvmM/CIDAIzouX+3pSpo6fUxfbsSc2nu2c49fdaUUzds
198DWy27mOq45dif1K1P0DPslYWbf3VKPXya3uKQ6rt9osMANCDrQ/7qPmhJr3u17uK8b3bnGo/j94F
1990Op5BVDSZZqmafObLpdNH55rQcJrBcrWx83HLv/19ak+/Pc+Qn7rdqfc19flbA1+UuwLAGz9rt3R
200baFkx/J3H/F+lD59/wPA6T5+96Muv/87pj9VZM6iFGn93mXU8uQGv8gAAAAALShSWQQAcITKokY6
201liqLAKA6eyqLfmg2AADoj2kCANhLWAQAAB0SBgGwl7BohV9kAAAAgJEIi1YIgwAAAICRCIsAAMji
202Y6VCGwCo01+aAAAAAIA7lUUAACR10QQA0PZ3+TRN0+Y3XXQBAIDydnRbKNmx1EcEgC76UyqLAAAo
2031vkEAOq3KyzSEQAAAADokwmuAQAAAHgQFgEAAADwICwCAAAA4EFYBAAAAMCDsAgAAACAB2ERAAAA
204AA/CIgAAAAAehEUAAAAAPAiLAAAAAHgQFgEAAADwICwCAAAA4EFYBAAAAMCDsAgAAACAB2ERAAAA
205AA/CIgAAAAAehEUAAAAAPAiLAAAAAHgQFgEAAADwICwCAAAA4EFYBAAAAMCDsAgAAACAB2ERAAAA
206AA/CIgAAAAAe/g/10lQlA3JSSwAAAABJRU5ErkJggg==
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia
deleted file mode 100644
index e32ba5362e1..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.dia
+++ /dev/null
@@ -1,614 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="-0.4,6.5"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="-0.45,6.45;23.1387,16.2"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="-0.4,6.5"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="23.48871579904775"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="9.6500000000000004"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="show_background">
86 <dia:boolean val="false"/>
87 </dia:attribute>
88 </dia:object>
89 <dia:object type="Standard - Box" version="0" id="O1">
90 <dia:attribute name="obj_pos">
91 <dia:point val="0.225,9.45"/>
92 </dia:attribute>
93 <dia:attribute name="obj_bb">
94 <dia:rectangle val="0.175,9.4;8.225,14.7"/>
95 </dia:attribute>
96 <dia:attribute name="elem_corner">
97 <dia:point val="0.225,9.45"/>
98 </dia:attribute>
99 <dia:attribute name="elem_width">
100 <dia:real val="7.9499999999999975"/>
101 </dia:attribute>
102 <dia:attribute name="elem_height">
103 <dia:real val="5.1999999999999975"/>
104 </dia:attribute>
105 <dia:attribute name="border_width">
106 <dia:real val="0.10000000149011612"/>
107 </dia:attribute>
108 <dia:attribute name="border_color">
109 <dia:color val="#a52a2a"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="true"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Standard - Box" version="0" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="3.175,10.55"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="3.125,10.5;7.925,14.45"/>
121 </dia:attribute>
122 <dia:attribute name="elem_corner">
123 <dia:point val="3.175,10.55"/>
124 </dia:attribute>
125 <dia:attribute name="elem_width">
126 <dia:real val="4.6999999999999975"/>
127 </dia:attribute>
128 <dia:attribute name="elem_height">
129 <dia:real val="3.8499999999999979"/>
130 </dia:attribute>
131 <dia:attribute name="border_width">
132 <dia:real val="0.10000000149011612"/>
133 </dia:attribute>
134 <dia:attribute name="border_color">
135 <dia:color val="#0000ff"/>
136 </dia:attribute>
137 <dia:attribute name="show_background">
138 <dia:boolean val="true"/>
139 </dia:attribute>
140 </dia:object>
141 <dia:object type="Standard - Text" version="1" id="O3">
142 <dia:attribute name="obj_pos">
143 <dia:point val="3.725,11.3875"/>
144 </dia:attribute>
145 <dia:attribute name="obj_bb">
146 <dia:rectangle val="3.725,10.7925;6.6025,13.14"/>
147 </dia:attribute>
148 <dia:attribute name="text">
149 <dia:composite type="text">
150 <dia:attribute name="string">
151 <dia:string>#sink
152crop
153selection#</dia:string>
154 </dia:attribute>
155 <dia:attribute name="font">
156 <dia:font family="sans" style="0" name="Helvetica"/>
157 </dia:attribute>
158 <dia:attribute name="height">
159 <dia:real val="0.80000000000000004"/>
160 </dia:attribute>
161 <dia:attribute name="pos">
162 <dia:point val="3.725,11.3875"/>
163 </dia:attribute>
164 <dia:attribute name="color">
165 <dia:color val="#0000ff"/>
166 </dia:attribute>
167 <dia:attribute name="alignment">
168 <dia:enum val="0"/>
169 </dia:attribute>
170 </dia:composite>
171 </dia:attribute>
172 <dia:attribute name="valign">
173 <dia:enum val="3"/>
174 </dia:attribute>
175 </dia:object>
176 <dia:object type="Standard - Text" version="1" id="O4">
177 <dia:attribute name="obj_pos">
178 <dia:point val="1.475,7.9"/>
179 </dia:attribute>
180 <dia:attribute name="obj_bb">
181 <dia:rectangle val="1.475,7.305;1.475,8.0525"/>
182 </dia:attribute>
183 <dia:attribute name="text">
184 <dia:composite type="text">
185 <dia:attribute name="string">
186 <dia:string>##</dia:string>
187 </dia:attribute>
188 <dia:attribute name="font">
189 <dia:font family="sans" style="0" name="Helvetica"/>
190 </dia:attribute>
191 <dia:attribute name="height">
192 <dia:real val="0.80000000000000004"/>
193 </dia:attribute>
194 <dia:attribute name="pos">
195 <dia:point val="1.475,7.9"/>
196 </dia:attribute>
197 <dia:attribute name="color">
198 <dia:color val="#000000"/>
199 </dia:attribute>
200 <dia:attribute name="alignment">
201 <dia:enum val="0"/>
202 </dia:attribute>
203 </dia:composite>
204 </dia:attribute>
205 <dia:attribute name="valign">
206 <dia:enum val="3"/>
207 </dia:attribute>
208 </dia:object>
209 <dia:object type="Standard - Text" version="1" id="O5">
210 <dia:attribute name="obj_pos">
211 <dia:point val="0.426918,7.89569"/>
212 </dia:attribute>
213 <dia:attribute name="obj_bb">
214 <dia:rectangle val="0.426918,7.30069;3.90942,8.84819"/>
215 </dia:attribute>
216 <dia:attribute name="text">
217 <dia:composite type="text">
218 <dia:attribute name="string">
219 <dia:string>#sink media
220bus format#</dia:string>
221 </dia:attribute>
222 <dia:attribute name="font">
223 <dia:font family="sans" style="0" name="Helvetica"/>
224 </dia:attribute>
225 <dia:attribute name="height">
226 <dia:real val="0.80000000000000004"/>
227 </dia:attribute>
228 <dia:attribute name="pos">
229 <dia:point val="0.426918,7.89569"/>
230 </dia:attribute>
231 <dia:attribute name="color">
232 <dia:color val="#a52a2a"/>
233 </dia:attribute>
234 <dia:attribute name="alignment">
235 <dia:enum val="0"/>
236 </dia:attribute>
237 </dia:composite>
238 </dia:attribute>
239 <dia:attribute name="valign">
240 <dia:enum val="3"/>
241 </dia:attribute>
242 </dia:object>
243 <dia:object type="Standard - Text" version="1" id="O6">
244 <dia:attribute name="obj_pos">
245 <dia:point val="17.4887,7.75"/>
246 </dia:attribute>
247 <dia:attribute name="obj_bb">
248 <dia:rectangle val="17.4887,7.155;21.8112,8.7025"/>
249 </dia:attribute>
250 <dia:attribute name="text">
251 <dia:composite type="text">
252 <dia:attribute name="string">
253 <dia:string>#source media
254bus format#</dia:string>
255 </dia:attribute>
256 <dia:attribute name="font">
257 <dia:font family="sans" style="0" name="Helvetica"/>
258 </dia:attribute>
259 <dia:attribute name="height">
260 <dia:real val="0.80000000000000004"/>
261 </dia:attribute>
262 <dia:attribute name="pos">
263 <dia:point val="17.4887,7.75"/>
264 </dia:attribute>
265 <dia:attribute name="color">
266 <dia:color val="#8b6914"/>
267 </dia:attribute>
268 <dia:attribute name="alignment">
269 <dia:enum val="0"/>
270 </dia:attribute>
271 </dia:composite>
272 </dia:attribute>
273 <dia:attribute name="valign">
274 <dia:enum val="3"/>
275 </dia:attribute>
276 </dia:object>
277 <dia:object type="Standard - Box" version="0" id="O7">
278 <dia:attribute name="obj_pos">
279 <dia:point val="17.5244,9.5417"/>
280 </dia:attribute>
281 <dia:attribute name="obj_bb">
282 <dia:rectangle val="17.4744,9.4917;22.2387,13.35"/>
283 </dia:attribute>
284 <dia:attribute name="elem_corner">
285 <dia:point val="17.5244,9.5417"/>
286 </dia:attribute>
287 <dia:attribute name="elem_width">
288 <dia:real val="4.6643157990477508"/>
289 </dia:attribute>
290 <dia:attribute name="elem_height">
291 <dia:real val="3.758300000000002"/>
292 </dia:attribute>
293 <dia:attribute name="border_width">
294 <dia:real val="0.10000000149011612"/>
295 </dia:attribute>
296 <dia:attribute name="border_color">
297 <dia:color val="#8b6914"/>
298 </dia:attribute>
299 <dia:attribute name="show_background">
300 <dia:boolean val="true"/>
301 </dia:attribute>
302 </dia:object>
303 <dia:object type="Standard - Line" version="0" id="O8">
304 <dia:attribute name="obj_pos">
305 <dia:point val="17.5244,13.3"/>
306 </dia:attribute>
307 <dia:attribute name="obj_bb">
308 <dia:rectangle val="3.12132,13.2463;17.5781,14.4537"/>
309 </dia:attribute>
310 <dia:attribute name="conn_endpoints">
311 <dia:point val="17.5244,13.3"/>
312 <dia:point val="3.175,14.4"/>
313 </dia:attribute>
314 <dia:attribute name="numcp">
315 <dia:int val="1"/>
316 </dia:attribute>
317 <dia:attribute name="line_color">
318 <dia:color val="#e60505"/>
319 </dia:attribute>
320 <dia:attribute name="line_style">
321 <dia:enum val="4"/>
322 </dia:attribute>
323 <dia:connections>
324 <dia:connection handle="0" to="O7" connection="5"/>
325 <dia:connection handle="1" to="O2" connection="5"/>
326 </dia:connections>
327 </dia:object>
328 <dia:object type="Standard - Line" version="0" id="O9">
329 <dia:attribute name="obj_pos">
330 <dia:point val="17.5244,9.5417"/>
331 </dia:attribute>
332 <dia:attribute name="obj_bb">
333 <dia:rectangle val="3.12162,9.48832;17.5778,10.6034"/>
334 </dia:attribute>
335 <dia:attribute name="conn_endpoints">
336 <dia:point val="17.5244,9.5417"/>
337 <dia:point val="3.175,10.55"/>
338 </dia:attribute>
339 <dia:attribute name="numcp">
340 <dia:int val="1"/>
341 </dia:attribute>
342 <dia:attribute name="line_color">
343 <dia:color val="#e60505"/>
344 </dia:attribute>
345 <dia:attribute name="line_style">
346 <dia:enum val="4"/>
347 </dia:attribute>
348 <dia:connections>
349 <dia:connection handle="0" to="O7" connection="0"/>
350 <dia:connection handle="1" to="O2" connection="0"/>
351 </dia:connections>
352 </dia:object>
353 <dia:object type="Standard - Line" version="0" id="O10">
354 <dia:attribute name="obj_pos">
355 <dia:point val="22.1887,13.3"/>
356 </dia:attribute>
357 <dia:attribute name="obj_bb">
358 <dia:rectangle val="7.82132,13.2463;22.2424,14.4537"/>
359 </dia:attribute>
360 <dia:attribute name="conn_endpoints">
361 <dia:point val="22.1887,13.3"/>
362 <dia:point val="7.875,14.4"/>
363 </dia:attribute>
364 <dia:attribute name="numcp">
365 <dia:int val="1"/>
366 </dia:attribute>
367 <dia:attribute name="line_color">
368 <dia:color val="#e60505"/>
369 </dia:attribute>
370 <dia:attribute name="line_style">
371 <dia:enum val="4"/>
372 </dia:attribute>
373 <dia:connections>
374 <dia:connection handle="0" to="O7" connection="7"/>
375 <dia:connection handle="1" to="O2" connection="7"/>
376 </dia:connections>
377 </dia:object>
378 <dia:object type="Standard - Line" version="0" id="O11">
379 <dia:attribute name="obj_pos">
380 <dia:point val="22.1887,9.5417"/>
381 </dia:attribute>
382 <dia:attribute name="obj_bb">
383 <dia:rectangle val="7.82161,9.48831;22.2421,10.6034"/>
384 </dia:attribute>
385 <dia:attribute name="conn_endpoints">
386 <dia:point val="22.1887,9.5417"/>
387 <dia:point val="7.875,10.55"/>
388 </dia:attribute>
389 <dia:attribute name="numcp">
390 <dia:int val="1"/>
391 </dia:attribute>
392 <dia:attribute name="line_color">
393 <dia:color val="#e60505"/>
394 </dia:attribute>
395 <dia:attribute name="line_style">
396 <dia:enum val="4"/>
397 </dia:attribute>
398 <dia:connections>
399 <dia:connection handle="0" to="O7" connection="2"/>
400 <dia:connection handle="1" to="O2" connection="2"/>
401 </dia:connections>
402 </dia:object>
403 <dia:object type="Geometric - Perfect Circle" version="1" id="O12">
404 <dia:attribute name="obj_pos">
405 <dia:point val="23.23,10.5742"/>
406 </dia:attribute>
407 <dia:attribute name="obj_bb">
408 <dia:rectangle val="23.18,10.5242;24.13,11.4742"/>
409 </dia:attribute>
410 <dia:attribute name="meta">
411 <dia:composite type="dict"/>
412 </dia:attribute>
413 <dia:attribute name="elem_corner">
414 <dia:point val="23.23,10.5742"/>
415 </dia:attribute>
416 <dia:attribute name="elem_width">
417 <dia:real val="0.84999999999999787"/>
418 </dia:attribute>
419 <dia:attribute name="elem_height">
420 <dia:real val="0.84999999999999787"/>
421 </dia:attribute>
422 <dia:attribute name="line_width">
423 <dia:real val="0.10000000000000001"/>
424 </dia:attribute>
425 <dia:attribute name="line_colour">
426 <dia:color val="#000000"/>
427 </dia:attribute>
428 <dia:attribute name="fill_colour">
429 <dia:color val="#ffffff"/>
430 </dia:attribute>
431 <dia:attribute name="show_background">
432 <dia:boolean val="true"/>
433 </dia:attribute>
434 <dia:attribute name="line_style">
435 <dia:enum val="0"/>
436 <dia:real val="1"/>
437 </dia:attribute>
438 <dia:attribute name="flip_horizontal">
439 <dia:boolean val="false"/>
440 </dia:attribute>
441 <dia:attribute name="flip_vertical">
442 <dia:boolean val="false"/>
443 </dia:attribute>
444 <dia:attribute name="subscale">
445 <dia:real val="1"/>
446 </dia:attribute>
447 </dia:object>
448 <dia:object type="Standard - Line" version="0" id="O13">
449 <dia:attribute name="obj_pos">
450 <dia:point val="24.08,10.9992"/>
451 </dia:attribute>
452 <dia:attribute name="obj_bb">
453 <dia:rectangle val="24.03,10.6388;32.4953,11.3624"/>
454 </dia:attribute>
455 <dia:attribute name="conn_endpoints">
456 <dia:point val="24.08,10.9992"/>
457 <dia:point val="32.3835,11.0007"/>
458 </dia:attribute>
459 <dia:attribute name="numcp">
460 <dia:int val="1"/>
461 </dia:attribute>
462 <dia:attribute name="end_arrow">
463 <dia:enum val="22"/>
464 </dia:attribute>
465 <dia:attribute name="end_arrow_length">
466 <dia:real val="0.5"/>
467 </dia:attribute>
468 <dia:attribute name="end_arrow_width">
469 <dia:real val="0.5"/>
470 </dia:attribute>
471 <dia:connections>
472 <dia:connection handle="0" to="O12" connection="3"/>
473 </dia:connections>
474 </dia:object>
475 <dia:object type="Standard - Text" version="1" id="O14">
476 <dia:attribute name="obj_pos">
477 <dia:point val="25.3454,10.49"/>
478 </dia:attribute>
479 <dia:attribute name="obj_bb">
480 <dia:rectangle val="25.3454,9.895;29.9904,10.6425"/>
481 </dia:attribute>
482 <dia:attribute name="text">
483 <dia:composite type="text">
484 <dia:attribute name="string">
485 <dia:string>#pad 1 (source)#</dia:string>
486 </dia:attribute>
487 <dia:attribute name="font">
488 <dia:font family="sans" style="0" name="Helvetica"/>
489 </dia:attribute>
490 <dia:attribute name="height">
491 <dia:real val="0.80000000000000004"/>
492 </dia:attribute>
493 <dia:attribute name="pos">
494 <dia:point val="25.3454,10.49"/>
495 </dia:attribute>
496 <dia:attribute name="color">
497 <dia:color val="#000000"/>
498 </dia:attribute>
499 <dia:attribute name="alignment">
500 <dia:enum val="0"/>
501 </dia:attribute>
502 </dia:composite>
503 </dia:attribute>
504 <dia:attribute name="valign">
505 <dia:enum val="3"/>
506 </dia:attribute>
507 </dia:object>
508 <dia:object type="Geometric - Perfect Circle" version="1" id="O15">
509 <dia:attribute name="obj_pos">
510 <dia:point val="-1.44491,11.6506"/>
511 </dia:attribute>
512 <dia:attribute name="obj_bb">
513 <dia:rectangle val="-1.49491,11.6006;-0.54491,12.5506"/>
514 </dia:attribute>
515 <dia:attribute name="meta">
516 <dia:composite type="dict"/>
517 </dia:attribute>
518 <dia:attribute name="elem_corner">
519 <dia:point val="-1.44491,11.6506"/>
520 </dia:attribute>
521 <dia:attribute name="elem_width">
522 <dia:real val="0.84999999999999787"/>
523 </dia:attribute>
524 <dia:attribute name="elem_height">
525 <dia:real val="0.84999999999999787"/>
526 </dia:attribute>
527 <dia:attribute name="line_width">
528 <dia:real val="0.10000000000000001"/>
529 </dia:attribute>
530 <dia:attribute name="line_colour">
531 <dia:color val="#000000"/>
532 </dia:attribute>
533 <dia:attribute name="fill_colour">
534 <dia:color val="#ffffff"/>
535 </dia:attribute>
536 <dia:attribute name="show_background">
537 <dia:boolean val="true"/>
538 </dia:attribute>
539 <dia:attribute name="line_style">
540 <dia:enum val="0"/>
541 <dia:real val="1"/>
542 </dia:attribute>
543 <dia:attribute name="flip_horizontal">
544 <dia:boolean val="false"/>
545 </dia:attribute>
546 <dia:attribute name="flip_vertical">
547 <dia:boolean val="false"/>
548 </dia:attribute>
549 <dia:attribute name="subscale">
550 <dia:real val="1"/>
551 </dia:attribute>
552 </dia:object>
553 <dia:object type="Standard - Line" version="0" id="O16">
554 <dia:attribute name="obj_pos">
555 <dia:point val="-9.61991,12.09"/>
556 </dia:attribute>
557 <dia:attribute name="obj_bb">
558 <dia:rectangle val="-9.67,11.7149;-1.33311,12.4385"/>
559 </dia:attribute>
560 <dia:attribute name="conn_endpoints">
561 <dia:point val="-9.61991,12.09"/>
562 <dia:point val="-1.44491,12.0756"/>
563 </dia:attribute>
564 <dia:attribute name="numcp">
565 <dia:int val="1"/>
566 </dia:attribute>
567 <dia:attribute name="end_arrow">
568 <dia:enum val="22"/>
569 </dia:attribute>
570 <dia:attribute name="end_arrow_length">
571 <dia:real val="0.5"/>
572 </dia:attribute>
573 <dia:attribute name="end_arrow_width">
574 <dia:real val="0.5"/>
575 </dia:attribute>
576 <dia:connections>
577 <dia:connection handle="1" to="O15" connection="2"/>
578 </dia:connections>
579 </dia:object>
580 <dia:object type="Standard - Text" version="1" id="O17">
581 <dia:attribute name="obj_pos">
582 <dia:point val="-7.39291,11.49"/>
583 </dia:attribute>
584 <dia:attribute name="obj_bb">
585 <dia:rectangle val="-7.39291,10.895;-3.58791,11.6425"/>
586 </dia:attribute>
587 <dia:attribute name="text">
588 <dia:composite type="text">
589 <dia:attribute name="string">
590 <dia:string>#pad 0 (sink)#</dia:string>
591 </dia:attribute>
592 <dia:attribute name="font">
593 <dia:font family="sans" style="0" name="Helvetica"/>
594 </dia:attribute>
595 <dia:attribute name="height">
596 <dia:real val="0.80000000000000004"/>
597 </dia:attribute>
598 <dia:attribute name="pos">
599 <dia:point val="-7.39291,11.49"/>
600 </dia:attribute>
601 <dia:attribute name="color">
602 <dia:color val="#000000"/>
603 </dia:attribute>
604 <dia:attribute name="alignment">
605 <dia:enum val="0"/>
606 </dia:attribute>
607 </dia:composite>
608 </dia:attribute>
609 <dia:attribute name="valign">
610 <dia:enum val="3"/>
611 </dia:attribute>
612 </dia:object>
613 </dia:layer>
614</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg
deleted file mode 100644
index 18b0f5de9ed..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg
+++ /dev/null
@@ -1,63 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="43cm" height="10cm" viewBox="-194 128 844 196" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-8" y="130" width="469.774" height="193"/>
5 <g>
6 <rect style="fill: #ffffff" x="4.5" y="189" width="159" height="104"/>
7 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="4.5" y="189" width="159" height="104"/>
8 </g>
9 <g>
10 <rect style="fill: #ffffff" x="63.5" y="211" width="94" height="77"/>
11 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="63.5" y="211" width="94" height="77"/>
12 </g>
13 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="74.5" y="227.75">
14 <tspan x="74.5" y="227.75">sink</tspan>
15 <tspan x="74.5" y="243.75">crop</tspan>
16 <tspan x="74.5" y="259.75">selection</tspan>
17 </text>
18 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="29.5" y="158">
19 <tspan x="29.5" y="158"></tspan>
20 </text>
21 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="8.53836" y="157.914">
22 <tspan x="8.53836" y="157.914">sink media</tspan>
23 <tspan x="8.53836" y="173.914">bus format</tspan>
24 </text>
25 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="349.774" y="155">
26 <tspan x="349.774" y="155">source media</tspan>
27 <tspan x="349.774" y="171">bus format</tspan>
28 </text>
29 <g>
30 <rect style="fill: #ffffff" x="350.488" y="190.834" width="93.2863" height="75.166"/>
31 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="350.488" y="190.834" width="93.2863" height="75.166"/>
32 </g>
33 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="350.488" y1="266" x2="63.5" y2="288"/>
34 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="350.488" y1="190.834" x2="63.5" y2="211"/>
35 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="443.774" y1="266" x2="157.5" y2="288"/>
36 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="443.774" y1="190.834" x2="157.5" y2="211"/>
37 <g>
38 <ellipse style="fill: #ffffff" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
39 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
40 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="473.1" cy="219.984" rx="8.5" ry="8.5"/>
41 </g>
42 <g>
43 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="481.6" y1="219.984" x2="637.934" y2="220.012"/>
44 <polygon style="fill: #000000" points="645.434,220.014 635.433,225.012 637.934,220.012 635.435,215.012 "/>
45 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="645.434,220.014 635.433,225.012 637.934,220.012 635.435,215.012 "/>
46 </g>
47 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="506.908" y="209.8">
48 <tspan x="506.908" y="209.8">pad 1 (source)</tspan>
49 </text>
50 <g>
51 <ellipse style="fill: #ffffff" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
52 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
53 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
54 </g>
55 <g>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-192.398" y1="241.8" x2="-38.6343" y2="241.529"/>
57 <polygon style="fill: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
58 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
59 </g>
60 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-147.858" y="229.8">
61 <tspan x="-147.858" y="229.8">pad 0 (sink)</tspan>
62 </text>
63</svg>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia
deleted file mode 100644
index a0d78292784..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-full.dia
+++ /dev/null
@@ -1,1588 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="15.945,6.45"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="15.895,6.4;26.4,18.95"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="15.945,6.45"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="10.404999999254942"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="12.449999999999992"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="border_color">
86 <dia:color val="#ff765a"/>
87 </dia:attribute>
88 <dia:attribute name="show_background">
89 <dia:boolean val="true"/>
90 </dia:attribute>
91 </dia:object>
92 <dia:object type="Standard - Box" version="0" id="O1">
93 <dia:attribute name="obj_pos">
94 <dia:point val="-0.1,3.65"/>
95 </dia:attribute>
96 <dia:attribute name="obj_bb">
97 <dia:rectangle val="-0.15,3.6;40.25,20.85"/>
98 </dia:attribute>
99 <dia:attribute name="elem_corner">
100 <dia:point val="-0.1,3.65"/>
101 </dia:attribute>
102 <dia:attribute name="elem_width">
103 <dia:real val="40.300000000000004"/>
104 </dia:attribute>
105 <dia:attribute name="elem_height">
106 <dia:real val="17.149999999999999"/>
107 </dia:attribute>
108 <dia:attribute name="border_width">
109 <dia:real val="0.10000000149011612"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="false"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Geometric - Perfect Circle" version="1" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="-1.05,7.9106"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="-1.1,7.8606;-0.15,8.8106"/>
121 </dia:attribute>
122 <dia:attribute name="meta">
123 <dia:composite type="dict"/>
124 </dia:attribute>
125 <dia:attribute name="elem_corner">
126 <dia:point val="-1.05,7.9106"/>
127 </dia:attribute>
128 <dia:attribute name="elem_width">
129 <dia:real val="0.84999999999999787"/>
130 </dia:attribute>
131 <dia:attribute name="elem_height">
132 <dia:real val="0.84999999999999787"/>
133 </dia:attribute>
134 <dia:attribute name="line_width">
135 <dia:real val="0.10000000000000001"/>
136 </dia:attribute>
137 <dia:attribute name="line_colour">
138 <dia:color val="#000000"/>
139 </dia:attribute>
140 <dia:attribute name="fill_colour">
141 <dia:color val="#ffffff"/>
142 </dia:attribute>
143 <dia:attribute name="show_background">
144 <dia:boolean val="true"/>
145 </dia:attribute>
146 <dia:attribute name="line_style">
147 <dia:enum val="0"/>
148 <dia:real val="1"/>
149 </dia:attribute>
150 <dia:attribute name="flip_horizontal">
151 <dia:boolean val="false"/>
152 </dia:attribute>
153 <dia:attribute name="flip_vertical">
154 <dia:boolean val="false"/>
155 </dia:attribute>
156 <dia:attribute name="subscale">
157 <dia:real val="1"/>
158 </dia:attribute>
159 </dia:object>
160 <dia:object type="Geometric - Perfect Circle" version="1" id="O3">
161 <dia:attribute name="obj_pos">
162 <dia:point val="40.3366,9.8342"/>
163 </dia:attribute>
164 <dia:attribute name="obj_bb">
165 <dia:rectangle val="40.2866,9.7842;41.2366,10.7342"/>
166 </dia:attribute>
167 <dia:attribute name="meta">
168 <dia:composite type="dict"/>
169 </dia:attribute>
170 <dia:attribute name="elem_corner">
171 <dia:point val="40.3366,9.8342"/>
172 </dia:attribute>
173 <dia:attribute name="elem_width">
174 <dia:real val="0.84999999999999787"/>
175 </dia:attribute>
176 <dia:attribute name="elem_height">
177 <dia:real val="0.84999999999999787"/>
178 </dia:attribute>
179 <dia:attribute name="line_width">
180 <dia:real val="0.10000000000000001"/>
181 </dia:attribute>
182 <dia:attribute name="line_colour">
183 <dia:color val="#000000"/>
184 </dia:attribute>
185 <dia:attribute name="fill_colour">
186 <dia:color val="#ffffff"/>
187 </dia:attribute>
188 <dia:attribute name="show_background">
189 <dia:boolean val="true"/>
190 </dia:attribute>
191 <dia:attribute name="line_style">
192 <dia:enum val="0"/>
193 <dia:real val="1"/>
194 </dia:attribute>
195 <dia:attribute name="flip_horizontal">
196 <dia:boolean val="false"/>
197 </dia:attribute>
198 <dia:attribute name="flip_vertical">
199 <dia:boolean val="false"/>
200 </dia:attribute>
201 <dia:attribute name="subscale">
202 <dia:real val="1"/>
203 </dia:attribute>
204 </dia:object>
205 <dia:object type="Standard - Line" version="0" id="O4">
206 <dia:attribute name="obj_pos">
207 <dia:point val="-9.225,8.35"/>
208 </dia:attribute>
209 <dia:attribute name="obj_bb">
210 <dia:rectangle val="-9.27509,7.97487;-0.938197,8.69848"/>
211 </dia:attribute>
212 <dia:attribute name="conn_endpoints">
213 <dia:point val="-9.225,8.35"/>
214 <dia:point val="-1.05,8.3356"/>
215 </dia:attribute>
216 <dia:attribute name="numcp">
217 <dia:int val="1"/>
218 </dia:attribute>
219 <dia:attribute name="end_arrow">
220 <dia:enum val="22"/>
221 </dia:attribute>
222 <dia:attribute name="end_arrow_length">
223 <dia:real val="0.5"/>
224 </dia:attribute>
225 <dia:attribute name="end_arrow_width">
226 <dia:real val="0.5"/>
227 </dia:attribute>
228 <dia:connections>
229 <dia:connection handle="1" to="O2" connection="2"/>
230 </dia:connections>
231 </dia:object>
232 <dia:object type="Standard - Line" version="0" id="O5">
233 <dia:attribute name="obj_pos">
234 <dia:point val="41.1866,10.2592"/>
235 </dia:attribute>
236 <dia:attribute name="obj_bb">
237 <dia:rectangle val="41.1366,9.89879;49.6019,10.6224"/>
238 </dia:attribute>
239 <dia:attribute name="conn_endpoints">
240 <dia:point val="41.1866,10.2592"/>
241 <dia:point val="49.4901,10.2607"/>
242 </dia:attribute>
243 <dia:attribute name="numcp">
244 <dia:int val="1"/>
245 </dia:attribute>
246 <dia:attribute name="end_arrow">
247 <dia:enum val="22"/>
248 </dia:attribute>
249 <dia:attribute name="end_arrow_length">
250 <dia:real val="0.5"/>
251 </dia:attribute>
252 <dia:attribute name="end_arrow_width">
253 <dia:real val="0.5"/>
254 </dia:attribute>
255 <dia:connections>
256 <dia:connection handle="0" to="O3" connection="3"/>
257 </dia:connections>
258 </dia:object>
259 <dia:object type="Standard - Text" version="1" id="O6">
260 <dia:attribute name="obj_pos">
261 <dia:point val="-6.998,7.75"/>
262 </dia:attribute>
263 <dia:attribute name="obj_bb">
264 <dia:rectangle val="-6.998,7.155;-3.193,7.9025"/>
265 </dia:attribute>
266 <dia:attribute name="text">
267 <dia:composite type="text">
268 <dia:attribute name="string">
269 <dia:string>#pad 0 (sink)#</dia:string>
270 </dia:attribute>
271 <dia:attribute name="font">
272 <dia:font family="sans" style="0" name="Helvetica"/>
273 </dia:attribute>
274 <dia:attribute name="height">
275 <dia:real val="0.80000000000000004"/>
276 </dia:attribute>
277 <dia:attribute name="pos">
278 <dia:point val="-6.998,7.75"/>
279 </dia:attribute>
280 <dia:attribute name="color">
281 <dia:color val="#000000"/>
282 </dia:attribute>
283 <dia:attribute name="alignment">
284 <dia:enum val="0"/>
285 </dia:attribute>
286 </dia:composite>
287 </dia:attribute>
288 <dia:attribute name="valign">
289 <dia:enum val="3"/>
290 </dia:attribute>
291 </dia:object>
292 <dia:object type="Standard - Text" version="1" id="O7">
293 <dia:attribute name="obj_pos">
294 <dia:point val="42.452,9.75"/>
295 </dia:attribute>
296 <dia:attribute name="obj_bb">
297 <dia:rectangle val="42.452,9.155;47.097,9.9025"/>
298 </dia:attribute>
299 <dia:attribute name="text">
300 <dia:composite type="text">
301 <dia:attribute name="string">
302 <dia:string>#pad 2 (source)#</dia:string>
303 </dia:attribute>
304 <dia:attribute name="font">
305 <dia:font family="sans" style="0" name="Helvetica"/>
306 </dia:attribute>
307 <dia:attribute name="height">
308 <dia:real val="0.80000000000000004"/>
309 </dia:attribute>
310 <dia:attribute name="pos">
311 <dia:point val="42.452,9.75"/>
312 </dia:attribute>
313 <dia:attribute name="color">
314 <dia:color val="#000000"/>
315 </dia:attribute>
316 <dia:attribute name="alignment">
317 <dia:enum val="0"/>
318 </dia:attribute>
319 </dia:composite>
320 </dia:attribute>
321 <dia:attribute name="valign">
322 <dia:enum val="3"/>
323 </dia:attribute>
324 </dia:object>
325 <dia:object type="Standard - Box" version="0" id="O8">
326 <dia:attribute name="obj_pos">
327 <dia:point val="0.275,6"/>
328 </dia:attribute>
329 <dia:attribute name="obj_bb">
330 <dia:rectangle val="0.225,5.95;8.275,11.25"/>
331 </dia:attribute>
332 <dia:attribute name="elem_corner">
333 <dia:point val="0.275,6"/>
334 </dia:attribute>
335 <dia:attribute name="elem_width">
336 <dia:real val="7.9499999999999975"/>
337 </dia:attribute>
338 <dia:attribute name="elem_height">
339 <dia:real val="5.1999999999999975"/>
340 </dia:attribute>
341 <dia:attribute name="border_width">
342 <dia:real val="0.10000000149011612"/>
343 </dia:attribute>
344 <dia:attribute name="border_color">
345 <dia:color val="#a52a2a"/>
346 </dia:attribute>
347 <dia:attribute name="show_background">
348 <dia:boolean val="true"/>
349 </dia:attribute>
350 </dia:object>
351 <dia:object type="Standard - Box" version="0" id="O9">
352 <dia:attribute name="obj_pos">
353 <dia:point val="3.125,6.8"/>
354 </dia:attribute>
355 <dia:attribute name="obj_bb">
356 <dia:rectangle val="3.075,6.75;7.875,10.7"/>
357 </dia:attribute>
358 <dia:attribute name="elem_corner">
359 <dia:point val="3.125,6.8"/>
360 </dia:attribute>
361 <dia:attribute name="elem_width">
362 <dia:real val="4.6999999999999975"/>
363 </dia:attribute>
364 <dia:attribute name="elem_height">
365 <dia:real val="3.8499999999999979"/>
366 </dia:attribute>
367 <dia:attribute name="border_width">
368 <dia:real val="0.10000000149011612"/>
369 </dia:attribute>
370 <dia:attribute name="border_color">
371 <dia:color val="#0000ff"/>
372 </dia:attribute>
373 <dia:attribute name="show_background">
374 <dia:boolean val="true"/>
375 </dia:attribute>
376 </dia:object>
377 <dia:object type="Standard - Text" version="1" id="O10">
378 <dia:attribute name="obj_pos">
379 <dia:point val="1.525,4.45"/>
380 </dia:attribute>
381 <dia:attribute name="obj_bb">
382 <dia:rectangle val="1.525,3.855;1.525,4.6025"/>
383 </dia:attribute>
384 <dia:attribute name="text">
385 <dia:composite type="text">
386 <dia:attribute name="string">
387 <dia:string>##</dia:string>
388 </dia:attribute>
389 <dia:attribute name="font">
390 <dia:font family="sans" style="0" name="Helvetica"/>
391 </dia:attribute>
392 <dia:attribute name="height">
393 <dia:real val="0.80000000000000004"/>
394 </dia:attribute>
395 <dia:attribute name="pos">
396 <dia:point val="1.525,4.45"/>
397 </dia:attribute>
398 <dia:attribute name="color">
399 <dia:color val="#000000"/>
400 </dia:attribute>
401 <dia:attribute name="alignment">
402 <dia:enum val="0"/>
403 </dia:attribute>
404 </dia:composite>
405 </dia:attribute>
406 <dia:attribute name="valign">
407 <dia:enum val="3"/>
408 </dia:attribute>
409 </dia:object>
410 <dia:object type="Standard - Text" version="1" id="O11">
411 <dia:attribute name="obj_pos">
412 <dia:point val="0.476918,4.44569"/>
413 </dia:attribute>
414 <dia:attribute name="obj_bb">
415 <dia:rectangle val="0.476918,3.85069;3.95942,5.39819"/>
416 </dia:attribute>
417 <dia:attribute name="text">
418 <dia:composite type="text">
419 <dia:attribute name="string">
420 <dia:string>#sink media
421bus format#</dia:string>
422 </dia:attribute>
423 <dia:attribute name="font">
424 <dia:font family="sans" style="0" name="Helvetica"/>
425 </dia:attribute>
426 <dia:attribute name="height">
427 <dia:real val="0.80000000000000004"/>
428 </dia:attribute>
429 <dia:attribute name="pos">
430 <dia:point val="0.476918,4.44569"/>
431 </dia:attribute>
432 <dia:attribute name="color">
433 <dia:color val="#a52a2a"/>
434 </dia:attribute>
435 <dia:attribute name="alignment">
436 <dia:enum val="0"/>
437 </dia:attribute>
438 </dia:composite>
439 </dia:attribute>
440 <dia:attribute name="valign">
441 <dia:enum val="3"/>
442 </dia:attribute>
443 </dia:object>
444 <dia:object type="Standard - Box" version="0" id="O12">
445 <dia:attribute name="obj_pos">
446 <dia:point val="16.6822,9.28251"/>
447 </dia:attribute>
448 <dia:attribute name="obj_bb">
449 <dia:rectangle val="16.6322,9.23251;24.9922,17.9564"/>
450 </dia:attribute>
451 <dia:attribute name="elem_corner">
452 <dia:point val="16.6822,9.28251"/>
453 </dia:attribute>
454 <dia:attribute name="elem_width">
455 <dia:real val="8.2600228398861297"/>
456 </dia:attribute>
457 <dia:attribute name="elem_height">
458 <dia:real val="8.6238900617957164"/>
459 </dia:attribute>
460 <dia:attribute name="border_width">
461 <dia:real val="0.10000000149011612"/>
462 </dia:attribute>
463 <dia:attribute name="border_color">
464 <dia:color val="#00ff00"/>
465 </dia:attribute>
466 <dia:attribute name="show_background">
467 <dia:boolean val="true"/>
468 </dia:attribute>
469 </dia:object>
470 <dia:object type="Standard - Line" version="0" id="O13">
471 <dia:attribute name="obj_pos">
472 <dia:point val="16.6822,17.9064"/>
473 </dia:attribute>
474 <dia:attribute name="obj_bb">
475 <dia:rectangle val="3.05732,10.5823;16.7499,17.9741"/>
476 </dia:attribute>
477 <dia:attribute name="conn_endpoints">
478 <dia:point val="16.6822,17.9064"/>
479 <dia:point val="3.125,10.65"/>
480 </dia:attribute>
481 <dia:attribute name="numcp">
482 <dia:int val="1"/>
483 </dia:attribute>
484 <dia:attribute name="line_color">
485 <dia:color val="#e60505"/>
486 </dia:attribute>
487 <dia:attribute name="line_style">
488 <dia:enum val="4"/>
489 </dia:attribute>
490 <dia:connections>
491 <dia:connection handle="0" to="O12" connection="5"/>
492 <dia:connection handle="1" to="O9" connection="5"/>
493 </dia:connections>
494 </dia:object>
495 <dia:object type="Standard - Line" version="0" id="O14">
496 <dia:attribute name="obj_pos">
497 <dia:point val="16.6822,9.28251"/>
498 </dia:attribute>
499 <dia:attribute name="obj_bb">
500 <dia:rectangle val="3.06681,6.74181;16.7404,9.3407"/>
501 </dia:attribute>
502 <dia:attribute name="conn_endpoints">
503 <dia:point val="16.6822,9.28251"/>
504 <dia:point val="3.125,6.8"/>
505 </dia:attribute>
506 <dia:attribute name="numcp">
507 <dia:int val="1"/>
508 </dia:attribute>
509 <dia:attribute name="line_color">
510 <dia:color val="#e60505"/>
511 </dia:attribute>
512 <dia:attribute name="line_style">
513 <dia:enum val="4"/>
514 </dia:attribute>
515 <dia:connections>
516 <dia:connection handle="0" to="O12" connection="0"/>
517 <dia:connection handle="1" to="O9" connection="0"/>
518 </dia:connections>
519 </dia:object>
520 <dia:object type="Standard - Line" version="0" id="O15">
521 <dia:attribute name="obj_pos">
522 <dia:point val="24.9422,17.9064"/>
523 </dia:attribute>
524 <dia:attribute name="obj_bb">
525 <dia:rectangle val="7.75945,10.5845;25.0077,17.9719"/>
526 </dia:attribute>
527 <dia:attribute name="conn_endpoints">
528 <dia:point val="24.9422,17.9064"/>
529 <dia:point val="7.825,10.65"/>
530 </dia:attribute>
531 <dia:attribute name="numcp">
532 <dia:int val="1"/>
533 </dia:attribute>
534 <dia:attribute name="line_color">
535 <dia:color val="#e60505"/>
536 </dia:attribute>
537 <dia:attribute name="line_style">
538 <dia:enum val="4"/>
539 </dia:attribute>
540 <dia:connections>
541 <dia:connection handle="0" to="O12" connection="7"/>
542 <dia:connection handle="1" to="O9" connection="7"/>
543 </dia:connections>
544 </dia:object>
545 <dia:object type="Standard - Line" version="0" id="O16">
546 <dia:attribute name="obj_pos">
547 <dia:point val="24.9422,9.28251"/>
548 </dia:attribute>
549 <dia:attribute name="obj_bb">
550 <dia:rectangle val="7.76834,6.74334;24.9989,9.33917"/>
551 </dia:attribute>
552 <dia:attribute name="conn_endpoints">
553 <dia:point val="24.9422,9.28251"/>
554 <dia:point val="7.825,6.8"/>
555 </dia:attribute>
556 <dia:attribute name="numcp">
557 <dia:int val="1"/>
558 </dia:attribute>
559 <dia:attribute name="line_color">
560 <dia:color val="#e60505"/>
561 </dia:attribute>
562 <dia:attribute name="line_style">
563 <dia:enum val="4"/>
564 </dia:attribute>
565 <dia:connections>
566 <dia:connection handle="0" to="O12" connection="2"/>
567 <dia:connection handle="1" to="O9" connection="2"/>
568 </dia:connections>
569 </dia:object>
570 <dia:object type="Standard - Text" version="1" id="O17">
571 <dia:attribute name="obj_pos">
572 <dia:point val="16.7352,7.47209"/>
573 </dia:attribute>
574 <dia:attribute name="obj_bb">
575 <dia:rectangle val="16.7352,6.87709;22.5602,8.42459"/>
576 </dia:attribute>
577 <dia:attribute name="text">
578 <dia:composite type="text">
579 <dia:attribute name="string">
580 <dia:string>#sink compose
581selection (scaling)#</dia:string>
582 </dia:attribute>
583 <dia:attribute name="font">
584 <dia:font family="sans" style="0" name="Helvetica"/>
585 </dia:attribute>
586 <dia:attribute name="height">
587 <dia:real val="0.80000000000000004"/>
588 </dia:attribute>
589 <dia:attribute name="pos">
590 <dia:point val="16.7352,7.47209"/>
591 </dia:attribute>
592 <dia:attribute name="color">
593 <dia:color val="#00ff00"/>
594 </dia:attribute>
595 <dia:attribute name="alignment">
596 <dia:enum val="0"/>
597 </dia:attribute>
598 </dia:composite>
599 </dia:attribute>
600 <dia:attribute name="valign">
601 <dia:enum val="3"/>
602 </dia:attribute>
603 </dia:object>
604 <dia:object type="Standard - Box" version="0" id="O18">
605 <dia:attribute name="obj_pos">
606 <dia:point val="20.4661,9.72825"/>
607 </dia:attribute>
608 <dia:attribute name="obj_bb">
609 <dia:rectangle val="20.4161,9.67825;25.5254,13.3509"/>
610 </dia:attribute>
611 <dia:attribute name="elem_corner">
612 <dia:point val="20.4661,9.72825"/>
613 </dia:attribute>
614 <dia:attribute name="elem_width">
615 <dia:real val="5.009308462554376"/>
616 </dia:attribute>
617 <dia:attribute name="elem_height">
618 <dia:real val="3.5726155970598077"/>
619 </dia:attribute>
620 <dia:attribute name="border_width">
621 <dia:real val="0.10000000149011612"/>
622 </dia:attribute>
623 <dia:attribute name="border_color">
624 <dia:color val="#a020f0"/>
625 </dia:attribute>
626 <dia:attribute name="show_background">
627 <dia:boolean val="true"/>
628 </dia:attribute>
629 </dia:object>
630 <dia:object type="Standard - Text" version="1" id="O19">
631 <dia:attribute name="obj_pos">
632 <dia:point val="34.475,5.2564"/>
633 </dia:attribute>
634 <dia:attribute name="obj_bb">
635 <dia:rectangle val="34.475,4.6614;38.7975,6.2089"/>
636 </dia:attribute>
637 <dia:attribute name="text">
638 <dia:composite type="text">
639 <dia:attribute name="string">
640 <dia:string>#source media
641bus format#</dia:string>
642 </dia:attribute>
643 <dia:attribute name="font">
644 <dia:font family="sans" style="0" name="Helvetica"/>
645 </dia:attribute>
646 <dia:attribute name="height">
647 <dia:real val="0.80000000000000004"/>
648 </dia:attribute>
649 <dia:attribute name="pos">
650 <dia:point val="34.475,5.2564"/>
651 </dia:attribute>
652 <dia:attribute name="color">
653 <dia:color val="#8b6914"/>
654 </dia:attribute>
655 <dia:attribute name="alignment">
656 <dia:enum val="0"/>
657 </dia:attribute>
658 </dia:composite>
659 </dia:attribute>
660 <dia:attribute name="valign">
661 <dia:enum val="3"/>
662 </dia:attribute>
663 </dia:object>
664 <dia:object type="Standard - Box" version="0" id="O20">
665 <dia:attribute name="obj_pos">
666 <dia:point val="34.4244,8.6917"/>
667 </dia:attribute>
668 <dia:attribute name="obj_bb">
669 <dia:rectangle val="34.3744,8.6417;39.4837,12.3143"/>
670 </dia:attribute>
671 <dia:attribute name="elem_corner">
672 <dia:point val="34.4244,8.6917"/>
673 </dia:attribute>
674 <dia:attribute name="elem_width">
675 <dia:real val="5.009308462554376"/>
676 </dia:attribute>
677 <dia:attribute name="elem_height">
678 <dia:real val="3.5726155970598077"/>
679 </dia:attribute>
680 <dia:attribute name="border_width">
681 <dia:real val="0.10000000149011612"/>
682 </dia:attribute>
683 <dia:attribute name="border_color">
684 <dia:color val="#8b6914"/>
685 </dia:attribute>
686 <dia:attribute name="show_background">
687 <dia:boolean val="true"/>
688 </dia:attribute>
689 </dia:object>
690 <dia:object type="Standard - Line" version="0" id="O21">
691 <dia:attribute name="obj_pos">
692 <dia:point val="34.4244,12.2643"/>
693 </dia:attribute>
694 <dia:attribute name="obj_bb">
695 <dia:rectangle val="20.4125,12.2107;34.478,13.3545"/>
696 </dia:attribute>
697 <dia:attribute name="conn_endpoints">
698 <dia:point val="34.4244,12.2643"/>
699 <dia:point val="20.4661,13.3009"/>
700 </dia:attribute>
701 <dia:attribute name="numcp">
702 <dia:int val="1"/>
703 </dia:attribute>
704 <dia:attribute name="line_color">
705 <dia:color val="#e60505"/>
706 </dia:attribute>
707 <dia:attribute name="line_style">
708 <dia:enum val="4"/>
709 </dia:attribute>
710 <dia:connections>
711 <dia:connection handle="0" to="O20" connection="5"/>
712 <dia:connection handle="1" to="O18" connection="5"/>
713 </dia:connections>
714 </dia:object>
715 <dia:object type="Standard - Line" version="0" id="O22">
716 <dia:attribute name="obj_pos">
717 <dia:point val="34.4244,8.6917"/>
718 </dia:attribute>
719 <dia:attribute name="obj_bb">
720 <dia:rectangle val="20.4125,8.63813;34.478,9.78182"/>
721 </dia:attribute>
722 <dia:attribute name="conn_endpoints">
723 <dia:point val="34.4244,8.6917"/>
724 <dia:point val="20.4661,9.72825"/>
725 </dia:attribute>
726 <dia:attribute name="numcp">
727 <dia:int val="1"/>
728 </dia:attribute>
729 <dia:attribute name="line_color">
730 <dia:color val="#e60505"/>
731 </dia:attribute>
732 <dia:attribute name="line_style">
733 <dia:enum val="4"/>
734 </dia:attribute>
735 <dia:connections>
736 <dia:connection handle="0" to="O20" connection="0"/>
737 <dia:connection handle="1" to="O18" connection="0"/>
738 </dia:connections>
739 </dia:object>
740 <dia:object type="Standard - Line" version="0" id="O23">
741 <dia:attribute name="obj_pos">
742 <dia:point val="39.4337,12.2643"/>
743 </dia:attribute>
744 <dia:attribute name="obj_bb">
745 <dia:rectangle val="25.4218,12.2107;39.4873,13.3545"/>
746 </dia:attribute>
747 <dia:attribute name="conn_endpoints">
748 <dia:point val="39.4337,12.2643"/>
749 <dia:point val="25.4754,13.3009"/>
750 </dia:attribute>
751 <dia:attribute name="numcp">
752 <dia:int val="1"/>
753 </dia:attribute>
754 <dia:attribute name="line_color">
755 <dia:color val="#e60505"/>
756 </dia:attribute>
757 <dia:attribute name="line_style">
758 <dia:enum val="4"/>
759 </dia:attribute>
760 <dia:connections>
761 <dia:connection handle="0" to="O20" connection="7"/>
762 <dia:connection handle="1" to="O18" connection="7"/>
763 </dia:connections>
764 </dia:object>
765 <dia:object type="Standard - Line" version="0" id="O24">
766 <dia:attribute name="obj_pos">
767 <dia:point val="39.4337,8.6917"/>
768 </dia:attribute>
769 <dia:attribute name="obj_bb">
770 <dia:rectangle val="25.4218,8.63813;39.4873,9.78182"/>
771 </dia:attribute>
772 <dia:attribute name="conn_endpoints">
773 <dia:point val="39.4337,8.6917"/>
774 <dia:point val="25.4754,9.72825"/>
775 </dia:attribute>
776 <dia:attribute name="numcp">
777 <dia:int val="1"/>
778 </dia:attribute>
779 <dia:attribute name="line_color">
780 <dia:color val="#e60505"/>
781 </dia:attribute>
782 <dia:attribute name="line_style">
783 <dia:enum val="4"/>
784 </dia:attribute>
785 <dia:connections>
786 <dia:connection handle="0" to="O20" connection="2"/>
787 <dia:connection handle="1" to="O18" connection="2"/>
788 </dia:connections>
789 </dia:object>
790 <dia:object type="Standard - Text" version="1" id="O25">
791 <dia:attribute name="obj_pos">
792 <dia:point val="16.25,5.15"/>
793 </dia:attribute>
794 <dia:attribute name="obj_bb">
795 <dia:rectangle val="16.25,4.555;21.68,6.1025"/>
796 </dia:attribute>
797 <dia:attribute name="text">
798 <dia:composite type="text">
799 <dia:attribute name="string">
800 <dia:string>#sink compose
801bounds selection#</dia:string>
802 </dia:attribute>
803 <dia:attribute name="font">
804 <dia:font family="sans" style="0" name="Helvetica"/>
805 </dia:attribute>
806 <dia:attribute name="height">
807 <dia:real val="0.80000000000000004"/>
808 </dia:attribute>
809 <dia:attribute name="pos">
810 <dia:point val="16.25,5.15"/>
811 </dia:attribute>
812 <dia:attribute name="color">
813 <dia:color val="#ff765a"/>
814 </dia:attribute>
815 <dia:attribute name="alignment">
816 <dia:enum val="0"/>
817 </dia:attribute>
818 </dia:composite>
819 </dia:attribute>
820 <dia:attribute name="valign">
821 <dia:enum val="3"/>
822 </dia:attribute>
823 </dia:object>
824 <dia:object type="Geometric - Perfect Circle" version="1" id="O26">
825 <dia:attribute name="obj_pos">
826 <dia:point val="-1.02991,16.6506"/>
827 </dia:attribute>
828 <dia:attribute name="obj_bb">
829 <dia:rectangle val="-1.07991,16.6006;-0.12991,17.5506"/>
830 </dia:attribute>
831 <dia:attribute name="meta">
832 <dia:composite type="dict"/>
833 </dia:attribute>
834 <dia:attribute name="elem_corner">
835 <dia:point val="-1.02991,16.6506"/>
836 </dia:attribute>
837 <dia:attribute name="elem_width">
838 <dia:real val="0.84999999999999787"/>
839 </dia:attribute>
840 <dia:attribute name="elem_height">
841 <dia:real val="0.84999999999999787"/>
842 </dia:attribute>
843 <dia:attribute name="line_width">
844 <dia:real val="0.10000000000000001"/>
845 </dia:attribute>
846 <dia:attribute name="line_colour">
847 <dia:color val="#000000"/>
848 </dia:attribute>
849 <dia:attribute name="fill_colour">
850 <dia:color val="#ffffff"/>
851 </dia:attribute>
852 <dia:attribute name="show_background">
853 <dia:boolean val="true"/>
854 </dia:attribute>
855 <dia:attribute name="line_style">
856 <dia:enum val="0"/>
857 <dia:real val="1"/>
858 </dia:attribute>
859 <dia:attribute name="flip_horizontal">
860 <dia:boolean val="false"/>
861 </dia:attribute>
862 <dia:attribute name="flip_vertical">
863 <dia:boolean val="false"/>
864 </dia:attribute>
865 <dia:attribute name="subscale">
866 <dia:real val="1"/>
867 </dia:attribute>
868 </dia:object>
869 <dia:object type="Standard - Line" version="0" id="O27">
870 <dia:attribute name="obj_pos">
871 <dia:point val="-9.20491,17.09"/>
872 </dia:attribute>
873 <dia:attribute name="obj_bb">
874 <dia:rectangle val="-9.255,16.7149;-0.918107,17.4385"/>
875 </dia:attribute>
876 <dia:attribute name="conn_endpoints">
877 <dia:point val="-9.20491,17.09"/>
878 <dia:point val="-1.02991,17.0756"/>
879 </dia:attribute>
880 <dia:attribute name="numcp">
881 <dia:int val="1"/>
882 </dia:attribute>
883 <dia:attribute name="end_arrow">
884 <dia:enum val="22"/>
885 </dia:attribute>
886 <dia:attribute name="end_arrow_length">
887 <dia:real val="0.5"/>
888 </dia:attribute>
889 <dia:attribute name="end_arrow_width">
890 <dia:real val="0.5"/>
891 </dia:attribute>
892 <dia:connections>
893 <dia:connection handle="1" to="O26" connection="2"/>
894 </dia:connections>
895 </dia:object>
896 <dia:object type="Standard - Text" version="1" id="O28">
897 <dia:attribute name="obj_pos">
898 <dia:point val="-6.95,16.45"/>
899 </dia:attribute>
900 <dia:attribute name="obj_bb">
901 <dia:rectangle val="-6.95,15.855;-3.145,16.6025"/>
902 </dia:attribute>
903 <dia:attribute name="text">
904 <dia:composite type="text">
905 <dia:attribute name="string">
906 <dia:string>#pad 1 (sink)#</dia:string>
907 </dia:attribute>
908 <dia:attribute name="font">
909 <dia:font family="sans" style="0" name="Helvetica"/>
910 </dia:attribute>
911 <dia:attribute name="height">
912 <dia:real val="0.80000000000000004"/>
913 </dia:attribute>
914 <dia:attribute name="pos">
915 <dia:point val="-6.95,16.45"/>
916 </dia:attribute>
917 <dia:attribute name="color">
918 <dia:color val="#000000"/>
919 </dia:attribute>
920 <dia:attribute name="alignment">
921 <dia:enum val="0"/>
922 </dia:attribute>
923 </dia:composite>
924 </dia:attribute>
925 <dia:attribute name="valign">
926 <dia:enum val="3"/>
927 </dia:attribute>
928 </dia:object>
929 <dia:object type="Standard - Box" version="0" id="O29">
930 <dia:attribute name="obj_pos">
931 <dia:point val="0.390412,14.64"/>
932 </dia:attribute>
933 <dia:attribute name="obj_bb">
934 <dia:rectangle val="0.340412,14.59;6.045,18.8"/>
935 </dia:attribute>
936 <dia:attribute name="elem_corner">
937 <dia:point val="0.390412,14.64"/>
938 </dia:attribute>
939 <dia:attribute name="elem_width">
940 <dia:real val="5.604587512785236"/>
941 </dia:attribute>
942 <dia:attribute name="elem_height">
943 <dia:real val="4.1099999999999994"/>
944 </dia:attribute>
945 <dia:attribute name="border_width">
946 <dia:real val="0.10000000149011612"/>
947 </dia:attribute>
948 <dia:attribute name="border_color">
949 <dia:color val="#a52a2a"/>
950 </dia:attribute>
951 <dia:attribute name="show_background">
952 <dia:boolean val="true"/>
953 </dia:attribute>
954 </dia:object>
955 <dia:object type="Standard - Box" version="0" id="O30">
956 <dia:attribute name="obj_pos">
957 <dia:point val="2.645,15.74"/>
958 </dia:attribute>
959 <dia:attribute name="obj_bb">
960 <dia:rectangle val="2.595,15.69;5.6,18.3"/>
961 </dia:attribute>
962 <dia:attribute name="elem_corner">
963 <dia:point val="2.645,15.74"/>
964 </dia:attribute>
965 <dia:attribute name="elem_width">
966 <dia:real val="2.904999999254942"/>
967 </dia:attribute>
968 <dia:attribute name="elem_height">
969 <dia:real val="2.5100000000000016"/>
970 </dia:attribute>
971 <dia:attribute name="border_width">
972 <dia:real val="0.10000000149011612"/>
973 </dia:attribute>
974 <dia:attribute name="border_color">
975 <dia:color val="#0000ff"/>
976 </dia:attribute>
977 <dia:attribute name="show_background">
978 <dia:boolean val="true"/>
979 </dia:attribute>
980 </dia:object>
981 <dia:object type="Standard - Text" version="1" id="O31">
982 <dia:attribute name="obj_pos">
983 <dia:point val="1.595,12.99"/>
984 </dia:attribute>
985 <dia:attribute name="obj_bb">
986 <dia:rectangle val="1.595,12.395;1.595,13.1425"/>
987 </dia:attribute>
988 <dia:attribute name="text">
989 <dia:composite type="text">
990 <dia:attribute name="string">
991 <dia:string>##</dia:string>
992 </dia:attribute>
993 <dia:attribute name="font">
994 <dia:font family="sans" style="0" name="Helvetica"/>
995 </dia:attribute>
996 <dia:attribute name="height">
997 <dia:real val="0.80000000000000004"/>
998 </dia:attribute>
999 <dia:attribute name="pos">
1000 <dia:point val="1.595,12.99"/>
1001 </dia:attribute>
1002 <dia:attribute name="color">
1003 <dia:color val="#000000"/>
1004 </dia:attribute>
1005 <dia:attribute name="alignment">
1006 <dia:enum val="0"/>
1007 </dia:attribute>
1008 </dia:composite>
1009 </dia:attribute>
1010 <dia:attribute name="valign">
1011 <dia:enum val="3"/>
1012 </dia:attribute>
1013 </dia:object>
1014 <dia:object type="Standard - Line" version="0" id="O32">
1015 <dia:attribute name="obj_pos">
1016 <dia:point val="17.945,12.595"/>
1017 </dia:attribute>
1018 <dia:attribute name="obj_bb">
1019 <dia:rectangle val="2.58596,12.536;18.004,15.799"/>
1020 </dia:attribute>
1021 <dia:attribute name="conn_endpoints">
1022 <dia:point val="17.945,12.595"/>
1023 <dia:point val="2.645,15.74"/>
1024 </dia:attribute>
1025 <dia:attribute name="numcp">
1026 <dia:int val="1"/>
1027 </dia:attribute>
1028 <dia:attribute name="line_color">
1029 <dia:color val="#e60505"/>
1030 </dia:attribute>
1031 <dia:attribute name="line_style">
1032 <dia:enum val="4"/>
1033 </dia:attribute>
1034 <dia:connections>
1035 <dia:connection handle="0" to="O36" connection="0"/>
1036 <dia:connection handle="1" to="O30" connection="0"/>
1037 </dia:connections>
1038 </dia:object>
1039 <dia:object type="Standard - Line" version="0" id="O33">
1040 <dia:attribute name="obj_pos">
1041 <dia:point val="17.945,15.8"/>
1042 </dia:attribute>
1043 <dia:attribute name="obj_bb">
1044 <dia:rectangle val="2.58772,15.7427;18.0023,18.3073"/>
1045 </dia:attribute>
1046 <dia:attribute name="conn_endpoints">
1047 <dia:point val="17.945,15.8"/>
1048 <dia:point val="2.645,18.25"/>
1049 </dia:attribute>
1050 <dia:attribute name="numcp">
1051 <dia:int val="1"/>
1052 </dia:attribute>
1053 <dia:attribute name="line_color">
1054 <dia:color val="#e60505"/>
1055 </dia:attribute>
1056 <dia:attribute name="line_style">
1057 <dia:enum val="4"/>
1058 </dia:attribute>
1059 <dia:connections>
1060 <dia:connection handle="0" to="O36" connection="5"/>
1061 <dia:connection handle="1" to="O30" connection="5"/>
1062 </dia:connections>
1063 </dia:object>
1064 <dia:object type="Standard - Line" version="0" id="O34">
1065 <dia:attribute name="obj_pos">
1066 <dia:point val="21.7,15.8"/>
1067 </dia:attribute>
1068 <dia:attribute name="obj_bb">
1069 <dia:rectangle val="5.49307,15.7431;21.7569,18.3069"/>
1070 </dia:attribute>
1071 <dia:attribute name="conn_endpoints">
1072 <dia:point val="21.7,15.8"/>
1073 <dia:point val="5.55,18.25"/>
1074 </dia:attribute>
1075 <dia:attribute name="numcp">
1076 <dia:int val="1"/>
1077 </dia:attribute>
1078 <dia:attribute name="line_color">
1079 <dia:color val="#e60505"/>
1080 </dia:attribute>
1081 <dia:attribute name="line_style">
1082 <dia:enum val="4"/>
1083 </dia:attribute>
1084 <dia:connections>
1085 <dia:connection handle="0" to="O36" connection="7"/>
1086 <dia:connection handle="1" to="O30" connection="7"/>
1087 </dia:connections>
1088 </dia:object>
1089 <dia:object type="Standard - Line" version="0" id="O35">
1090 <dia:attribute name="obj_pos">
1091 <dia:point val="21.7,12.595"/>
1092 </dia:attribute>
1093 <dia:attribute name="obj_bb">
1094 <dia:rectangle val="5.49136,12.5364;21.7586,15.7986"/>
1095 </dia:attribute>
1096 <dia:attribute name="conn_endpoints">
1097 <dia:point val="21.7,12.595"/>
1098 <dia:point val="5.55,15.74"/>
1099 </dia:attribute>
1100 <dia:attribute name="numcp">
1101 <dia:int val="1"/>
1102 </dia:attribute>
1103 <dia:attribute name="line_color">
1104 <dia:color val="#e60505"/>
1105 </dia:attribute>
1106 <dia:attribute name="line_style">
1107 <dia:enum val="4"/>
1108 </dia:attribute>
1109 <dia:connections>
1110 <dia:connection handle="0" to="O36" connection="2"/>
1111 <dia:connection handle="1" to="O30" connection="2"/>
1112 </dia:connections>
1113 </dia:object>
1114 <dia:object type="Standard - Box" version="0" id="O36">
1115 <dia:attribute name="obj_pos">
1116 <dia:point val="17.945,12.595"/>
1117 </dia:attribute>
1118 <dia:attribute name="obj_bb">
1119 <dia:rectangle val="17.895,12.545;21.75,15.85"/>
1120 </dia:attribute>
1121 <dia:attribute name="elem_corner">
1122 <dia:point val="17.945,12.595"/>
1123 </dia:attribute>
1124 <dia:attribute name="elem_width">
1125 <dia:real val="3.7549999992549452"/>
1126 </dia:attribute>
1127 <dia:attribute name="elem_height">
1128 <dia:real val="3.2049999992549427"/>
1129 </dia:attribute>
1130 <dia:attribute name="border_width">
1131 <dia:real val="0.10000000149011612"/>
1132 </dia:attribute>
1133 <dia:attribute name="border_color">
1134 <dia:color val="#00ff00"/>
1135 </dia:attribute>
1136 <dia:attribute name="show_background">
1137 <dia:boolean val="false"/>
1138 </dia:attribute>
1139 </dia:object>
1140 <dia:object type="Standard - Box" version="0" id="O37">
1141 <dia:attribute name="obj_pos">
1142 <dia:point val="22.1631,14.2233"/>
1143 </dia:attribute>
1144 <dia:attribute name="obj_bb">
1145 <dia:rectangle val="22.1131,14.1733;25.45,16.7"/>
1146 </dia:attribute>
1147 <dia:attribute name="elem_corner">
1148 <dia:point val="22.1631,14.2233"/>
1149 </dia:attribute>
1150 <dia:attribute name="elem_width">
1151 <dia:real val="3.2369000000000021"/>
1152 </dia:attribute>
1153 <dia:attribute name="elem_height">
1154 <dia:real val="2.4267000000000003"/>
1155 </dia:attribute>
1156 <dia:attribute name="border_width">
1157 <dia:real val="0.10000000149011612"/>
1158 </dia:attribute>
1159 <dia:attribute name="border_color">
1160 <dia:color val="#a020f0"/>
1161 </dia:attribute>
1162 <dia:attribute name="show_background">
1163 <dia:boolean val="false"/>
1164 </dia:attribute>
1165 </dia:object>
1166 <dia:object type="Standard - Box" version="0" id="O38">
1167 <dia:attribute name="obj_pos">
1168 <dia:point val="34.6714,16.2367"/>
1169 </dia:attribute>
1170 <dia:attribute name="obj_bb">
1171 <dia:rectangle val="34.6214,16.1867;37.9,18.75"/>
1172 </dia:attribute>
1173 <dia:attribute name="elem_corner">
1174 <dia:point val="34.6714,16.2367"/>
1175 </dia:attribute>
1176 <dia:attribute name="elem_width">
1177 <dia:real val="3.178600000000003"/>
1178 </dia:attribute>
1179 <dia:attribute name="elem_height">
1180 <dia:real val="2.4632999999999967"/>
1181 </dia:attribute>
1182 <dia:attribute name="border_width">
1183 <dia:real val="0.10000000149011612"/>
1184 </dia:attribute>
1185 <dia:attribute name="border_color">
1186 <dia:color val="#8b6914"/>
1187 </dia:attribute>
1188 <dia:attribute name="show_background">
1189 <dia:boolean val="true"/>
1190 </dia:attribute>
1191 </dia:object>
1192 <dia:object type="Standard - Line" version="0" id="O39">
1193 <dia:attribute name="obj_pos">
1194 <dia:point val="34.6714,18.7"/>
1195 </dia:attribute>
1196 <dia:attribute name="obj_bb">
1197 <dia:rectangle val="22.1057,16.5926;34.7288,18.7574"/>
1198 </dia:attribute>
1199 <dia:attribute name="conn_endpoints">
1200 <dia:point val="34.6714,18.7"/>
1201 <dia:point val="22.1631,16.65"/>
1202 </dia:attribute>
1203 <dia:attribute name="numcp">
1204 <dia:int val="1"/>
1205 </dia:attribute>
1206 <dia:attribute name="line_color">
1207 <dia:color val="#e60505"/>
1208 </dia:attribute>
1209 <dia:attribute name="line_style">
1210 <dia:enum val="4"/>
1211 </dia:attribute>
1212 <dia:connections>
1213 <dia:connection handle="0" to="O38" connection="5"/>
1214 <dia:connection handle="1" to="O37" connection="5"/>
1215 </dia:connections>
1216 </dia:object>
1217 <dia:object type="Standard - Line" version="0" id="O40">
1218 <dia:attribute name="obj_pos">
1219 <dia:point val="34.6714,16.2367"/>
1220 </dia:attribute>
1221 <dia:attribute name="obj_bb">
1222 <dia:rectangle val="22.1058,14.166;34.7287,16.294"/>
1223 </dia:attribute>
1224 <dia:attribute name="conn_endpoints">
1225 <dia:point val="34.6714,16.2367"/>
1226 <dia:point val="22.1631,14.2233"/>
1227 </dia:attribute>
1228 <dia:attribute name="numcp">
1229 <dia:int val="1"/>
1230 </dia:attribute>
1231 <dia:attribute name="line_color">
1232 <dia:color val="#e60505"/>
1233 </dia:attribute>
1234 <dia:attribute name="line_style">
1235 <dia:enum val="4"/>
1236 </dia:attribute>
1237 <dia:connections>
1238 <dia:connection handle="0" to="O38" connection="0"/>
1239 <dia:connection handle="1" to="O37" connection="0"/>
1240 </dia:connections>
1241 </dia:object>
1242 <dia:object type="Standard - Line" version="0" id="O41">
1243 <dia:attribute name="obj_pos">
1244 <dia:point val="37.85,18.7"/>
1245 </dia:attribute>
1246 <dia:attribute name="obj_bb">
1247 <dia:rectangle val="25.3425,16.5925;37.9075,18.7575"/>
1248 </dia:attribute>
1249 <dia:attribute name="conn_endpoints">
1250 <dia:point val="37.85,18.7"/>
1251 <dia:point val="25.4,16.65"/>
1252 </dia:attribute>
1253 <dia:attribute name="numcp">
1254 <dia:int val="1"/>
1255 </dia:attribute>
1256 <dia:attribute name="line_color">
1257 <dia:color val="#e60505"/>
1258 </dia:attribute>
1259 <dia:attribute name="line_style">
1260 <dia:enum val="4"/>
1261 </dia:attribute>
1262 <dia:connections>
1263 <dia:connection handle="0" to="O38" connection="7"/>
1264 <dia:connection handle="1" to="O37" connection="7"/>
1265 </dia:connections>
1266 </dia:object>
1267 <dia:object type="Standard - Line" version="0" id="O42">
1268 <dia:attribute name="obj_pos">
1269 <dia:point val="37.85,16.2367"/>
1270 </dia:attribute>
1271 <dia:attribute name="obj_bb">
1272 <dia:rectangle val="25.3427,14.166;37.9073,16.294"/>
1273 </dia:attribute>
1274 <dia:attribute name="conn_endpoints">
1275 <dia:point val="37.85,16.2367"/>
1276 <dia:point val="25.4,14.2233"/>
1277 </dia:attribute>
1278 <dia:attribute name="numcp">
1279 <dia:int val="1"/>
1280 </dia:attribute>
1281 <dia:attribute name="line_color">
1282 <dia:color val="#e60505"/>
1283 </dia:attribute>
1284 <dia:attribute name="line_style">
1285 <dia:enum val="4"/>
1286 </dia:attribute>
1287 <dia:connections>
1288 <dia:connection handle="0" to="O38" connection="2"/>
1289 <dia:connection handle="1" to="O37" connection="2"/>
1290 </dia:connections>
1291 </dia:object>
1292 <dia:object type="Geometric - Perfect Circle" version="1" id="O43">
1293 <dia:attribute name="obj_pos">
1294 <dia:point val="40.347,16.7742"/>
1295 </dia:attribute>
1296 <dia:attribute name="obj_bb">
1297 <dia:rectangle val="40.297,16.7242;41.247,17.6742"/>
1298 </dia:attribute>
1299 <dia:attribute name="meta">
1300 <dia:composite type="dict"/>
1301 </dia:attribute>
1302 <dia:attribute name="elem_corner">
1303 <dia:point val="40.347,16.7742"/>
1304 </dia:attribute>
1305 <dia:attribute name="elem_width">
1306 <dia:real val="0.84999999999999787"/>
1307 </dia:attribute>
1308 <dia:attribute name="elem_height">
1309 <dia:real val="0.84999999999999787"/>
1310 </dia:attribute>
1311 <dia:attribute name="line_width">
1312 <dia:real val="0.10000000000000001"/>
1313 </dia:attribute>
1314 <dia:attribute name="line_colour">
1315 <dia:color val="#000000"/>
1316 </dia:attribute>
1317 <dia:attribute name="fill_colour">
1318 <dia:color val="#ffffff"/>
1319 </dia:attribute>
1320 <dia:attribute name="show_background">
1321 <dia:boolean val="true"/>
1322 </dia:attribute>
1323 <dia:attribute name="line_style">
1324 <dia:enum val="0"/>
1325 <dia:real val="1"/>
1326 </dia:attribute>
1327 <dia:attribute name="flip_horizontal">
1328 <dia:boolean val="false"/>
1329 </dia:attribute>
1330 <dia:attribute name="flip_vertical">
1331 <dia:boolean val="false"/>
1332 </dia:attribute>
1333 <dia:attribute name="subscale">
1334 <dia:real val="1"/>
1335 </dia:attribute>
1336 </dia:object>
1337 <dia:object type="Standard - Line" version="0" id="O44">
1338 <dia:attribute name="obj_pos">
1339 <dia:point val="41.197,17.1992"/>
1340 </dia:attribute>
1341 <dia:attribute name="obj_bb">
1342 <dia:rectangle val="41.147,16.8388;49.6123,17.5624"/>
1343 </dia:attribute>
1344 <dia:attribute name="conn_endpoints">
1345 <dia:point val="41.197,17.1992"/>
1346 <dia:point val="49.5005,17.2007"/>
1347 </dia:attribute>
1348 <dia:attribute name="numcp">
1349 <dia:int val="1"/>
1350 </dia:attribute>
1351 <dia:attribute name="end_arrow">
1352 <dia:enum val="22"/>
1353 </dia:attribute>
1354 <dia:attribute name="end_arrow_length">
1355 <dia:real val="0.5"/>
1356 </dia:attribute>
1357 <dia:attribute name="end_arrow_width">
1358 <dia:real val="0.5"/>
1359 </dia:attribute>
1360 <dia:connections>
1361 <dia:connection handle="0" to="O43" connection="3"/>
1362 </dia:connections>
1363 </dia:object>
1364 <dia:object type="Standard - Text" version="1" id="O45">
1365 <dia:attribute name="obj_pos">
1366 <dia:point val="42.4624,16.69"/>
1367 </dia:attribute>
1368 <dia:attribute name="obj_bb">
1369 <dia:rectangle val="42.4624,16.095;47.1074,16.8425"/>
1370 </dia:attribute>
1371 <dia:attribute name="text">
1372 <dia:composite type="text">
1373 <dia:attribute name="string">
1374 <dia:string>#pad 3 (source)#</dia:string>
1375 </dia:attribute>
1376 <dia:attribute name="font">
1377 <dia:font family="sans" style="0" name="Helvetica"/>
1378 </dia:attribute>
1379 <dia:attribute name="height">
1380 <dia:real val="0.80000000000000004"/>
1381 </dia:attribute>
1382 <dia:attribute name="pos">
1383 <dia:point val="42.4624,16.69"/>
1384 </dia:attribute>
1385 <dia:attribute name="color">
1386 <dia:color val="#000000"/>
1387 </dia:attribute>
1388 <dia:attribute name="alignment">
1389 <dia:enum val="0"/>
1390 </dia:attribute>
1391 </dia:composite>
1392 </dia:attribute>
1393 <dia:attribute name="valign">
1394 <dia:enum val="3"/>
1395 </dia:attribute>
1396 </dia:object>
1397 <dia:object type="Standard - Text" version="1" id="O46">
1398 <dia:attribute name="obj_pos">
1399 <dia:point val="9.85,4.55"/>
1400 </dia:attribute>
1401 <dia:attribute name="obj_bb">
1402 <dia:rectangle val="9.85,3.955;12.7275,6.3025"/>
1403 </dia:attribute>
1404 <dia:attribute name="text">
1405 <dia:composite type="text">
1406 <dia:attribute name="string">
1407 <dia:string>#sink
1408crop
1409selection#</dia:string>
1410 </dia:attribute>
1411 <dia:attribute name="font">
1412 <dia:font family="sans" style="0" name="Helvetica"/>
1413 </dia:attribute>
1414 <dia:attribute name="height">
1415 <dia:real val="0.80000000000000004"/>
1416 </dia:attribute>
1417 <dia:attribute name="pos">
1418 <dia:point val="9.85,4.55"/>
1419 </dia:attribute>
1420 <dia:attribute name="color">
1421 <dia:color val="#0000ff"/>
1422 </dia:attribute>
1423 <dia:attribute name="alignment">
1424 <dia:enum val="0"/>
1425 </dia:attribute>
1426 </dia:composite>
1427 </dia:attribute>
1428 <dia:attribute name="valign">
1429 <dia:enum val="3"/>
1430 </dia:attribute>
1431 </dia:object>
1432 <dia:object type="Standard - Text" version="1" id="O47">
1433 <dia:attribute name="obj_pos">
1434 <dia:point val="27.65,4.75"/>
1435 </dia:attribute>
1436 <dia:attribute name="obj_bb">
1437 <dia:rectangle val="27.65,4.155;30.5275,6.5025"/>
1438 </dia:attribute>
1439 <dia:attribute name="text">
1440 <dia:composite type="text">
1441 <dia:attribute name="string">
1442 <dia:string>#source
1443crop
1444selection#</dia:string>
1445 </dia:attribute>
1446 <dia:attribute name="font">
1447 <dia:font family="sans" style="0" name="Helvetica"/>
1448 </dia:attribute>
1449 <dia:attribute name="height">
1450 <dia:real val="0.80000000000000004"/>
1451 </dia:attribute>
1452 <dia:attribute name="pos">
1453 <dia:point val="27.65,4.75"/>
1454 </dia:attribute>
1455 <dia:attribute name="color">
1456 <dia:color val="#a020f0"/>
1457 </dia:attribute>
1458 <dia:attribute name="alignment">
1459 <dia:enum val="0"/>
1460 </dia:attribute>
1461 </dia:composite>
1462 </dia:attribute>
1463 <dia:attribute name="valign">
1464 <dia:enum val="3"/>
1465 </dia:attribute>
1466 </dia:object>
1467 <dia:object type="Standard - Line" version="0" id="O48">
1468 <dia:attribute name="obj_pos">
1469 <dia:point val="10.55,6.6"/>
1470 </dia:attribute>
1471 <dia:attribute name="obj_bb">
1472 <dia:rectangle val="7.7135,6.39438;10.6035,7.11605"/>
1473 </dia:attribute>
1474 <dia:attribute name="conn_endpoints">
1475 <dia:point val="10.55,6.6"/>
1476 <dia:point val="7.825,6.8"/>
1477 </dia:attribute>
1478 <dia:attribute name="numcp">
1479 <dia:int val="1"/>
1480 </dia:attribute>
1481 <dia:attribute name="line_color">
1482 <dia:color val="#0000ff"/>
1483 </dia:attribute>
1484 <dia:attribute name="end_arrow">
1485 <dia:enum val="22"/>
1486 </dia:attribute>
1487 <dia:attribute name="end_arrow_length">
1488 <dia:real val="0.5"/>
1489 </dia:attribute>
1490 <dia:attribute name="end_arrow_width">
1491 <dia:real val="0.5"/>
1492 </dia:attribute>
1493 <dia:connections>
1494 <dia:connection handle="1" to="O9" connection="2"/>
1495 </dia:connections>
1496 </dia:object>
1497 <dia:object type="Standard - Line" version="0" id="O49">
1498 <dia:attribute name="obj_pos">
1499 <dia:point val="10.45,6.55"/>
1500 </dia:attribute>
1501 <dia:attribute name="obj_bb">
1502 <dia:rectangle val="5.48029,6.48236;10.5176,15.8387"/>
1503 </dia:attribute>
1504 <dia:attribute name="conn_endpoints">
1505 <dia:point val="10.45,6.55"/>
1506 <dia:point val="5.55,15.74"/>
1507 </dia:attribute>
1508 <dia:attribute name="numcp">
1509 <dia:int val="1"/>
1510 </dia:attribute>
1511 <dia:attribute name="line_color">
1512 <dia:color val="#0000ff"/>
1513 </dia:attribute>
1514 <dia:attribute name="end_arrow">
1515 <dia:enum val="22"/>
1516 </dia:attribute>
1517 <dia:attribute name="end_arrow_length">
1518 <dia:real val="0.5"/>
1519 </dia:attribute>
1520 <dia:attribute name="end_arrow_width">
1521 <dia:real val="0.5"/>
1522 </dia:attribute>
1523 <dia:connections>
1524 <dia:connection handle="1" to="O30" connection="2"/>
1525 </dia:connections>
1526 </dia:object>
1527 <dia:object type="Standard - Line" version="0" id="O50">
1528 <dia:attribute name="obj_pos">
1529 <dia:point val="27.5246,6.66071"/>
1530 </dia:attribute>
1531 <dia:attribute name="obj_bb">
1532 <dia:rectangle val="25.406,6.59136;27.594,9.82122"/>
1533 </dia:attribute>
1534 <dia:attribute name="conn_endpoints">
1535 <dia:point val="27.5246,6.66071"/>
1536 <dia:point val="25.4754,9.72825"/>
1537 </dia:attribute>
1538 <dia:attribute name="numcp">
1539 <dia:int val="1"/>
1540 </dia:attribute>
1541 <dia:attribute name="line_color">
1542 <dia:color val="#a020f0"/>
1543 </dia:attribute>
1544 <dia:attribute name="end_arrow">
1545 <dia:enum val="22"/>
1546 </dia:attribute>
1547 <dia:attribute name="end_arrow_length">
1548 <dia:real val="0.5"/>
1549 </dia:attribute>
1550 <dia:attribute name="end_arrow_width">
1551 <dia:real val="0.5"/>
1552 </dia:attribute>
1553 <dia:connections>
1554 <dia:connection handle="1" to="O18" connection="2"/>
1555 </dia:connections>
1556 </dia:object>
1557 <dia:object type="Standard - Line" version="0" id="O51">
1558 <dia:attribute name="obj_pos">
1559 <dia:point val="27.5036,6.68935"/>
1560 </dia:attribute>
1561 <dia:attribute name="obj_bb">
1562 <dia:rectangle val="25.2161,6.62775;27.5652,14.331"/>
1563 </dia:attribute>
1564 <dia:attribute name="conn_endpoints">
1565 <dia:point val="27.5036,6.68935"/>
1566 <dia:point val="25.4,14.2233"/>
1567 </dia:attribute>
1568 <dia:attribute name="numcp">
1569 <dia:int val="1"/>
1570 </dia:attribute>
1571 <dia:attribute name="line_color">
1572 <dia:color val="#a020f0"/>
1573 </dia:attribute>
1574 <dia:attribute name="end_arrow">
1575 <dia:enum val="22"/>
1576 </dia:attribute>
1577 <dia:attribute name="end_arrow_length">
1578 <dia:real val="0.5"/>
1579 </dia:attribute>
1580 <dia:attribute name="end_arrow_width">
1581 <dia:real val="0.5"/>
1582 </dia:attribute>
1583 <dia:connections>
1584 <dia:connection handle="1" to="O37" connection="2"/>
1585 </dia:connections>
1586 </dia:object>
1587 </dia:layer>
1588</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg
deleted file mode 100644
index 3322cf4c009..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-full.svg
+++ /dev/null
@@ -1,163 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="59cm" height="18cm" viewBox="-186 71 1178 346" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <g>
5 <rect style="fill: #ffffff" x="318.9" y="129" width="208.1" height="249"/>
6 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #ff765a" x="318.9" y="129" width="208.1" height="249"/>
7 </g>
8 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-2" y="73" width="806" height="343"/>
9 <g>
10 <ellipse style="fill: #ffffff" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
11 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
12 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.5" cy="166.712" rx="8.5" ry="8.5"/>
13 </g>
14 <g>
15 <ellipse style="fill: #ffffff" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
16 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
17 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.232" cy="205.184" rx="8.5" ry="8.5"/>
18 </g>
19 <g>
20 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-184.5" y1="167" x2="-30.7361" y2="166.729"/>
21 <polygon style="fill: #000000" points="-23.2361,166.716 -33.2272,171.734 -30.7361,166.729 -33.2449,161.734 "/>
22 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-23.2361,166.716 -33.2272,171.734 -30.7361,166.729 -33.2449,161.734 "/>
23 </g>
24 <g>
25 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="823.732" y1="205.184" x2="980.066" y2="205.212"/>
26 <polygon style="fill: #000000" points="987.566,205.214 977.565,210.212 980.066,205.212 977.567,200.212 "/>
27 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="987.566,205.214 977.565,210.212 980.066,205.212 977.567,200.212 "/>
28 </g>
29 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-139.96" y="155">
30 <tspan x="-139.96" y="155">pad 0 (sink)</tspan>
31 </text>
32 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="849.04" y="195">
33 <tspan x="849.04" y="195">pad 2 (source)</tspan>
34 </text>
35 <g>
36 <rect style="fill: #ffffff" x="5.5" y="120" width="159" height="104"/>
37 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="5.5" y="120" width="159" height="104"/>
38 </g>
39 <g>
40 <rect style="fill: #ffffff" x="62.5" y="136" width="94" height="77"/>
41 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="62.5" y="136" width="94" height="77"/>
42 </g>
43 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="30.5" y="89">
44 <tspan x="30.5" y="89"></tspan>
45 </text>
46 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="9.53836" y="88.9138">
47 <tspan x="9.53836" y="88.9138">sink media</tspan>
48 <tspan x="9.53836" y="104.914">bus format</tspan>
49 </text>
50 <g>
51 <rect style="fill: #ffffff" x="333.644" y="185.65" width="165.2" height="172.478"/>
52 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="333.644" y="185.65" width="165.2" height="172.478"/>
53 </g>
54 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="358.128" x2="62.5" y2="213"/>
55 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="185.65" x2="62.5" y2="136"/>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="358.128" x2="156.5" y2="213"/>
57 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="185.65" x2="156.5" y2="136"/>
58 <text style="fill: #00ff00;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="334.704" y="149.442">
59 <tspan x="334.704" y="149.442">sink compose</tspan>
60 <tspan x="334.704" y="165.442">selection (scaling)</tspan>
61 </text>
62 <g>
63 <rect style="fill: #ffffff" x="409.322" y="194.565" width="100.186" height="71.4523"/>
64 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="409.322" y="194.565" width="100.186" height="71.4523"/>
65 </g>
66 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="689.5" y="105.128">
67 <tspan x="689.5" y="105.128">source media</tspan>
68 <tspan x="689.5" y="121.128">bus format</tspan>
69 </text>
70 <g>
71 <rect style="fill: #ffffff" x="688.488" y="173.834" width="100.186" height="71.4523"/>
72 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="688.488" y="173.834" width="100.186" height="71.4523"/>
73 </g>
74 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="688.488" y1="245.286" x2="409.322" y2="266.018"/>
75 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="688.488" y1="173.834" x2="409.322" y2="194.565"/>
76 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="788.674" y1="245.286" x2="509.508" y2="266.018"/>
77 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="788.674" y1="173.834" x2="509.508" y2="194.565"/>
78 <text style="fill: #ff765a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="325" y="103">
79 <tspan x="325" y="103">sink compose</tspan>
80 <tspan x="325" y="119">bounds selection</tspan>
81 </text>
82 <g>
83 <ellipse style="fill: #ffffff" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
84 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
85 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-12.0982" cy="341.512" rx="8.5" ry="8.5"/>
86 </g>
87 <g>
88 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-184.098" y1="341.8" x2="-30.3343" y2="341.529"/>
89 <polygon style="fill: #000000" points="-22.8343,341.516 -32.8254,346.534 -30.3343,341.529 -32.8431,336.534 "/>
90 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-22.8343,341.516 -32.8254,346.534 -30.3343,341.529 -32.8431,336.534 "/>
91 </g>
92 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-139" y="329">
93 <tspan x="-139" y="329">pad 1 (sink)</tspan>
94 </text>
95 <g>
96 <rect style="fill: #ffffff" x="7.80824" y="292.8" width="112.092" height="82.2"/>
97 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="7.80824" y="292.8" width="112.092" height="82.2"/>
98 </g>
99 <g>
100 <rect style="fill: #ffffff" x="52.9" y="314.8" width="58.1" height="50.2"/>
101 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="52.9" y="314.8" width="58.1" height="50.2"/>
102 </g>
103 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="31.9" y="259.8">
104 <tspan x="31.9" y="259.8"></tspan>
105 </text>
106 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="358.9" y1="251.9" x2="52.9" y2="314.8"/>
107 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="358.9" y1="316" x2="52.9" y2="365"/>
108 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="434" y1="316" x2="111" y2="365"/>
109 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="434" y1="251.9" x2="111" y2="314.8"/>
110 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="358.9" y="251.9" width="75.1" height="64.1"/>
111 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="443.262" y="284.466" width="64.738" height="48.534"/>
112 <g>
113 <rect style="fill: #ffffff" x="693.428" y="324.734" width="63.572" height="49.266"/>
114 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="693.428" y="324.734" width="63.572" height="49.266"/>
115 </g>
116 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="693.428" y1="374" x2="443.262" y2="333"/>
117 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="693.428" y1="324.734" x2="443.262" y2="284.466"/>
118 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="757" y1="374" x2="508" y2="333"/>
119 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="757" y1="324.734" x2="508" y2="284.466"/>
120 <g>
121 <ellipse style="fill: #ffffff" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
122 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
123 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="815.44" cy="343.984" rx="8.5" ry="8.5"/>
124 </g>
125 <g>
126 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="823.94" y1="343.984" x2="980.274" y2="344.012"/>
127 <polygon style="fill: #000000" points="987.774,344.014 977.773,349.012 980.274,344.012 977.775,339.012 "/>
128 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="987.774,344.014 977.773,349.012 980.274,344.012 977.775,339.012 "/>
129 </g>
130 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="849.248" y="333.8">
131 <tspan x="849.248" y="333.8">pad 3 (source)</tspan>
132 </text>
133 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="197" y="91">
134 <tspan x="197" y="91">sink</tspan>
135 <tspan x="197" y="107">crop</tspan>
136 <tspan x="197" y="123">selection</tspan>
137 </text>
138 <text style="fill: #a020f0;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="553" y="95">
139 <tspan x="553" y="95">source</tspan>
140 <tspan x="553" y="111">crop</tspan>
141 <tspan x="553" y="127">selection</tspan>
142 </text>
143 <g>
144 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x1="211" y1="132" x2="166.21" y2="135.287"/>
145 <polygon style="fill: #0000ff" points="158.73,135.836 168.337,130.118 166.21,135.287 169.069,140.091 "/>
146 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" points="158.73,135.836 168.337,130.118 166.21,135.287 169.069,140.091 "/>
147 </g>
148 <g>
149 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x1="209" y1="131" x2="115.581" y2="306.209"/>
150 <polygon style="fill: #0000ff" points="112.052,312.827 112.345,301.65 115.581,306.209 121.169,306.355 "/>
151 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" points="112.052,312.827 112.345,301.65 115.581,306.209 121.169,306.355 "/>
152 </g>
153 <g>
154 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="550.492" y1="133.214" x2="514.916" y2="186.469"/>
155 <polygon style="fill: #a020f0" points="510.75,192.706 512.147,181.613 514.916,186.469 520.463,187.168 "/>
156 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="510.75,192.706 512.147,181.613 514.916,186.469 520.463,187.168 "/>
157 </g>
158 <g>
159 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="550.072" y1="133.787" x2="510.618" y2="275.089"/>
160 <polygon style="fill: #a020f0" points="508.601,282.312 506.475,271.336 510.618,275.089 516.106,274.025 "/>
161 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="508.601,282.312 506.475,271.336 510.618,275.089 516.106,274.025 "/>
162 </g>
163</svg>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia
deleted file mode 100644
index 0cd50a7bda8..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.dia
+++ /dev/null
@@ -1,1152 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
3 <dia:diagramdata>
4 <dia:attribute name="background">
5 <dia:color val="#ffffff"/>
6 </dia:attribute>
7 <dia:attribute name="pagebreak">
8 <dia:color val="#000099"/>
9 </dia:attribute>
10 <dia:attribute name="paper">
11 <dia:composite type="paper">
12 <dia:attribute name="name">
13 <dia:string>#A4#</dia:string>
14 </dia:attribute>
15 <dia:attribute name="tmargin">
16 <dia:real val="2.8222000598907471"/>
17 </dia:attribute>
18 <dia:attribute name="bmargin">
19 <dia:real val="2.8222000598907471"/>
20 </dia:attribute>
21 <dia:attribute name="lmargin">
22 <dia:real val="2.8222000598907471"/>
23 </dia:attribute>
24 <dia:attribute name="rmargin">
25 <dia:real val="2.8222000598907471"/>
26 </dia:attribute>
27 <dia:attribute name="is_portrait">
28 <dia:boolean val="false"/>
29 </dia:attribute>
30 <dia:attribute name="scaling">
31 <dia:real val="0.49000000953674316"/>
32 </dia:attribute>
33 <dia:attribute name="fitto">
34 <dia:boolean val="false"/>
35 </dia:attribute>
36 </dia:composite>
37 </dia:attribute>
38 <dia:attribute name="grid">
39 <dia:composite type="grid">
40 <dia:attribute name="width_x">
41 <dia:real val="1"/>
42 </dia:attribute>
43 <dia:attribute name="width_y">
44 <dia:real val="1"/>
45 </dia:attribute>
46 <dia:attribute name="visible_x">
47 <dia:int val="1"/>
48 </dia:attribute>
49 <dia:attribute name="visible_y">
50 <dia:int val="1"/>
51 </dia:attribute>
52 <dia:composite type="color"/>
53 </dia:composite>
54 </dia:attribute>
55 <dia:attribute name="color">
56 <dia:color val="#d8e5e5"/>
57 </dia:attribute>
58 <dia:attribute name="guides">
59 <dia:composite type="guides">
60 <dia:attribute name="hguides"/>
61 <dia:attribute name="vguides"/>
62 </dia:composite>
63 </dia:attribute>
64 </dia:diagramdata>
65 <dia:layer name="Background" visible="true" active="true">
66 <dia:object type="Standard - Box" version="0" id="O0">
67 <dia:attribute name="obj_pos">
68 <dia:point val="-0.4,6.5"/>
69 </dia:attribute>
70 <dia:attribute name="obj_bb">
71 <dia:rectangle val="-0.45,6.45;39.95,22.9"/>
72 </dia:attribute>
73 <dia:attribute name="elem_corner">
74 <dia:point val="-0.4,6.5"/>
75 </dia:attribute>
76 <dia:attribute name="elem_width">
77 <dia:real val="40.299999999999997"/>
78 </dia:attribute>
79 <dia:attribute name="elem_height">
80 <dia:real val="16.349999999999998"/>
81 </dia:attribute>
82 <dia:attribute name="border_width">
83 <dia:real val="0.10000000149011612"/>
84 </dia:attribute>
85 <dia:attribute name="show_background">
86 <dia:boolean val="false"/>
87 </dia:attribute>
88 </dia:object>
89 <dia:object type="Standard - Box" version="0" id="O1">
90 <dia:attribute name="obj_pos">
91 <dia:point val="0.225,9.45"/>
92 </dia:attribute>
93 <dia:attribute name="obj_bb">
94 <dia:rectangle val="0.175,9.4;8.225,14.7"/>
95 </dia:attribute>
96 <dia:attribute name="elem_corner">
97 <dia:point val="0.225,9.45"/>
98 </dia:attribute>
99 <dia:attribute name="elem_width">
100 <dia:real val="7.9499999999999975"/>
101 </dia:attribute>
102 <dia:attribute name="elem_height">
103 <dia:real val="5.1999999999999975"/>
104 </dia:attribute>
105 <dia:attribute name="border_width">
106 <dia:real val="0.10000000149011612"/>
107 </dia:attribute>
108 <dia:attribute name="border_color">
109 <dia:color val="#a52a2a"/>
110 </dia:attribute>
111 <dia:attribute name="show_background">
112 <dia:boolean val="true"/>
113 </dia:attribute>
114 </dia:object>
115 <dia:object type="Standard - Box" version="0" id="O2">
116 <dia:attribute name="obj_pos">
117 <dia:point val="2.475,10.2"/>
118 </dia:attribute>
119 <dia:attribute name="obj_bb">
120 <dia:rectangle val="2.425,10.15;7.225,14.1"/>
121 </dia:attribute>
122 <dia:attribute name="elem_corner">
123 <dia:point val="2.475,10.2"/>
124 </dia:attribute>
125 <dia:attribute name="elem_width">
126 <dia:real val="4.6999999999999975"/>
127 </dia:attribute>
128 <dia:attribute name="elem_height">
129 <dia:real val="3.8499999999999979"/>
130 </dia:attribute>
131 <dia:attribute name="border_width">
132 <dia:real val="0.10000000149011612"/>
133 </dia:attribute>
134 <dia:attribute name="border_color">
135 <dia:color val="#0000ff"/>
136 </dia:attribute>
137 <dia:attribute name="show_background">
138 <dia:boolean val="true"/>
139 </dia:attribute>
140 </dia:object>
141 <dia:object type="Standard - Text" version="1" id="O3">
142 <dia:attribute name="obj_pos">
143 <dia:point val="3,11.2"/>
144 </dia:attribute>
145 <dia:attribute name="obj_bb">
146 <dia:rectangle val="3,10.605;5.8775,12.9525"/>
147 </dia:attribute>
148 <dia:attribute name="text">
149 <dia:composite type="text">
150 <dia:attribute name="string">
151 <dia:string>#sink
152crop
153selection#</dia:string>
154 </dia:attribute>
155 <dia:attribute name="font">
156 <dia:font family="sans" style="0" name="Helvetica"/>
157 </dia:attribute>
158 <dia:attribute name="height">
159 <dia:real val="0.80000000000000004"/>
160 </dia:attribute>
161 <dia:attribute name="pos">
162 <dia:point val="3,11.2"/>
163 </dia:attribute>
164 <dia:attribute name="color">
165 <dia:color val="#0000ff"/>
166 </dia:attribute>
167 <dia:attribute name="alignment">
168 <dia:enum val="0"/>
169 </dia:attribute>
170 </dia:composite>
171 </dia:attribute>
172 <dia:attribute name="valign">
173 <dia:enum val="3"/>
174 </dia:attribute>
175 </dia:object>
176 <dia:object type="Standard - Text" version="1" id="O4">
177 <dia:attribute name="obj_pos">
178 <dia:point val="1.475,7.9"/>
179 </dia:attribute>
180 <dia:attribute name="obj_bb">
181 <dia:rectangle val="1.475,7.305;1.475,8.0525"/>
182 </dia:attribute>
183 <dia:attribute name="text">
184 <dia:composite type="text">
185 <dia:attribute name="string">
186 <dia:string>##</dia:string>
187 </dia:attribute>
188 <dia:attribute name="font">
189 <dia:font family="sans" style="0" name="Helvetica"/>
190 </dia:attribute>
191 <dia:attribute name="height">
192 <dia:real val="0.80000000000000004"/>
193 </dia:attribute>
194 <dia:attribute name="pos">
195 <dia:point val="1.475,7.9"/>
196 </dia:attribute>
197 <dia:attribute name="color">
198 <dia:color val="#000000"/>
199 </dia:attribute>
200 <dia:attribute name="alignment">
201 <dia:enum val="0"/>
202 </dia:attribute>
203 </dia:composite>
204 </dia:attribute>
205 <dia:attribute name="valign">
206 <dia:enum val="3"/>
207 </dia:attribute>
208 </dia:object>
209 <dia:object type="Standard - Text" version="1" id="O5">
210 <dia:attribute name="obj_pos">
211 <dia:point val="0.426918,7.89569"/>
212 </dia:attribute>
213 <dia:attribute name="obj_bb">
214 <dia:rectangle val="0.426918,7.30069;3.90942,8.84819"/>
215 </dia:attribute>
216 <dia:attribute name="text">
217 <dia:composite type="text">
218 <dia:attribute name="string">
219 <dia:string>#sink media
220bus format#</dia:string>
221 </dia:attribute>
222 <dia:attribute name="font">
223 <dia:font family="sans" style="0" name="Helvetica"/>
224 </dia:attribute>
225 <dia:attribute name="height">
226 <dia:real val="0.80000000000000004"/>
227 </dia:attribute>
228 <dia:attribute name="pos">
229 <dia:point val="0.426918,7.89569"/>
230 </dia:attribute>
231 <dia:attribute name="color">
232 <dia:color val="#a52a2a"/>
233 </dia:attribute>
234 <dia:attribute name="alignment">
235 <dia:enum val="0"/>
236 </dia:attribute>
237 </dia:composite>
238 </dia:attribute>
239 <dia:attribute name="valign">
240 <dia:enum val="3"/>
241 </dia:attribute>
242 </dia:object>
243 <dia:object type="Standard - Box" version="0" id="O6">
244 <dia:attribute name="obj_pos">
245 <dia:point val="16.6822,9.28251"/>
246 </dia:attribute>
247 <dia:attribute name="obj_bb">
248 <dia:rectangle val="16.6322,9.23251;24.9922,17.9564"/>
249 </dia:attribute>
250 <dia:attribute name="elem_corner">
251 <dia:point val="16.6822,9.28251"/>
252 </dia:attribute>
253 <dia:attribute name="elem_width">
254 <dia:real val="8.2600228398861297"/>
255 </dia:attribute>
256 <dia:attribute name="elem_height">
257 <dia:real val="8.6238900617957164"/>
258 </dia:attribute>
259 <dia:attribute name="border_width">
260 <dia:real val="0.10000000149011612"/>
261 </dia:attribute>
262 <dia:attribute name="border_color">
263 <dia:color val="#00ff00"/>
264 </dia:attribute>
265 <dia:attribute name="show_background">
266 <dia:boolean val="true"/>
267 </dia:attribute>
268 </dia:object>
269 <dia:object type="Standard - Line" version="0" id="O7">
270 <dia:attribute name="obj_pos">
271 <dia:point val="16.6822,17.9064"/>
272 </dia:attribute>
273 <dia:attribute name="obj_bb">
274 <dia:rectangle val="2.41365,13.9886;16.7436,17.9678"/>
275 </dia:attribute>
276 <dia:attribute name="conn_endpoints">
277 <dia:point val="16.6822,17.9064"/>
278 <dia:point val="2.475,14.05"/>
279 </dia:attribute>
280 <dia:attribute name="numcp">
281 <dia:int val="1"/>
282 </dia:attribute>
283 <dia:attribute name="line_color">
284 <dia:color val="#e60505"/>
285 </dia:attribute>
286 <dia:attribute name="line_style">
287 <dia:enum val="4"/>
288 </dia:attribute>
289 <dia:connections>
290 <dia:connection handle="0" to="O6" connection="5"/>
291 <dia:connection handle="1" to="O2" connection="5"/>
292 </dia:connections>
293 </dia:object>
294 <dia:object type="Standard - Line" version="0" id="O8">
295 <dia:attribute name="obj_pos">
296 <dia:point val="16.6822,9.28251"/>
297 </dia:attribute>
298 <dia:attribute name="obj_bb">
299 <dia:rectangle val="2.42188,9.22939;16.7353,10.2531"/>
300 </dia:attribute>
301 <dia:attribute name="conn_endpoints">
302 <dia:point val="16.6822,9.28251"/>
303 <dia:point val="2.475,10.2"/>
304 </dia:attribute>
305 <dia:attribute name="numcp">
306 <dia:int val="1"/>
307 </dia:attribute>
308 <dia:attribute name="line_color">
309 <dia:color val="#e60505"/>
310 </dia:attribute>
311 <dia:attribute name="line_style">
312 <dia:enum val="4"/>
313 </dia:attribute>
314 <dia:connections>
315 <dia:connection handle="0" to="O6" connection="0"/>
316 <dia:connection handle="1" to="O2" connection="0"/>
317 </dia:connections>
318 </dia:object>
319 <dia:object type="Standard - Line" version="0" id="O9">
320 <dia:attribute name="obj_pos">
321 <dia:point val="24.9422,17.9064"/>
322 </dia:attribute>
323 <dia:attribute name="obj_bb">
324 <dia:rectangle val="7.11553,13.9905;25.0017,17.9659"/>
325 </dia:attribute>
326 <dia:attribute name="conn_endpoints">
327 <dia:point val="24.9422,17.9064"/>
328 <dia:point val="7.175,14.05"/>
329 </dia:attribute>
330 <dia:attribute name="numcp">
331 <dia:int val="1"/>
332 </dia:attribute>
333 <dia:attribute name="line_color">
334 <dia:color val="#e60505"/>
335 </dia:attribute>
336 <dia:attribute name="line_style">
337 <dia:enum val="4"/>
338 </dia:attribute>
339 <dia:connections>
340 <dia:connection handle="0" to="O6" connection="7"/>
341 <dia:connection handle="1" to="O2" connection="7"/>
342 </dia:connections>
343 </dia:object>
344 <dia:object type="Standard - Line" version="0" id="O10">
345 <dia:attribute name="obj_pos">
346 <dia:point val="24.9422,9.28251"/>
347 </dia:attribute>
348 <dia:attribute name="obj_bb">
349 <dia:rectangle val="7.12249,9.23;24.9947,10.2525"/>
350 </dia:attribute>
351 <dia:attribute name="conn_endpoints">
352 <dia:point val="24.9422,9.28251"/>
353 <dia:point val="7.175,10.2"/>
354 </dia:attribute>
355 <dia:attribute name="numcp">
356 <dia:int val="1"/>
357 </dia:attribute>
358 <dia:attribute name="line_color">
359 <dia:color val="#e60505"/>
360 </dia:attribute>
361 <dia:attribute name="line_style">
362 <dia:enum val="4"/>
363 </dia:attribute>
364 <dia:connections>
365 <dia:connection handle="0" to="O6" connection="2"/>
366 <dia:connection handle="1" to="O2" connection="2"/>
367 </dia:connections>
368 </dia:object>
369 <dia:object type="Standard - Text" version="1" id="O11">
370 <dia:attribute name="obj_pos">
371 <dia:point val="16.7352,7.47209"/>
372 </dia:attribute>
373 <dia:attribute name="obj_bb">
374 <dia:rectangle val="16.7352,6.87709;22.5602,8.42459"/>
375 </dia:attribute>
376 <dia:attribute name="text">
377 <dia:composite type="text">
378 <dia:attribute name="string">
379 <dia:string>#sink compose
380selection (scaling)#</dia:string>
381 </dia:attribute>
382 <dia:attribute name="font">
383 <dia:font family="sans" style="0" name="Helvetica"/>
384 </dia:attribute>
385 <dia:attribute name="height">
386 <dia:real val="0.80000000000000004"/>
387 </dia:attribute>
388 <dia:attribute name="pos">
389 <dia:point val="16.7352,7.47209"/>
390 </dia:attribute>
391 <dia:attribute name="color">
392 <dia:color val="#00ff00"/>
393 </dia:attribute>
394 <dia:attribute name="alignment">
395 <dia:enum val="0"/>
396 </dia:attribute>
397 </dia:composite>
398 </dia:attribute>
399 <dia:attribute name="valign">
400 <dia:enum val="3"/>
401 </dia:attribute>
402 </dia:object>
403 <dia:object type="Standard - Box" version="0" id="O12">
404 <dia:attribute name="obj_pos">
405 <dia:point val="19.1161,9.97825"/>
406 </dia:attribute>
407 <dia:attribute name="obj_bb">
408 <dia:rectangle val="19.0661,9.92825;24.1754,13.6009"/>
409 </dia:attribute>
410 <dia:attribute name="elem_corner">
411 <dia:point val="19.1161,9.97825"/>
412 </dia:attribute>
413 <dia:attribute name="elem_width">
414 <dia:real val="5.009308462554376"/>
415 </dia:attribute>
416 <dia:attribute name="elem_height">
417 <dia:real val="3.5726155970598077"/>
418 </dia:attribute>
419 <dia:attribute name="border_width">
420 <dia:real val="0.10000000149011612"/>
421 </dia:attribute>
422 <dia:attribute name="border_color">
423 <dia:color val="#a020f0"/>
424 </dia:attribute>
425 <dia:attribute name="show_background">
426 <dia:boolean val="true"/>
427 </dia:attribute>
428 </dia:object>
429 <dia:object type="Standard - Text" version="1" id="O13">
430 <dia:attribute name="obj_pos">
431 <dia:point val="27.1661,7.47209"/>
432 </dia:attribute>
433 <dia:attribute name="obj_bb">
434 <dia:rectangle val="27.1661,6.87709;30.0436,9.22459"/>
435 </dia:attribute>
436 <dia:attribute name="text">
437 <dia:composite type="text">
438 <dia:attribute name="string">
439 <dia:string>#source
440crop
441selection#</dia:string>
442 </dia:attribute>
443 <dia:attribute name="font">
444 <dia:font family="sans" style="0" name="Helvetica"/>
445 </dia:attribute>
446 <dia:attribute name="height">
447 <dia:real val="0.80000000000000004"/>
448 </dia:attribute>
449 <dia:attribute name="pos">
450 <dia:point val="27.1661,7.47209"/>
451 </dia:attribute>
452 <dia:attribute name="color">
453 <dia:color val="#a020f0"/>
454 </dia:attribute>
455 <dia:attribute name="alignment">
456 <dia:enum val="0"/>
457 </dia:attribute>
458 </dia:composite>
459 </dia:attribute>
460 <dia:attribute name="valign">
461 <dia:enum val="3"/>
462 </dia:attribute>
463 </dia:object>
464 <dia:object type="Standard - Text" version="1" id="O14">
465 <dia:attribute name="obj_pos">
466 <dia:point val="34.575,7.8564"/>
467 </dia:attribute>
468 <dia:attribute name="obj_bb">
469 <dia:rectangle val="34.575,7.2614;38.8975,8.8089"/>
470 </dia:attribute>
471 <dia:attribute name="text">
472 <dia:composite type="text">
473 <dia:attribute name="string">
474 <dia:string>#source media
475bus format#</dia:string>
476 </dia:attribute>
477 <dia:attribute name="font">
478 <dia:font family="sans" style="0" name="Helvetica"/>
479 </dia:attribute>
480 <dia:attribute name="height">
481 <dia:real val="0.80000000000000004"/>
482 </dia:attribute>
483 <dia:attribute name="pos">
484 <dia:point val="34.575,7.8564"/>
485 </dia:attribute>
486 <dia:attribute name="color">
487 <dia:color val="#8b6914"/>
488 </dia:attribute>
489 <dia:attribute name="alignment">
490 <dia:enum val="0"/>
491 </dia:attribute>
492 </dia:composite>
493 </dia:attribute>
494 <dia:attribute name="valign">
495 <dia:enum val="3"/>
496 </dia:attribute>
497 </dia:object>
498 <dia:object type="Standard - Box" version="0" id="O15">
499 <dia:attribute name="obj_pos">
500 <dia:point val="34.5244,11.2917"/>
501 </dia:attribute>
502 <dia:attribute name="obj_bb">
503 <dia:rectangle val="34.4744,11.2417;39.5837,14.9143"/>
504 </dia:attribute>
505 <dia:attribute name="elem_corner">
506 <dia:point val="34.5244,11.2917"/>
507 </dia:attribute>
508 <dia:attribute name="elem_width">
509 <dia:real val="5.009308462554376"/>
510 </dia:attribute>
511 <dia:attribute name="elem_height">
512 <dia:real val="3.5726155970598077"/>
513 </dia:attribute>
514 <dia:attribute name="border_width">
515 <dia:real val="0.10000000149011612"/>
516 </dia:attribute>
517 <dia:attribute name="border_color">
518 <dia:color val="#8b6914"/>
519 </dia:attribute>
520 <dia:attribute name="show_background">
521 <dia:boolean val="true"/>
522 </dia:attribute>
523 </dia:object>
524 <dia:object type="Standard - Line" version="0" id="O16">
525 <dia:attribute name="obj_pos">
526 <dia:point val="34.5244,14.8643"/>
527 </dia:attribute>
528 <dia:attribute name="obj_bb">
529 <dia:rectangle val="19.062,13.4968;34.5785,14.9184"/>
530 </dia:attribute>
531 <dia:attribute name="conn_endpoints">
532 <dia:point val="34.5244,14.8643"/>
533 <dia:point val="19.1161,13.5509"/>
534 </dia:attribute>
535 <dia:attribute name="numcp">
536 <dia:int val="1"/>
537 </dia:attribute>
538 <dia:attribute name="line_color">
539 <dia:color val="#e60505"/>
540 </dia:attribute>
541 <dia:attribute name="line_style">
542 <dia:enum val="4"/>
543 </dia:attribute>
544 <dia:connections>
545 <dia:connection handle="0" to="O15" connection="5"/>
546 <dia:connection handle="1" to="O12" connection="5"/>
547 </dia:connections>
548 </dia:object>
549 <dia:object type="Standard - Line" version="0" id="O17">
550 <dia:attribute name="obj_pos">
551 <dia:point val="34.5244,11.2917"/>
552 </dia:attribute>
553 <dia:attribute name="obj_bb">
554 <dia:rectangle val="19.062,9.92418;34.5785,11.3458"/>
555 </dia:attribute>
556 <dia:attribute name="conn_endpoints">
557 <dia:point val="34.5244,11.2917"/>
558 <dia:point val="19.1161,9.97825"/>
559 </dia:attribute>
560 <dia:attribute name="numcp">
561 <dia:int val="1"/>
562 </dia:attribute>
563 <dia:attribute name="line_color">
564 <dia:color val="#e60505"/>
565 </dia:attribute>
566 <dia:attribute name="line_style">
567 <dia:enum val="4"/>
568 </dia:attribute>
569 <dia:connections>
570 <dia:connection handle="0" to="O15" connection="0"/>
571 <dia:connection handle="1" to="O12" connection="0"/>
572 </dia:connections>
573 </dia:object>
574 <dia:object type="Standard - Line" version="0" id="O18">
575 <dia:attribute name="obj_pos">
576 <dia:point val="39.5337,14.8643"/>
577 </dia:attribute>
578 <dia:attribute name="obj_bb">
579 <dia:rectangle val="24.0713,13.4968;39.5878,14.9184"/>
580 </dia:attribute>
581 <dia:attribute name="conn_endpoints">
582 <dia:point val="39.5337,14.8643"/>
583 <dia:point val="24.1254,13.5509"/>
584 </dia:attribute>
585 <dia:attribute name="numcp">
586 <dia:int val="1"/>
587 </dia:attribute>
588 <dia:attribute name="line_color">
589 <dia:color val="#e60505"/>
590 </dia:attribute>
591 <dia:attribute name="line_style">
592 <dia:enum val="4"/>
593 </dia:attribute>
594 <dia:connections>
595 <dia:connection handle="0" to="O15" connection="7"/>
596 <dia:connection handle="1" to="O12" connection="7"/>
597 </dia:connections>
598 </dia:object>
599 <dia:object type="Standard - Line" version="0" id="O19">
600 <dia:attribute name="obj_pos">
601 <dia:point val="39.5337,11.2917"/>
602 </dia:attribute>
603 <dia:attribute name="obj_bb">
604 <dia:rectangle val="24.0713,9.92418;39.5878,11.3458"/>
605 </dia:attribute>
606 <dia:attribute name="conn_endpoints">
607 <dia:point val="39.5337,11.2917"/>
608 <dia:point val="24.1254,9.97825"/>
609 </dia:attribute>
610 <dia:attribute name="numcp">
611 <dia:int val="1"/>
612 </dia:attribute>
613 <dia:attribute name="line_color">
614 <dia:color val="#e60505"/>
615 </dia:attribute>
616 <dia:attribute name="line_style">
617 <dia:enum val="4"/>
618 </dia:attribute>
619 <dia:connections>
620 <dia:connection handle="0" to="O15" connection="2"/>
621 <dia:connection handle="1" to="O12" connection="2"/>
622 </dia:connections>
623 </dia:object>
624 <dia:object type="Geometric - Perfect Circle" version="1" id="O20">
625 <dia:attribute name="obj_pos">
626 <dia:point val="39.98,12.0742"/>
627 </dia:attribute>
628 <dia:attribute name="obj_bb">
629 <dia:rectangle val="39.93,12.0242;40.88,12.9742"/>
630 </dia:attribute>
631 <dia:attribute name="meta">
632 <dia:composite type="dict"/>
633 </dia:attribute>
634 <dia:attribute name="elem_corner">
635 <dia:point val="39.98,12.0742"/>
636 </dia:attribute>
637 <dia:attribute name="elem_width">
638 <dia:real val="0.84999999999999787"/>
639 </dia:attribute>
640 <dia:attribute name="elem_height">
641 <dia:real val="0.84999999999999787"/>
642 </dia:attribute>
643 <dia:attribute name="line_width">
644 <dia:real val="0.10000000000000001"/>
645 </dia:attribute>
646 <dia:attribute name="line_colour">
647 <dia:color val="#000000"/>
648 </dia:attribute>
649 <dia:attribute name="fill_colour">
650 <dia:color val="#ffffff"/>
651 </dia:attribute>
652 <dia:attribute name="show_background">
653 <dia:boolean val="true"/>
654 </dia:attribute>
655 <dia:attribute name="line_style">
656 <dia:enum val="0"/>
657 <dia:real val="1"/>
658 </dia:attribute>
659 <dia:attribute name="flip_horizontal">
660 <dia:boolean val="false"/>
661 </dia:attribute>
662 <dia:attribute name="flip_vertical">
663 <dia:boolean val="false"/>
664 </dia:attribute>
665 <dia:attribute name="subscale">
666 <dia:real val="1"/>
667 </dia:attribute>
668 </dia:object>
669 <dia:object type="Standard - Line" version="0" id="O21">
670 <dia:attribute name="obj_pos">
671 <dia:point val="40.83,12.4992"/>
672 </dia:attribute>
673 <dia:attribute name="obj_bb">
674 <dia:rectangle val="40.78,12.1388;49.2453,12.8624"/>
675 </dia:attribute>
676 <dia:attribute name="conn_endpoints">
677 <dia:point val="40.83,12.4992"/>
678 <dia:point val="49.1335,12.5007"/>
679 </dia:attribute>
680 <dia:attribute name="numcp">
681 <dia:int val="1"/>
682 </dia:attribute>
683 <dia:attribute name="end_arrow">
684 <dia:enum val="22"/>
685 </dia:attribute>
686 <dia:attribute name="end_arrow_length">
687 <dia:real val="0.5"/>
688 </dia:attribute>
689 <dia:attribute name="end_arrow_width">
690 <dia:real val="0.5"/>
691 </dia:attribute>
692 <dia:connections>
693 <dia:connection handle="0" to="O20" connection="3"/>
694 </dia:connections>
695 </dia:object>
696 <dia:object type="Standard - Text" version="1" id="O22">
697 <dia:attribute name="obj_pos">
698 <dia:point val="42.0954,11.99"/>
699 </dia:attribute>
700 <dia:attribute name="obj_bb">
701 <dia:rectangle val="42.0954,11.395;46.7404,12.1425"/>
702 </dia:attribute>
703 <dia:attribute name="text">
704 <dia:composite type="text">
705 <dia:attribute name="string">
706 <dia:string>#pad 1 (source)#</dia:string>
707 </dia:attribute>
708 <dia:attribute name="font">
709 <dia:font family="sans" style="0" name="Helvetica"/>
710 </dia:attribute>
711 <dia:attribute name="height">
712 <dia:real val="0.80000000000000004"/>
713 </dia:attribute>
714 <dia:attribute name="pos">
715 <dia:point val="42.0954,11.99"/>
716 </dia:attribute>
717 <dia:attribute name="color">
718 <dia:color val="#000000"/>
719 </dia:attribute>
720 <dia:attribute name="alignment">
721 <dia:enum val="0"/>
722 </dia:attribute>
723 </dia:composite>
724 </dia:attribute>
725 <dia:attribute name="valign">
726 <dia:enum val="3"/>
727 </dia:attribute>
728 </dia:object>
729 <dia:object type="Geometric - Perfect Circle" version="1" id="O23">
730 <dia:attribute name="obj_pos">
731 <dia:point val="-1.44491,11.6506"/>
732 </dia:attribute>
733 <dia:attribute name="obj_bb">
734 <dia:rectangle val="-1.49491,11.6006;-0.54491,12.5506"/>
735 </dia:attribute>
736 <dia:attribute name="meta">
737 <dia:composite type="dict"/>
738 </dia:attribute>
739 <dia:attribute name="elem_corner">
740 <dia:point val="-1.44491,11.6506"/>
741 </dia:attribute>
742 <dia:attribute name="elem_width">
743 <dia:real val="0.84999999999999787"/>
744 </dia:attribute>
745 <dia:attribute name="elem_height">
746 <dia:real val="0.84999999999999787"/>
747 </dia:attribute>
748 <dia:attribute name="line_width">
749 <dia:real val="0.10000000000000001"/>
750 </dia:attribute>
751 <dia:attribute name="line_colour">
752 <dia:color val="#000000"/>
753 </dia:attribute>
754 <dia:attribute name="fill_colour">
755 <dia:color val="#ffffff"/>
756 </dia:attribute>
757 <dia:attribute name="show_background">
758 <dia:boolean val="true"/>
759 </dia:attribute>
760 <dia:attribute name="line_style">
761 <dia:enum val="0"/>
762 <dia:real val="1"/>
763 </dia:attribute>
764 <dia:attribute name="flip_horizontal">
765 <dia:boolean val="false"/>
766 </dia:attribute>
767 <dia:attribute name="flip_vertical">
768 <dia:boolean val="false"/>
769 </dia:attribute>
770 <dia:attribute name="subscale">
771 <dia:real val="1"/>
772 </dia:attribute>
773 </dia:object>
774 <dia:object type="Standard - Line" version="0" id="O24">
775 <dia:attribute name="obj_pos">
776 <dia:point val="-9.61991,12.09"/>
777 </dia:attribute>
778 <dia:attribute name="obj_bb">
779 <dia:rectangle val="-9.67,11.7149;-1.33311,12.4385"/>
780 </dia:attribute>
781 <dia:attribute name="conn_endpoints">
782 <dia:point val="-9.61991,12.09"/>
783 <dia:point val="-1.44491,12.0756"/>
784 </dia:attribute>
785 <dia:attribute name="numcp">
786 <dia:int val="1"/>
787 </dia:attribute>
788 <dia:attribute name="end_arrow">
789 <dia:enum val="22"/>
790 </dia:attribute>
791 <dia:attribute name="end_arrow_length">
792 <dia:real val="0.5"/>
793 </dia:attribute>
794 <dia:attribute name="end_arrow_width">
795 <dia:real val="0.5"/>
796 </dia:attribute>
797 <dia:connections>
798 <dia:connection handle="1" to="O23" connection="2"/>
799 </dia:connections>
800 </dia:object>
801 <dia:object type="Standard - Text" version="1" id="O25">
802 <dia:attribute name="obj_pos">
803 <dia:point val="-7.39291,11.49"/>
804 </dia:attribute>
805 <dia:attribute name="obj_bb">
806 <dia:rectangle val="-7.39291,10.895;-3.58791,11.6425"/>
807 </dia:attribute>
808 <dia:attribute name="text">
809 <dia:composite type="text">
810 <dia:attribute name="string">
811 <dia:string>#pad 0 (sink)#</dia:string>
812 </dia:attribute>
813 <dia:attribute name="font">
814 <dia:font family="sans" style="0" name="Helvetica"/>
815 </dia:attribute>
816 <dia:attribute name="height">
817 <dia:real val="0.80000000000000004"/>
818 </dia:attribute>
819 <dia:attribute name="pos">
820 <dia:point val="-7.39291,11.49"/>
821 </dia:attribute>
822 <dia:attribute name="color">
823 <dia:color val="#000000"/>
824 </dia:attribute>
825 <dia:attribute name="alignment">
826 <dia:enum val="0"/>
827 </dia:attribute>
828 </dia:composite>
829 </dia:attribute>
830 <dia:attribute name="valign">
831 <dia:enum val="3"/>
832 </dia:attribute>
833 </dia:object>
834 <dia:object type="Standard - Box" version="0" id="O26">
835 <dia:attribute name="obj_pos">
836 <dia:point val="19.4911,13.8333"/>
837 </dia:attribute>
838 <dia:attribute name="obj_bb">
839 <dia:rectangle val="19.4411,13.7833;24.5504,17.4559"/>
840 </dia:attribute>
841 <dia:attribute name="elem_corner">
842 <dia:point val="19.4911,13.8333"/>
843 </dia:attribute>
844 <dia:attribute name="elem_width">
845 <dia:real val="5.009308462554376"/>
846 </dia:attribute>
847 <dia:attribute name="elem_height">
848 <dia:real val="3.5726155970598077"/>
849 </dia:attribute>
850 <dia:attribute name="border_width">
851 <dia:real val="0.10000000149011612"/>
852 </dia:attribute>
853 <dia:attribute name="border_color">
854 <dia:color val="#a020f0"/>
855 </dia:attribute>
856 <dia:attribute name="show_background">
857 <dia:boolean val="false"/>
858 </dia:attribute>
859 </dia:object>
860 <dia:object type="Standard - Box" version="0" id="O27">
861 <dia:attribute name="obj_pos">
862 <dia:point val="34.4994,17.2967"/>
863 </dia:attribute>
864 <dia:attribute name="obj_bb">
865 <dia:rectangle val="34.4494,17.2467;39.5587,20.9193"/>
866 </dia:attribute>
867 <dia:attribute name="elem_corner">
868 <dia:point val="34.4994,17.2967"/>
869 </dia:attribute>
870 <dia:attribute name="elem_width">
871 <dia:real val="5.009308462554376"/>
872 </dia:attribute>
873 <dia:attribute name="elem_height">
874 <dia:real val="3.5726155970598077"/>
875 </dia:attribute>
876 <dia:attribute name="border_width">
877 <dia:real val="0.10000000149011612"/>
878 </dia:attribute>
879 <dia:attribute name="border_color">
880 <dia:color val="#8b6914"/>
881 </dia:attribute>
882 <dia:attribute name="show_background">
883 <dia:boolean val="true"/>
884 </dia:attribute>
885 </dia:object>
886 <dia:object type="Standard - Line" version="0" id="O28">
887 <dia:attribute name="obj_pos">
888 <dia:point val="34.4994,20.8693"/>
889 </dia:attribute>
890 <dia:attribute name="obj_bb">
891 <dia:rectangle val="19.4311,17.3459;34.5594,20.9293"/>
892 </dia:attribute>
893 <dia:attribute name="conn_endpoints">
894 <dia:point val="34.4994,20.8693"/>
895 <dia:point val="19.4911,17.4059"/>
896 </dia:attribute>
897 <dia:attribute name="numcp">
898 <dia:int val="1"/>
899 </dia:attribute>
900 <dia:attribute name="line_color">
901 <dia:color val="#e60505"/>
902 </dia:attribute>
903 <dia:attribute name="line_style">
904 <dia:enum val="4"/>
905 </dia:attribute>
906 <dia:connections>
907 <dia:connection handle="0" to="O27" connection="5"/>
908 <dia:connection handle="1" to="O26" connection="5"/>
909 </dia:connections>
910 </dia:object>
911 <dia:object type="Standard - Line" version="0" id="O29">
912 <dia:attribute name="obj_pos">
913 <dia:point val="34.4994,17.2967"/>
914 </dia:attribute>
915 <dia:attribute name="obj_bb">
916 <dia:rectangle val="19.4311,13.7733;34.5594,17.3567"/>
917 </dia:attribute>
918 <dia:attribute name="conn_endpoints">
919 <dia:point val="34.4994,17.2967"/>
920 <dia:point val="19.4911,13.8333"/>
921 </dia:attribute>
922 <dia:attribute name="numcp">
923 <dia:int val="1"/>
924 </dia:attribute>
925 <dia:attribute name="line_color">
926 <dia:color val="#e60505"/>
927 </dia:attribute>
928 <dia:attribute name="line_style">
929 <dia:enum val="4"/>
930 </dia:attribute>
931 <dia:connections>
932 <dia:connection handle="0" to="O27" connection="0"/>
933 <dia:connection handle="1" to="O26" connection="0"/>
934 </dia:connections>
935 </dia:object>
936 <dia:object type="Standard - Line" version="0" id="O30">
937 <dia:attribute name="obj_pos">
938 <dia:point val="39.5087,20.8693"/>
939 </dia:attribute>
940 <dia:attribute name="obj_bb">
941 <dia:rectangle val="24.4404,17.3459;39.5687,20.9293"/>
942 </dia:attribute>
943 <dia:attribute name="conn_endpoints">
944 <dia:point val="39.5087,20.8693"/>
945 <dia:point val="24.5004,17.4059"/>
946 </dia:attribute>
947 <dia:attribute name="numcp">
948 <dia:int val="1"/>
949 </dia:attribute>
950 <dia:attribute name="line_color">
951 <dia:color val="#e60505"/>
952 </dia:attribute>
953 <dia:attribute name="line_style">
954 <dia:enum val="4"/>
955 </dia:attribute>
956 <dia:connections>
957 <dia:connection handle="0" to="O27" connection="7"/>
958 <dia:connection handle="1" to="O26" connection="7"/>
959 </dia:connections>
960 </dia:object>
961 <dia:object type="Standard - Line" version="0" id="O31">
962 <dia:attribute name="obj_pos">
963 <dia:point val="39.5087,17.2967"/>
964 </dia:attribute>
965 <dia:attribute name="obj_bb">
966 <dia:rectangle val="24.4404,13.7733;39.5687,17.3567"/>
967 </dia:attribute>
968 <dia:attribute name="conn_endpoints">
969 <dia:point val="39.5087,17.2967"/>
970 <dia:point val="24.5004,13.8333"/>
971 </dia:attribute>
972 <dia:attribute name="numcp">
973 <dia:int val="1"/>
974 </dia:attribute>
975 <dia:attribute name="line_color">
976 <dia:color val="#e60505"/>
977 </dia:attribute>
978 <dia:attribute name="line_style">
979 <dia:enum val="4"/>
980 </dia:attribute>
981 <dia:connections>
982 <dia:connection handle="0" to="O27" connection="2"/>
983 <dia:connection handle="1" to="O26" connection="2"/>
984 </dia:connections>
985 </dia:object>
986 <dia:object type="Geometric - Perfect Circle" version="1" id="O32">
987 <dia:attribute name="obj_pos">
988 <dia:point val="39.855,18.7792"/>
989 </dia:attribute>
990 <dia:attribute name="obj_bb">
991 <dia:rectangle val="39.805,18.7292;40.755,19.6792"/>
992 </dia:attribute>
993 <dia:attribute name="meta">
994 <dia:composite type="dict"/>
995 </dia:attribute>
996 <dia:attribute name="elem_corner">
997 <dia:point val="39.855,18.7792"/>
998 </dia:attribute>
999 <dia:attribute name="elem_width">
1000 <dia:real val="0.84999999999999787"/>
1001 </dia:attribute>
1002 <dia:attribute name="elem_height">
1003 <dia:real val="0.84999999999999787"/>
1004 </dia:attribute>
1005 <dia:attribute name="line_width">
1006 <dia:real val="0.10000000000000001"/>
1007 </dia:attribute>
1008 <dia:attribute name="line_colour">
1009 <dia:color val="#000000"/>
1010 </dia:attribute>
1011 <dia:attribute name="fill_colour">
1012 <dia:color val="#ffffff"/>
1013 </dia:attribute>
1014 <dia:attribute name="show_background">
1015 <dia:boolean val="true"/>
1016 </dia:attribute>
1017 <dia:attribute name="line_style">
1018 <dia:enum val="0"/>
1019 <dia:real val="1"/>
1020 </dia:attribute>
1021 <dia:attribute name="flip_horizontal">
1022 <dia:boolean val="false"/>
1023 </dia:attribute>
1024 <dia:attribute name="flip_vertical">
1025 <dia:boolean val="false"/>
1026 </dia:attribute>
1027 <dia:attribute name="subscale">
1028 <dia:real val="1"/>
1029 </dia:attribute>
1030 </dia:object>
1031 <dia:object type="Standard - Line" version="0" id="O33">
1032 <dia:attribute name="obj_pos">
1033 <dia:point val="40.705,19.2042"/>
1034 </dia:attribute>
1035 <dia:attribute name="obj_bb">
1036 <dia:rectangle val="40.655,18.8438;49.1203,19.5674"/>
1037 </dia:attribute>
1038 <dia:attribute name="conn_endpoints">
1039 <dia:point val="40.705,19.2042"/>
1040 <dia:point val="49.0085,19.2057"/>
1041 </dia:attribute>
1042 <dia:attribute name="numcp">
1043 <dia:int val="1"/>
1044 </dia:attribute>
1045 <dia:attribute name="end_arrow">
1046 <dia:enum val="22"/>
1047 </dia:attribute>
1048 <dia:attribute name="end_arrow_length">
1049 <dia:real val="0.5"/>
1050 </dia:attribute>
1051 <dia:attribute name="end_arrow_width">
1052 <dia:real val="0.5"/>
1053 </dia:attribute>
1054 <dia:connections>
1055 <dia:connection handle="0" to="O32" connection="3"/>
1056 </dia:connections>
1057 </dia:object>
1058 <dia:object type="Standard - Text" version="1" id="O34">
1059 <dia:attribute name="obj_pos">
1060 <dia:point val="41.9704,18.695"/>
1061 </dia:attribute>
1062 <dia:attribute name="obj_bb">
1063 <dia:rectangle val="41.9704,18.1;46.6154,18.8475"/>
1064 </dia:attribute>
1065 <dia:attribute name="text">
1066 <dia:composite type="text">
1067 <dia:attribute name="string">
1068 <dia:string>#pad 2 (source)#</dia:string>
1069 </dia:attribute>
1070 <dia:attribute name="font">
1071 <dia:font family="sans" style="0" name="Helvetica"/>
1072 </dia:attribute>
1073 <dia:attribute name="height">
1074 <dia:real val="0.80000000000000004"/>
1075 </dia:attribute>
1076 <dia:attribute name="pos">
1077 <dia:point val="41.9704,18.695"/>
1078 </dia:attribute>
1079 <dia:attribute name="color">
1080 <dia:color val="#000000"/>
1081 </dia:attribute>
1082 <dia:attribute name="alignment">
1083 <dia:enum val="0"/>
1084 </dia:attribute>
1085 </dia:composite>
1086 </dia:attribute>
1087 <dia:attribute name="valign">
1088 <dia:enum val="3"/>
1089 </dia:attribute>
1090 </dia:object>
1091 <dia:object type="Standard - Line" version="0" id="O35">
1092 <dia:attribute name="obj_pos">
1093 <dia:point val="27.3,9.55"/>
1094 </dia:attribute>
1095 <dia:attribute name="obj_bb">
1096 <dia:rectangle val="24.0146,9.49376;27.3562,10.255"/>
1097 </dia:attribute>
1098 <dia:attribute name="conn_endpoints">
1099 <dia:point val="27.3,9.55"/>
1100 <dia:point val="24.1254,9.97825"/>
1101 </dia:attribute>
1102 <dia:attribute name="numcp">
1103 <dia:int val="1"/>
1104 </dia:attribute>
1105 <dia:attribute name="line_color">
1106 <dia:color val="#a020f0"/>
1107 </dia:attribute>
1108 <dia:attribute name="end_arrow">
1109 <dia:enum val="22"/>
1110 </dia:attribute>
1111 <dia:attribute name="end_arrow_length">
1112 <dia:real val="0.5"/>
1113 </dia:attribute>
1114 <dia:attribute name="end_arrow_width">
1115 <dia:real val="0.5"/>
1116 </dia:attribute>
1117 <dia:connections>
1118 <dia:connection handle="1" to="O12" connection="2"/>
1119 </dia:connections>
1120 </dia:object>
1121 <dia:object type="Standard - Line" version="0" id="O36">
1122 <dia:attribute name="obj_pos">
1123 <dia:point val="27.3454,9.53624"/>
1124 </dia:attribute>
1125 <dia:attribute name="obj_bb">
1126 <dia:rectangle val="24.4311,9.46695;27.4147,13.9265"/>
1127 </dia:attribute>
1128 <dia:attribute name="conn_endpoints">
1129 <dia:point val="27.3454,9.53624"/>
1130 <dia:point val="24.5004,13.8333"/>
1131 </dia:attribute>
1132 <dia:attribute name="numcp">
1133 <dia:int val="1"/>
1134 </dia:attribute>
1135 <dia:attribute name="line_color">
1136 <dia:color val="#a020f0"/>
1137 </dia:attribute>
1138 <dia:attribute name="end_arrow">
1139 <dia:enum val="22"/>
1140 </dia:attribute>
1141 <dia:attribute name="end_arrow_length">
1142 <dia:real val="0.5"/>
1143 </dia:attribute>
1144 <dia:attribute name="end_arrow_width">
1145 <dia:real val="0.5"/>
1146 </dia:attribute>
1147 <dia:connections>
1148 <dia:connection handle="1" to="O26" connection="2"/>
1149 </dia:connections>
1150 </dia:object>
1151 </dia:layer>
1152</dia:diagram>
diff --git a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg b/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg
deleted file mode 100644
index 2340c0f8bc9..00000000000
--- a/Documentation/DocBook/media/v4l/subdev-image-processing-scaling-multi-source.svg
+++ /dev/null
@@ -1,116 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
3<svg width="59cm" height="17cm" viewBox="-194 128 1179 330" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="-8" y="130" width="806" height="327"/>
5 <g>
6 <rect style="fill: #ffffff" x="4.5" y="189" width="159" height="104"/>
7 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a52a2a" x="4.5" y="189" width="159" height="104"/>
8 </g>
9 <g>
10 <rect style="fill: #ffffff" x="49.5" y="204" width="94" height="77"/>
11 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #0000ff" x="49.5" y="204" width="94" height="77"/>
12 </g>
13 <text style="fill: #0000ff;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="60" y="224">
14 <tspan x="60" y="224">sink</tspan>
15 <tspan x="60" y="240">crop</tspan>
16 <tspan x="60" y="256">selection</tspan>
17 </text>
18 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="29.5" y="158">
19 <tspan x="29.5" y="158"></tspan>
20 </text>
21 <text style="fill: #a52a2a;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="8.53836" y="157.914">
22 <tspan x="8.53836" y="157.914">sink media</tspan>
23 <tspan x="8.53836" y="173.914">bus format</tspan>
24 </text>
25 <g>
26 <rect style="fill: #ffffff" x="333.644" y="185.65" width="165.2" height="172.478"/>
27 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #00ff00" x="333.644" y="185.65" width="165.2" height="172.478"/>
28 </g>
29 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="358.128" x2="49.5" y2="281"/>
30 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="333.644" y1="185.65" x2="49.5" y2="204"/>
31 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="358.128" x2="143.5" y2="281"/>
32 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="498.844" y1="185.65" x2="143.5" y2="204"/>
33 <text style="fill: #00ff00;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="334.704" y="149.442">
34 <tspan x="334.704" y="149.442">sink compose</tspan>
35 <tspan x="334.704" y="165.442">selection (scaling)</tspan>
36 </text>
37 <g>
38 <rect style="fill: #ffffff" x="382.322" y="199.565" width="100.186" height="71.4523"/>
39 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="382.322" y="199.565" width="100.186" height="71.4523"/>
40 </g>
41 <text style="fill: #a020f0;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="543.322" y="149.442">
42 <tspan x="543.322" y="149.442">source</tspan>
43 <tspan x="543.322" y="165.442">crop</tspan>
44 <tspan x="543.322" y="181.442">selection</tspan>
45 </text>
46 <text style="fill: #8b6914;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="691.5" y="157.128">
47 <tspan x="691.5" y="157.128">source media</tspan>
48 <tspan x="691.5" y="173.128">bus format</tspan>
49 </text>
50 <g>
51 <rect style="fill: #ffffff" x="690.488" y="225.834" width="100.186" height="71.4523"/>
52 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="690.488" y="225.834" width="100.186" height="71.4523"/>
53 </g>
54 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="690.488" y1="297.286" x2="382.322" y2="271.018"/>
55 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="690.488" y1="225.834" x2="382.322" y2="199.565"/>
56 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.674" y1="297.286" x2="482.508" y2="271.018"/>
57 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.674" y1="225.834" x2="482.508" y2="199.565"/>
58 <g>
59 <ellipse style="fill: #ffffff" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
60 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
61 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="808.1" cy="249.984" rx="8.5" ry="8.5"/>
62 </g>
63 <g>
64 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="816.6" y1="249.984" x2="972.934" y2="250.012"/>
65 <polygon style="fill: #000000" points="980.434,250.014 970.433,255.012 972.934,250.012 970.435,245.012 "/>
66 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="980.434,250.014 970.433,255.012 972.934,250.012 970.435,245.012 "/>
67 </g>
68 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="841.908" y="239.8">
69 <tspan x="841.908" y="239.8">pad 1 (source)</tspan>
70 </text>
71 <g>
72 <ellipse style="fill: #ffffff" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
73 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
74 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="-20.3982" cy="241.512" rx="8.5" ry="8.5"/>
75 </g>
76 <g>
77 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="-192.398" y1="241.8" x2="-38.6343" y2="241.529"/>
78 <polygon style="fill: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
79 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="-31.1343,241.516 -41.1254,246.534 -38.6343,241.529 -41.1431,236.534 "/>
80 </g>
81 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="-147.858" y="229.8">
82 <tspan x="-147.858" y="229.8">pad 0 (sink)</tspan>
83 </text>
84 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x="389.822" y="276.666" width="100.186" height="71.4523"/>
85 <g>
86 <rect style="fill: #ffffff" x="689.988" y="345.934" width="100.186" height="71.4523"/>
87 <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #8b6914" x="689.988" y="345.934" width="100.186" height="71.4523"/>
88 </g>
89 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="689.988" y1="417.386" x2="389.822" y2="348.118"/>
90 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="689.988" y1="345.934" x2="389.822" y2="276.666"/>
91 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.174" y1="417.386" x2="490.008" y2="348.118"/>
92 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke-dasharray: 4; stroke: #e60505" x1="790.174" y1="345.934" x2="490.008" y2="276.666"/>
93 <g>
94 <ellipse style="fill: #ffffff" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
95 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
96 <ellipse style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" cx="805.6" cy="384.084" rx="8.5" ry="8.5"/>
97 </g>
98 <g>
99 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="814.1" y1="384.084" x2="970.434" y2="384.112"/>
100 <polygon style="fill: #000000" points="977.934,384.114 967.933,389.112 970.434,384.112 967.935,379.112 "/>
101 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="977.934,384.114 967.933,389.112 970.434,384.112 967.935,379.112 "/>
102 </g>
103 <text style="fill: #000000;text-anchor:start;font-size:12.8;font-family:sanserif;font-style:normal;font-weight:normal" x="839.408" y="373.9">
104 <tspan x="839.408" y="373.9">pad 2 (source)</tspan>
105 </text>
106 <g>
107 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="546" y1="191" x2="492.157" y2="198.263"/>
108 <polygon style="fill: #a020f0" points="484.724,199.266 493.966,192.974 492.157,198.263 495.303,202.884 "/>
109 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="484.724,199.266 493.966,192.974 492.157,198.263 495.303,202.884 "/>
110 </g>
111 <g>
112 <line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" x1="546.908" y1="190.725" x2="495.383" y2="268.548"/>
113 <polygon style="fill: #a020f0" points="491.242,274.802 492.594,263.703 495.383,268.548 500.932,269.224 "/>
114 <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #a020f0" points="491.242,274.802 492.594,263.703 495.383,268.548 500.932,269.224 "/>
115 </g>
116</svg>
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index f2413acfe24..4e8e8985cc1 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -29,7 +29,7 @@
29<title>LINUX MEDIA INFRASTRUCTURE API</title> 29<title>LINUX MEDIA INFRASTRUCTURE API</title>
30 30
31<copyright> 31<copyright>
32 <year>2009-2012</year> 32 <year>2009-2011</year>
33 <holder>LinuxTV Developers</holder> 33 <holder>LinuxTV Developers</holder>
34</copyright> 34</copyright>
35 35
@@ -53,7 +53,7 @@ Foundation. A copy of the license is included in the chapter entitled
53 video and radio straming devices, including video cameras, 53 video and radio straming devices, including video cameras,
54 analog and digital TV receiver cards, AM/FM receiver cards, 54 analog and digital TV receiver cards, AM/FM receiver cards,
55 streaming capture devices.</para> 55 streaming capture devices.</para>
56 <para>It is divided into four parts.</para> 56 <para>It is divided into three parts.</para>
57 <para>The first part covers radio, capture, 57 <para>The first part covers radio, capture,
58 cameras and analog TV devices.</para> 58 cameras and analog TV devices.</para>
59 <para>The second part covers the 59 <para>The second part covers the
@@ -62,8 +62,7 @@ Foundation. A copy of the license is included in the chapter entitled
62 in fact it covers several different video standards including 62 in fact it covers several different video standards including
63 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated 63 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
64 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para> 64 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para>
65 <para>The third part covers the Remote Controller API.</para> 65 <para>The third part covers Remote Controller API</para>
66 <para>The fourth part covers the Media Controller API.</para>
67 <para>For additional information and for the latest development code, 66 <para>For additional information and for the latest development code,
68 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> 67 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para>
69 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> 68 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para>
@@ -88,7 +87,7 @@ Foundation. A copy of the license is included in the chapter entitled
88</author> 87</author>
89</authorgroup> 88</authorgroup>
90<copyright> 89<copyright>
91 <year>2009-2012</year> 90 <year>2009-2011</year>
92 <holder>Mauro Carvalho Chehab</holder> 91 <holder>Mauro Carvalho Chehab</holder>
93</copyright> 92</copyright>
94 93
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index fe122d6e686..17910e2052a 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -572,7 +572,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
572 </para> 572 </para>
573 <para> 573 <para>
574 The simplest way to activate the FLASH based bad block table support 574 The simplest way to activate the FLASH based bad block table support
575 is to set the option NAND_BBT_USE_FLASH in the bbt_option field of 575 is to set the option NAND_USE_FLASH_BBT in the option field of
576 the nand chip structure before calling nand_scan(). For AG-AND 576 the nand chip structure before calling nand_scan(). For AG-AND
577 chips is this done by default. 577 chips is this done by default.
578 This activates the default FLASH based bad block table functionality 578 This activates the default FLASH based bad block table functionality
@@ -773,6 +773,20 @@ struct nand_oobinfo {
773 done according to the default builtin scheme. 773 done according to the default builtin scheme.
774 </para> 774 </para>
775 </sect2> 775 </sect2>
776 <sect2 id="User_space_placement_selection">
777 <title>User space placement selection</title>
778 <para>
779 All non ecc functions like mtd->read and mtd->write use an internal
780 structure, which can be set by an ioctl. This structure is preset
781 to the autoplacement default.
782 <programlisting>
783 ioctl (fd, MEMSETOOBSEL, oobsel);
784 </programlisting>
785 oobsel is a pointer to a user supplied structure of type
786 nand_oobconfig. The contents of this structure must match the
787 criteria of the filesystem, which will be used. See an example in utils/nandwrite.c.
788 </para>
789 </sect2>
776 </sect1> 790 </sect1>
777 <sect1 id="Spare_area_autoplacement_default"> 791 <sect1 id="Spare_area_autoplacement_default">
778 <title>Spare area autoplacement default schemes</title> 792 <title>Spare area autoplacement default schemes</title>
@@ -1119,6 +1133,8 @@ in this page</entry>
1119 These constants are defined in nand.h. They are ored together to describe 1133 These constants are defined in nand.h. They are ored together to describe
1120 the chip functionality. 1134 the chip functionality.
1121 <programlisting> 1135 <programlisting>
1136/* Chip can not auto increment pages */
1137#define NAND_NO_AUTOINCR 0x00000001
1122/* Buswitdh is 16 bit */ 1138/* Buswitdh is 16 bit */
1123#define NAND_BUSWIDTH_16 0x00000002 1139#define NAND_BUSWIDTH_16 0x00000002
1124/* Device supports partial programming without padding */ 1140/* Device supports partial programming without padding */
@@ -1142,6 +1158,9 @@ in this page</entry>
1142 These constants are defined in nand.h. They are ored together to describe 1158 These constants are defined in nand.h. They are ored together to describe
1143 the functionality. 1159 the functionality.
1144 <programlisting> 1160 <programlisting>
1161/* Use a flash based bad block table. This option is parsed by the
1162 * default bad block table function (nand_default_bbt). */
1163#define NAND_USE_FLASH_BBT 0x00010000
1145/* The hw ecc generator provides a syndrome instead a ecc value on read 1164/* The hw ecc generator provides a syndrome instead a ecc value on read
1146 * This can only work if we have the ecc bytes directly behind the 1165 * This can only work if we have the ecc bytes directly behind the
1147 * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ 1166 * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
@@ -1216,6 +1235,8 @@ in this page</entry>
1216#define NAND_BBT_LASTBLOCK 0x00000010 1235#define NAND_BBT_LASTBLOCK 0x00000010
1217/* The bbt is at the given page, else we must scan for the bbt */ 1236/* The bbt is at the given page, else we must scan for the bbt */
1218#define NAND_BBT_ABSPAGE 0x00000020 1237#define NAND_BBT_ABSPAGE 0x00000020
1238/* The bbt is at the given page, else we must scan for the bbt */
1239#define NAND_BBT_SEARCH 0x00000040
1219/* bbt is stored per chip on multichip devices */ 1240/* bbt is stored per chip on multichip devices */
1220#define NAND_BBT_PERCHIP 0x00000080 1241#define NAND_BBT_PERCHIP 0x00000080
1221/* bbt has a version counter at offset veroffs */ 1242/* bbt has a version counter at offset veroffs */
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl
index 29df25016c7..59ad69a9d77 100644
--- a/Documentation/DocBook/networking.tmpl
+++ b/Documentation/DocBook/networking.tmpl
@@ -56,7 +56,7 @@
56!Enet/core/filter.c 56!Enet/core/filter.c
57 </sect1> 57 </sect1>
58 <sect1><title>Generic Network Statistics</title> 58 <sect1><title>Generic Network Statistics</title>
59!Iinclude/uapi/linux/gen_stats.h 59!Iinclude/linux/gen_stats.h
60!Enet/core/gen_stats.c 60!Enet/core/gen_stats.c
61!Enet/core/gen_estimator.c 61!Enet/core/gen_estimator.c
62 </sect1> 62 </sect1>
@@ -80,7 +80,7 @@
80!Enet/wimax/op-rfkill.c 80!Enet/wimax/op-rfkill.c
81!Enet/wimax/stack.c 81!Enet/wimax/stack.c
82!Iinclude/net/wimax.h 82!Iinclude/net/wimax.h
83!Iinclude/uapi/linux/wimax.h 83!Iinclude/linux/wimax.h
84 </sect1> 84 </sect1>
85 </chapter> 85 </chapter>
86 86
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ddb05e98af0..7c4b514d62b 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -521,11 +521,6 @@ Here's a description of the fields of <varname>struct uio_mem</varname>:
521 521
522<itemizedlist> 522<itemizedlist>
523<listitem><para> 523<listitem><para>
524<varname>const char *name</varname>: Optional. Set this to help identify
525the memory region, it will show up in the corresponding sysfs node.
526</para></listitem>
527
528<listitem><para>
529<varname>int memtype</varname>: Required if the mapping is used. Set this to 524<varname>int memtype</varname>: Required if the mapping is used. Set this to
530<varname>UIO_MEM_PHYS</varname> if you you have physical memory on your 525<varname>UIO_MEM_PHYS</varname> if you you have physical memory on your
531card to be mapped. Use <varname>UIO_MEM_LOGICAL</varname> for logical 526card to be mapped. Use <varname>UIO_MEM_LOGICAL</varname> for logical
@@ -534,7 +529,7 @@ memory (e.g. allocated with <function>kmalloc()</function>). There's also
534</para></listitem> 529</para></listitem>
535 530
536<listitem><para> 531<listitem><para>
537<varname>phys_addr_t addr</varname>: Required if the mapping is used. 532<varname>unsigned long addr</varname>: Required if the mapping is used.
538Fill in the address of your memory block. This address is the one that 533Fill in the address of your memory block. This address is the one that
539appears in sysfs. 534appears in sysfs.
540</para></listitem> 535</para></listitem>
@@ -558,7 +553,7 @@ instead to remember such an address.
558</itemizedlist> 553</itemizedlist>
559 554
560<para> 555<para>
561Please do not touch the <varname>map</varname> element of 556Please do not touch the <varname>kobj</varname> element of
562<varname>struct uio_mem</varname>! It is used by the UIO framework 557<varname>struct uio_mem</varname>! It is used by the UIO framework
563to set up sysfs files for this mapping. Simply leave it alone. 558to set up sysfs files for this mapping. Simply leave it alone.
564</para> 559</para>
@@ -719,62 +714,6 @@ framework to set up sysfs files for this region. Simply leave it alone.
719 </para> 714 </para>
720</sect1> 715</sect1>
721 716
722<sect1 id="using uio_dmem_genirq">
723<title>Using uio_dmem_genirq for platform devices</title>
724 <para>
725 In addition to statically allocated memory ranges, they may also be
726 a desire to use dynamically allocated regions in a user space driver.
727 In particular, being able to access memory made available through the
728 dma-mapping API, may be particularly useful. The
729 <varname>uio_dmem_genirq</varname> driver provides a way to accomplish
730 this.
731 </para>
732 <para>
733 This driver is used in a similar manner to the
734 <varname>"uio_pdrv_genirq"</varname> driver with respect to interrupt
735 configuration and handling.
736 </para>
737 <para>
738 Set the <varname>.name</varname> element of
739 <varname>struct platform_device</varname> to
740 <varname>"uio_dmem_genirq"</varname> to use this driver.
741 </para>
742 <para>
743 When using this driver, fill in the <varname>.platform_data</varname>
744 element of <varname>struct platform_device</varname>, which is of type
745 <varname>struct uio_dmem_genirq_pdata</varname> and which contains the
746 following elements:
747 </para>
748 <itemizedlist>
749 <listitem><varname>struct uio_info uioinfo</varname>: The same
750 structure used as the <varname>uio_pdrv_genirq</varname> platform
751 data</listitem>
752 <listitem><varname>unsigned int *dynamic_region_sizes</varname>:
753 Pointer to list of sizes of dynamic memory regions to be mapped into
754 user space.
755 </listitem>
756 <listitem><varname>unsigned int num_dynamic_regions</varname>:
757 Number of elements in <varname>dynamic_region_sizes</varname> array.
758 </listitem>
759 </itemizedlist>
760 <para>
761 The dynamic regions defined in the platform data will be appended to
762 the <varname> mem[] </varname> array after the platform device
763 resources, which implies that the total number of static and dynamic
764 memory regions cannot exceed <varname>MAX_UIO_MAPS</varname>.
765 </para>
766 <para>
767 The dynamic memory regions will be allocated when the UIO device file,
768 <varname>/dev/uioX</varname> is opened.
769 Simiar to static memory resources, the memory region information for
770 dynamic regions is then visible via sysfs at
771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
772 The dynmaic memory regions will be freed when the UIO device file is
773 closed. When no processes are holding the device file open, the address
774 returned to userspace is ~0.
775 </para>
776</sect1>
777
778</chapter> 717</chapter>
779 718
780<chapter id="userspace_driver" xreflabel="Writing a driver in user space"> 719<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index fb32aead5a0..598c22f3b3a 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -404,7 +404,7 @@
404 /* SNDRV_CARDS: maximum number of cards supported by this module */ 404 /* SNDRV_CARDS: maximum number of cards supported by this module */
405 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; 405 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
406 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; 406 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
407 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; 407 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
408 408
409 /* definition of the chip-specific record */ 409 /* definition of the chip-specific record */
410 struct mychip { 410 struct mychip {
@@ -433,9 +433,9 @@
433 /* chip-specific constructor 433 /* chip-specific constructor
434 * (see "Management of Cards and Components") 434 * (see "Management of Cards and Components")
435 */ 435 */
436 static int snd_mychip_create(struct snd_card *card, 436 static int __devinit snd_mychip_create(struct snd_card *card,
437 struct pci_dev *pci, 437 struct pci_dev *pci,
438 struct mychip **rchip) 438 struct mychip **rchip)
439 { 439 {
440 struct mychip *chip; 440 struct mychip *chip;
441 int err; 441 int err;
@@ -475,8 +475,8 @@
475 } 475 }
476 476
477 /* constructor -- see "Constructor" sub-section */ 477 /* constructor -- see "Constructor" sub-section */
478 static int snd_mychip_probe(struct pci_dev *pci, 478 static int __devinit snd_mychip_probe(struct pci_dev *pci,
479 const struct pci_device_id *pci_id) 479 const struct pci_device_id *pci_id)
480 { 480 {
481 static int dev; 481 static int dev;
482 struct snd_card *card; 482 struct snd_card *card;
@@ -526,7 +526,7 @@
526 } 526 }
527 527
528 /* destructor -- see the "Destructor" sub-section */ 528 /* destructor -- see the "Destructor" sub-section */
529 static void snd_mychip_remove(struct pci_dev *pci) 529 static void __devexit snd_mychip_remove(struct pci_dev *pci)
530 { 530 {
531 snd_card_free(pci_get_drvdata(pci)); 531 snd_card_free(pci_get_drvdata(pci));
532 pci_set_drvdata(pci, NULL); 532 pci_set_drvdata(pci, NULL);
@@ -542,8 +542,9 @@
542 <para> 542 <para>
543 The real constructor of PCI drivers is the <function>probe</function> callback. 543 The real constructor of PCI drivers is the <function>probe</function> callback.
544 The <function>probe</function> callback and other component-constructors which are called 544 The <function>probe</function> callback and other component-constructors which are called
545 from the <function>probe</function> callback cannot be used with 545 from the <function>probe</function> callback should be defined with
546 the <parameter>__init</parameter> prefix 546 the <parameter>__devinit</parameter> prefix. You
547 cannot use the <parameter>__init</parameter> prefix for them,
547 because any PCI device could be a hotplug device. 548 because any PCI device could be a hotplug device.
548 </para> 549 </para>
549 550
@@ -727,7 +728,7 @@
727 <informalexample> 728 <informalexample>
728 <programlisting> 729 <programlisting>
729<![CDATA[ 730<![CDATA[
730 static void snd_mychip_remove(struct pci_dev *pci) 731 static void __devexit snd_mychip_remove(struct pci_dev *pci)
731 { 732 {
732 snd_card_free(pci_get_drvdata(pci)); 733 snd_card_free(pci_get_drvdata(pci));
733 pci_set_drvdata(pci, NULL); 734 pci_set_drvdata(pci, NULL);
@@ -1058,6 +1059,14 @@
1058 </para> 1059 </para>
1059 1060
1060 <para> 1061 <para>
1062 As further notes, the destructors (both
1063 <function>snd_mychip_dev_free</function> and
1064 <function>snd_mychip_free</function>) cannot be defined with
1065 the <parameter>__devexit</parameter> prefix, because they may be
1066 called from the constructor, too, at the false path.
1067 </para>
1068
1069 <para>
1061 For a device which allows hotplugging, you can use 1070 For a device which allows hotplugging, you can use
1062 <function>snd_card_free_when_closed</function>. This one will 1071 <function>snd_card_free_when_closed</function>. This one will
1063 postpone the destruction until all devices are closed. 1072 postpone the destruction until all devices are closed.
@@ -1111,9 +1120,9 @@
1111 } 1120 }
1112 1121
1113 /* chip-specific constructor */ 1122 /* chip-specific constructor */
1114 static int snd_mychip_create(struct snd_card *card, 1123 static int __devinit snd_mychip_create(struct snd_card *card,
1115 struct pci_dev *pci, 1124 struct pci_dev *pci,
1116 struct mychip **rchip) 1125 struct mychip **rchip)
1117 { 1126 {
1118 struct mychip *chip; 1127 struct mychip *chip;
1119 int err; 1128 int err;
@@ -1191,7 +1200,7 @@
1191 .name = KBUILD_MODNAME, 1200 .name = KBUILD_MODNAME,
1192 .id_table = snd_mychip_ids, 1201 .id_table = snd_mychip_ids,
1193 .probe = snd_mychip_probe, 1202 .probe = snd_mychip_probe,
1194 .remove = snd_mychip_remove, 1203 .remove = __devexit_p(snd_mychip_remove),
1195 }; 1204 };
1196 1205
1197 /* module initialization */ 1206 /* module initialization */
@@ -1456,6 +1465,11 @@
1456 </para> 1465 </para>
1457 1466
1458 <para> 1467 <para>
1468 Again, remember that you cannot
1469 use the <parameter>__devexit</parameter> prefix for this destructor.
1470 </para>
1471
1472 <para>
1459 We didn't implement the hardware disabling part in the above. 1473 We didn't implement the hardware disabling part in the above.
1460 If you need to do this, please note that the destructor may be 1474 If you need to do this, please note that the destructor may be
1461 called even before the initialization of the chip is completed. 1475 called even before the initialization of the chip is completed.
@@ -1605,7 +1619,7 @@
1605 .name = KBUILD_MODNAME, 1619 .name = KBUILD_MODNAME,
1606 .id_table = snd_mychip_ids, 1620 .id_table = snd_mychip_ids,
1607 .probe = snd_mychip_probe, 1621 .probe = snd_mychip_probe,
1608 .remove = snd_mychip_remove, 1622 .remove = __devexit_p(snd_mychip_remove),
1609 }; 1623 };
1610]]> 1624]]>
1611 </programlisting> 1625 </programlisting>
@@ -1616,7 +1630,11 @@
1616 The <structfield>probe</structfield> and 1630 The <structfield>probe</structfield> and
1617 <structfield>remove</structfield> functions have already 1631 <structfield>remove</structfield> functions have already
1618 been defined in the previous sections. 1632 been defined in the previous sections.
1619 The <structfield>name</structfield> 1633 The <structfield>remove</structfield> function should
1634 be defined with the
1635 <function>__devexit_p()</function> macro, so that it's not
1636 defined for built-in (and non-hot-pluggable) case. The
1637 <structfield>name</structfield>
1620 field is the name string of this device. Note that you must not 1638 field is the name string of this device. Note that you must not
1621 use a slash <quote>/</quote> in this string. 1639 use a slash <quote>/</quote> in this string.
1622 </para> 1640 </para>
@@ -1647,7 +1665,9 @@
1647 <para> 1665 <para>
1648 Note that these module entries are tagged with 1666 Note that these module entries are tagged with
1649 <parameter>__init</parameter> and 1667 <parameter>__init</parameter> and
1650 <parameter>__exit</parameter> prefixes. 1668 <parameter>__exit</parameter> prefixes, not
1669 <parameter>__devinit</parameter> nor
1670 <parameter>__devexit</parameter>.
1651 </para> 1671 </para>
1652 1672
1653 <para> 1673 <para>
@@ -1898,7 +1918,7 @@
1898 */ 1918 */
1899 1919
1900 /* create a pcm device */ 1920 /* create a pcm device */
1901 static int snd_mychip_new_pcm(struct mychip *chip) 1921 static int __devinit snd_mychip_new_pcm(struct mychip *chip)
1902 { 1922 {
1903 struct snd_pcm *pcm; 1923 struct snd_pcm *pcm;
1904 int err; 1924 int err;
@@ -1937,7 +1957,7 @@
1937 <informalexample> 1957 <informalexample>
1938 <programlisting> 1958 <programlisting>
1939<![CDATA[ 1959<![CDATA[
1940 static int snd_mychip_new_pcm(struct mychip *chip) 1960 static int __devinit snd_mychip_new_pcm(struct mychip *chip)
1941 { 1961 {
1942 struct snd_pcm *pcm; 1962 struct snd_pcm *pcm;
1943 int err; 1963 int err;
@@ -2104,7 +2124,7 @@
2104 .... 2124 ....
2105 } 2125 }
2106 2126
2107 static int snd_mychip_new_pcm(struct mychip *chip) 2127 static int __devinit snd_mychip_new_pcm(struct mychip *chip)
2108 { 2128 {
2109 struct snd_pcm *pcm; 2129 struct snd_pcm *pcm;
2110 .... 2130 ....
@@ -3379,7 +3399,7 @@ struct _snd_pcm_runtime {
3379 <title>Definition of a Control</title> 3399 <title>Definition of a Control</title>
3380 <programlisting> 3400 <programlisting>
3381<![CDATA[ 3401<![CDATA[
3382 static struct snd_kcontrol_new my_control = { 3402 static struct snd_kcontrol_new my_control __devinitdata = {
3383 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3403 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3384 .name = "PCM Playback Switch", 3404 .name = "PCM Playback Switch",
3385 .index = 0, 3405 .index = 0,
@@ -3395,6 +3415,13 @@ struct _snd_pcm_runtime {
3395 </para> 3415 </para>
3396 3416
3397 <para> 3417 <para>
3418 Most likely the control is created via
3419 <function>snd_ctl_new1()</function>, and in such a case, you can
3420 add the <parameter>__devinitdata</parameter> prefix to the
3421 definition as above.
3422 </para>
3423
3424 <para>
3398 The <structfield>iface</structfield> field specifies the control 3425 The <structfield>iface</structfield> field specifies the control
3399 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which 3426 type, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which
3400 is usually <constant>MIXER</constant>. 3427 is usually <constant>MIXER</constant>.
@@ -3820,8 +3847,10 @@ struct _snd_pcm_runtime {
3820 3847
3821 <para> 3848 <para>
3822 <function>snd_ctl_new1()</function> allocates a new 3849 <function>snd_ctl_new1()</function> allocates a new
3823 <structname>snd_kcontrol</structname> instance, 3850 <structname>snd_kcontrol</structname> instance (that's why the definition
3824 and <function>snd_ctl_add</function> assigns the given 3851 of <parameter>my_control</parameter> can be with
3852 the <parameter>__devinitdata</parameter>
3853 prefix), and <function>snd_ctl_add</function> assigns the given
3825 control component to the card. 3854 control component to the card.
3826 </para> 3855 </para>
3827 </section> 3856 </section>
@@ -3867,7 +3896,7 @@ struct _snd_pcm_runtime {
3867<![CDATA[ 3896<![CDATA[
3868 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0); 3897 static DECLARE_TLV_DB_SCALE(db_scale_my_control, -4050, 150, 0);
3869 3898
3870 static struct snd_kcontrol_new my_control = { 3899 static struct snd_kcontrol_new my_control __devinitdata = {
3871 ... 3900 ...
3872 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 3901 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
3873 SNDRV_CTL_ELEM_ACCESS_TLV_READ, 3902 SNDRV_CTL_ELEM_ACCESS_TLV_READ,
@@ -4259,7 +4288,7 @@ struct _snd_pcm_runtime {
4259<![CDATA[ 4288<![CDATA[
4260 struct snd_rawmidi *rmidi; 4289 struct snd_rawmidi *rmidi;
4261 snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags, 4290 snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags,
4262 irq, &rmidi); 4291 irq, irq_flags, &rmidi);
4263]]> 4292]]>
4264 </programlisting> 4293 </programlisting>
4265 </informalexample> 4294 </informalexample>
@@ -4314,13 +4343,6 @@ struct _snd_pcm_runtime {
4314 by itself to start processing the output stream in the irq handler. 4343 by itself to start processing the output stream in the irq handler.
4315 </para> 4344 </para>
4316 4345
4317 <para>
4318 If the MPU-401 interface shares its interrupt with the other logical
4319 devices on the card, set <constant>MPU401_INFO_IRQ_HOOK</constant>
4320 (see <link linkend="midi-interface-interrupt-handler"><citetitle>
4321 below</citetitle></link>).
4322 </para>
4323
4324 <para> 4346 <para>
4325 Usually, the port address corresponds to the command port and 4347 Usually, the port address corresponds to the command port and
4326 port + 1 corresponds to the data port. If not, you may change 4348 port + 1 corresponds to the data port. If not, you may change
@@ -4353,12 +4375,14 @@ struct _snd_pcm_runtime {
4353 </para> 4375 </para>
4354 4376
4355 <para> 4377 <para>
4356 The 6th argument specifies the ISA irq number that will be 4378 The 6th argument specifies the irq number for UART. If the irq
4357 allocated. If no interrupt is to be allocated (because your 4379 is already allocated, pass 0 to the 7th argument
4358 code is already allocating a shared interrupt, or because the 4380 (<parameter>irq_flags</parameter>). Otherwise, pass the flags
4359 device does not use interrupts), pass -1 instead. 4381 for irq allocation
4360 For a MPU-401 device without an interrupt, a polling timer 4382 (<constant>SA_XXX</constant> bits) to it, and the irq will be
4361 will be used instead. 4383 reserved by the mpu401-uart layer. If the card doesn't generate
4384 UART interrupts, pass -1 as the irq number. Then a timer
4385 interrupt will be invoked for polling.
4362 </para> 4386 </para>
4363 </section> 4387 </section>
4364 4388
@@ -4366,13 +4390,12 @@ struct _snd_pcm_runtime {
4366 <title>Interrupt Handler</title> 4390 <title>Interrupt Handler</title>
4367 <para> 4391 <para>
4368 When the interrupt is allocated in 4392 When the interrupt is allocated in
4369 <function>snd_mpu401_uart_new()</function>, an exclusive ISA 4393 <function>snd_mpu401_uart_new()</function>, the private
4370 interrupt handler is automatically used, hence you don't have 4394 interrupt handler is used, hence you don't have anything else to do
4371 anything else to do than creating the mpu401 stuff. Otherwise, you 4395 than creating the mpu401 stuff. Otherwise, you have to call
4372 have to set <constant>MPU401_INFO_IRQ_HOOK</constant>, and call 4396 <function>snd_mpu401_uart_interrupt()</function> explicitly when
4373 <function>snd_mpu401_uart_interrupt()</function> explicitly from your 4397 a UART interrupt is invoked and checked in your own interrupt
4374 own interrupt handler when it has determined that a UART interrupt 4398 handler.
4375 has occurred.
4376 </para> 4399 </para>
4377 4400
4378 <para> 4401 <para>
@@ -5732,8 +5755,8 @@ struct _snd_pcm_runtime {
5732 <informalexample> 5755 <informalexample>
5733 <programlisting> 5756 <programlisting>
5734<![CDATA[ 5757<![CDATA[
5735 static int snd_mychip_probe(struct pci_dev *pci, 5758 static int __devinit snd_mychip_probe(struct pci_dev *pci,
5736 const struct pci_device_id *pci_id) 5759 const struct pci_device_id *pci_id)
5737 { 5760 {
5738 .... 5761 ....
5739 struct snd_card *card; 5762 struct snd_card *card;
@@ -5758,8 +5781,8 @@ struct _snd_pcm_runtime {
5758 <informalexample> 5781 <informalexample>
5759 <programlisting> 5782 <programlisting>
5760<![CDATA[ 5783<![CDATA[
5761 static int snd_mychip_probe(struct pci_dev *pci, 5784 static int __devinit snd_mychip_probe(struct pci_dev *pci,
5762 const struct pci_device_id *pci_id) 5785 const struct pci_device_id *pci_id)
5763 { 5786 {
5764 .... 5787 ....
5765 struct snd_card *card; 5788 struct snd_card *card;
@@ -5796,7 +5819,7 @@ struct _snd_pcm_runtime {
5796 .name = KBUILD_MODNAME, 5819 .name = KBUILD_MODNAME,
5797 .id_table = snd_my_ids, 5820 .id_table = snd_my_ids,
5798 .probe = snd_my_probe, 5821 .probe = snd_my_probe,
5799 .remove = snd_my_remove, 5822 .remove = __devexit_p(snd_my_remove),
5800 #ifdef CONFIG_PM 5823 #ifdef CONFIG_PM
5801 .suspend = snd_my_suspend, 5824 .suspend = snd_my_suspend,
5802 .resume = snd_my_resume, 5825 .resume = snd_my_resume,