drm/doc: diagram for mode objects and properties
authorDaniel Vetter <[email protected]>
Thu, 2 Mar 2017 15:16:37 +0000 (16:16 +0100)
committerDaniel Vetter <[email protected]>
Tue, 14 Mar 2017 14:13:27 +0000 (15:13 +0100)
Resulted in confusion a few times in the past.

v2: Spelling fix (Eric).

Cc: Eric Anholt <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Manasi Navare <[email protected]>
Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Documentation/gpu/drm-kms.rst

index b11c537c73f422d69269586e8b0b6fec7ab88326..1c42448c7aae93a81a43438a1cb953efbbd8abbc 100644 (file)
@@ -161,6 +161,28 @@ KMS Core Structures and Functions
 Modeset Base Object Abstraction
 ===============================
 
+.. kernel-render:: DOT
+   :alt: Mode Objects and Properties
+   :caption: Mode Objects and Properties
+
+   digraph {
+      node [shape=box]
+
+      "drm_property A" -> "drm_mode_object A"
+      "drm_property A" -> "drm_mode_object B"
+      "drm_property B" -> "drm_mode_object A"
+   }
+
+The base structure for all KMS objects is :c:type:`struct drm_mode_object
+<drm_mode_object>`. One of the base services it provides is tracking properties,
+which are especially important for the atomic IOCTL (see `Atomic Mode
+Setting`_). The somewhat surprising part here is that properties are not
+directly instantiated on each object, but free-standing mode objects themselves,
+represented by :c:type:`struct drm_property <drm_property>`, which only specify
+the type and value range of a property. Any given property can be attached
+multiple times to different objects using :c:func:`drm_object_attach_property()
+<drm_object_attach_property>`.
+
 .. kernel-doc:: include/drm/drm_mode_object.h
    :internal: