Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2b82c26 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/doc: diagram for mode objects and properties



Resulted in confusion a few times in the past.

v2: Spelling fix (Eric).

Cc: Eric Anholt <eric@anholt.net>
Acked-by: default avatarEric Anholt <eric@anholt.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170302151638.1882-5-daniel.vetter@ffwll.ch
parent 1ea35768
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -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: