xref: /linux/Documentation/gpu/drm-kms.rst (revision 31c558f47497e9bc04aee337ebdfdaea491344a6)
12fa91d15SJani Nikula=========================
22fa91d15SJani NikulaKernel Mode Setting (KMS)
32fa91d15SJani Nikula=========================
42fa91d15SJani Nikula
52fa91d15SJani NikulaDrivers must initialize the mode setting core by calling
6c3b790eaSDaniel Vetterdrmm_mode_config_init() on the DRM device. The function
72fa91d15SJani Nikulainitializes the :c:type:`struct drm_device <drm_device>`
82fa91d15SJani Nikulamode_config field and never fails. Once done, mode configuration must
92fa91d15SJani Nikulabe setup by initializing the following fields.
102fa91d15SJani Nikula
112fa91d15SJani Nikula-  int min_width, min_height; int max_width, max_height;
122fa91d15SJani Nikula   Minimum and maximum width and height of the frame buffers in pixel
132fa91d15SJani Nikula   units.
142fa91d15SJani Nikula
152fa91d15SJani Nikula-  struct drm_mode_config_funcs \*funcs;
162fa91d15SJani Nikula   Mode setting functions.
172fa91d15SJani Nikula
182564d0b0SDaniel VetterOverview
192564d0b0SDaniel Vetter========
202564d0b0SDaniel Vetter
212564d0b0SDaniel Vetter.. kernel-render:: DOT
222564d0b0SDaniel Vetter   :alt: KMS Display Pipeline
232564d0b0SDaniel Vetter   :caption: KMS Display Pipeline Overview
242564d0b0SDaniel Vetter
252564d0b0SDaniel Vetter   digraph "KMS" {
262564d0b0SDaniel Vetter      node [shape=box]
272564d0b0SDaniel Vetter
282564d0b0SDaniel Vetter      subgraph cluster_static {
292564d0b0SDaniel Vetter          style=dashed
302564d0b0SDaniel Vetter          label="Static Objects"
312564d0b0SDaniel Vetter
322564d0b0SDaniel Vetter          node [bgcolor=grey style=filled]
332564d0b0SDaniel Vetter          "drm_plane A" -> "drm_crtc"
342564d0b0SDaniel Vetter          "drm_plane B" -> "drm_crtc"
352564d0b0SDaniel Vetter          "drm_crtc" -> "drm_encoder A"
362564d0b0SDaniel Vetter          "drm_crtc" -> "drm_encoder B"
372564d0b0SDaniel Vetter      }
382564d0b0SDaniel Vetter
392564d0b0SDaniel Vetter      subgraph cluster_user_created {
402564d0b0SDaniel Vetter          style=dashed
412564d0b0SDaniel Vetter          label="Userspace-Created"
422564d0b0SDaniel Vetter
432564d0b0SDaniel Vetter          node [shape=oval]
442564d0b0SDaniel Vetter          "drm_framebuffer 1" -> "drm_plane A"
452564d0b0SDaniel Vetter          "drm_framebuffer 2" -> "drm_plane B"
462564d0b0SDaniel Vetter      }
472564d0b0SDaniel Vetter
482564d0b0SDaniel Vetter      subgraph cluster_connector {
492564d0b0SDaniel Vetter          style=dashed
502564d0b0SDaniel Vetter          label="Hotpluggable"
512564d0b0SDaniel Vetter
522564d0b0SDaniel Vetter          "drm_encoder A" -> "drm_connector A"
532564d0b0SDaniel Vetter          "drm_encoder B" -> "drm_connector B"
542564d0b0SDaniel Vetter      }
552564d0b0SDaniel Vetter   }
562564d0b0SDaniel Vetter
572564d0b0SDaniel VetterThe basic object structure KMS presents to userspace is fairly simple.
582564d0b0SDaniel VetterFramebuffers (represented by :c:type:`struct drm_framebuffer <drm_framebuffer>`,
59268bc24eSDaniel Vettersee `Frame Buffer Abstraction`_) feed into planes. Planes are represented by
60268bc24eSDaniel Vetter:c:type:`struct drm_plane <drm_plane>`, see `Plane Abstraction`_ for more
61268bc24eSDaniel Vetterdetails. One or more (or even no) planes feed their pixel data into a CRTC
62268bc24eSDaniel Vetter(represented by :c:type:`struct drm_crtc <drm_crtc>`, see `CRTC Abstraction`_)
63268bc24eSDaniel Vetterfor blending. The precise blending step is explained in more detail in `Plane
64268bc24eSDaniel VetterComposition Properties`_ and related chapters.
652564d0b0SDaniel Vetter
662564d0b0SDaniel VetterFor the output routing the first step is encoders (represented by
672564d0b0SDaniel Vetter:c:type:`struct drm_encoder <drm_encoder>`, see `Encoder Abstraction`_). Those
682564d0b0SDaniel Vetterare really just internal artifacts of the helper libraries used to implement KMS
692564d0b0SDaniel Vetterdrivers. Besides that they make it unecessarily more complicated for userspace
702564d0b0SDaniel Vetterto figure out which connections between a CRTC and a connector are possible, and
712564d0b0SDaniel Vetterwhat kind of cloning is supported, they serve no purpose in the userspace API.
722564d0b0SDaniel VetterUnfortunately encoders have been exposed to userspace, hence can't remove them
732564d0b0SDaniel Vetterat this point.  Futhermore the exposed restrictions are often wrongly set by
742564d0b0SDaniel Vetterdrivers, and in many cases not powerful enough to express the real restrictions.
752564d0b0SDaniel VetterA CRTC can be connected to multiple encoders, and for an active CRTC there must
762564d0b0SDaniel Vetterbe at least one encoder.
772564d0b0SDaniel Vetter
782564d0b0SDaniel VetterThe final, and real, endpoint in the display chain is the connector (represented
792564d0b0SDaniel Vetterby :c:type:`struct drm_connector <drm_connector>`, see `Connector
802564d0b0SDaniel VetterAbstraction`_). Connectors can have different possible encoders, but the kernel
812564d0b0SDaniel Vetterdriver selects which encoder to use for each connector. The use case is DVI,
822564d0b0SDaniel Vetterwhich could switch between an analog and a digital encoder. Encoders can also
832564d0b0SDaniel Vetterdrive multiple different connectors. There is exactly one active connector for
842564d0b0SDaniel Vetterevery active encoder.
852564d0b0SDaniel Vetter
862564d0b0SDaniel VetterInternally the output pipeline is a bit more complex and matches today's
872564d0b0SDaniel Vetterhardware more closely:
882564d0b0SDaniel Vetter
892564d0b0SDaniel Vetter.. kernel-render:: DOT
902564d0b0SDaniel Vetter   :alt: KMS Output Pipeline
912564d0b0SDaniel Vetter   :caption: KMS Output Pipeline
922564d0b0SDaniel Vetter
932564d0b0SDaniel Vetter   digraph "Output Pipeline" {
942564d0b0SDaniel Vetter      node [shape=box]
952564d0b0SDaniel Vetter
962564d0b0SDaniel Vetter      subgraph {
972564d0b0SDaniel Vetter          "drm_crtc" [bgcolor=grey style=filled]
982564d0b0SDaniel Vetter      }
992564d0b0SDaniel Vetter
1002564d0b0SDaniel Vetter      subgraph cluster_internal {
1012564d0b0SDaniel Vetter          style=dashed
1022564d0b0SDaniel Vetter          label="Internal Pipeline"
1032564d0b0SDaniel Vetter          {
1042564d0b0SDaniel Vetter              node [bgcolor=grey style=filled]
1052564d0b0SDaniel Vetter              "drm_encoder A";
1062564d0b0SDaniel Vetter              "drm_encoder B";
1072564d0b0SDaniel Vetter              "drm_encoder C";
1082564d0b0SDaniel Vetter          }
1092564d0b0SDaniel Vetter
1102564d0b0SDaniel Vetter          {
1112564d0b0SDaniel Vetter              node [bgcolor=grey style=filled]
1122564d0b0SDaniel Vetter              "drm_encoder B" -> "drm_bridge B"
1132564d0b0SDaniel Vetter              "drm_encoder C" -> "drm_bridge C1"
1142564d0b0SDaniel Vetter              "drm_bridge C1" -> "drm_bridge C2";
1152564d0b0SDaniel Vetter          }
1162564d0b0SDaniel Vetter      }
1172564d0b0SDaniel Vetter
1182564d0b0SDaniel Vetter      "drm_crtc" -> "drm_encoder A"
1192564d0b0SDaniel Vetter      "drm_crtc" -> "drm_encoder B"
1202564d0b0SDaniel Vetter      "drm_crtc" -> "drm_encoder C"
1212564d0b0SDaniel Vetter
1222564d0b0SDaniel Vetter
1232564d0b0SDaniel Vetter      subgraph cluster_output {
1242564d0b0SDaniel Vetter          style=dashed
1252564d0b0SDaniel Vetter          label="Outputs"
1262564d0b0SDaniel Vetter
1272564d0b0SDaniel Vetter          "drm_encoder A" -> "drm_connector A";
1282564d0b0SDaniel Vetter          "drm_bridge B" -> "drm_connector B";
1292564d0b0SDaniel Vetter          "drm_bridge C2" -> "drm_connector C";
1302564d0b0SDaniel Vetter
1312564d0b0SDaniel Vetter          "drm_panel"
1322564d0b0SDaniel Vetter      }
1332564d0b0SDaniel Vetter   }
1342564d0b0SDaniel Vetter
1352564d0b0SDaniel VetterInternally two additional helper objects come into play. First, to be able to
1362564d0b0SDaniel Vettershare code for encoders (sometimes on the same SoC, sometimes off-chip) one or
1372564d0b0SDaniel Vettermore :ref:`drm_bridges` (represented by :c:type:`struct drm_bridge
1382564d0b0SDaniel Vetter<drm_bridge>`) can be linked to an encoder. This link is static and cannot be
1392564d0b0SDaniel Vetterchanged, which means the cross-bar (if there is any) needs to be mapped between
1402564d0b0SDaniel Vetterthe CRTC and any encoders. Often for drivers with bridges there's no code left
1412564d0b0SDaniel Vetterat the encoder level. Atomic drivers can leave out all the encoder callbacks to
1422564d0b0SDaniel Vetteressentially only leave a dummy routing object behind, which is needed for
1432564d0b0SDaniel Vetterbackwards compatibility since encoders are exposed to userspace.
1442564d0b0SDaniel Vetter
1452564d0b0SDaniel VetterThe second object is for panels, represented by :c:type:`struct drm_panel
1462564d0b0SDaniel Vetter<drm_panel>`, see :ref:`drm_panel_helper`. Panels do not have a fixed binding
1472564d0b0SDaniel Vetterpoint, but are generally linked to the driver private structure that embeds
1482564d0b0SDaniel Vetter:c:type:`struct drm_connector <drm_connector>`.
1492564d0b0SDaniel Vetter
1502564d0b0SDaniel VetterNote that currently the bridge chaining and interactions with connectors and
1512564d0b0SDaniel Vetterpanels are still in-flux and not really fully sorted out yet.
15228575f16SDaniel Vetter
15328575f16SDaniel VetterKMS Core Structures and Functions
15428575f16SDaniel Vetter=================================
15528575f16SDaniel Vetter
15628575f16SDaniel Vetter.. kernel-doc:: include/drm/drm_mode_config.h
15728575f16SDaniel Vetter   :internal:
15828575f16SDaniel Vetter
1591ea35768SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_mode_config.c
1601ea35768SDaniel Vetter   :export:
1611ea35768SDaniel Vetter
162949619f3SDaniel VetterModeset Base Object Abstraction
163949619f3SDaniel Vetter===============================
164949619f3SDaniel Vetter
165b2b82c26SDaniel Vetter.. kernel-render:: DOT
166b2b82c26SDaniel Vetter   :alt: Mode Objects and Properties
167b2b82c26SDaniel Vetter   :caption: Mode Objects and Properties
168b2b82c26SDaniel Vetter
169b2b82c26SDaniel Vetter   digraph {
170b2b82c26SDaniel Vetter      node [shape=box]
171b2b82c26SDaniel Vetter
172b2b82c26SDaniel Vetter      "drm_property A" -> "drm_mode_object A"
173b2b82c26SDaniel Vetter      "drm_property A" -> "drm_mode_object B"
174b2b82c26SDaniel Vetter      "drm_property B" -> "drm_mode_object A"
175b2b82c26SDaniel Vetter   }
176b2b82c26SDaniel Vetter
177b2b82c26SDaniel VetterThe base structure for all KMS objects is :c:type:`struct drm_mode_object
178b2b82c26SDaniel Vetter<drm_mode_object>`. One of the base services it provides is tracking properties,
179b2b82c26SDaniel Vetterwhich are especially important for the atomic IOCTL (see `Atomic Mode
180b2b82c26SDaniel VetterSetting`_). The somewhat surprising part here is that properties are not
181b2b82c26SDaniel Vetterdirectly instantiated on each object, but free-standing mode objects themselves,
182b2b82c26SDaniel Vetterrepresented by :c:type:`struct drm_property <drm_property>`, which only specify
183b2b82c26SDaniel Vetterthe type and value range of a property. Any given property can be attached
1846acc942cSDaniel Vettermultiple times to different objects using drm_object_attach_property().
185b2b82c26SDaniel Vetter
186949619f3SDaniel Vetter.. kernel-doc:: include/drm/drm_mode_object.h
187949619f3SDaniel Vetter   :internal:
188949619f3SDaniel Vetter
189949619f3SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_mode_object.c
190949619f3SDaniel Vetter   :export:
191949619f3SDaniel Vetter
1924a8e2292SDaniel VetterAtomic Mode Setting
1934a8e2292SDaniel Vetter===================
1944a8e2292SDaniel Vetter
1954a8e2292SDaniel Vetter
1964a8e2292SDaniel Vetter.. kernel-render:: DOT
1974a8e2292SDaniel Vetter   :alt: Mode Objects and Properties
1984a8e2292SDaniel Vetter   :caption: Mode Objects and Properties
1994a8e2292SDaniel Vetter
2004a8e2292SDaniel Vetter   digraph {
2014a8e2292SDaniel Vetter      node [shape=box]
2024a8e2292SDaniel Vetter
2034a8e2292SDaniel Vetter      subgraph cluster_state {
2044a8e2292SDaniel Vetter          style=dashed
2054a8e2292SDaniel Vetter          label="Free-standing state"
2064a8e2292SDaniel Vetter
2074a8e2292SDaniel Vetter          "drm_atomic_state" -> "duplicated drm_plane_state A"
2084a8e2292SDaniel Vetter          "drm_atomic_state" -> "duplicated drm_plane_state B"
2094a8e2292SDaniel Vetter          "drm_atomic_state" -> "duplicated drm_crtc_state"
2104a8e2292SDaniel Vetter          "drm_atomic_state" -> "duplicated drm_connector_state"
2114a8e2292SDaniel Vetter          "drm_atomic_state" -> "duplicated driver private state"
2124a8e2292SDaniel Vetter      }
2134a8e2292SDaniel Vetter
2144a8e2292SDaniel Vetter      subgraph cluster_current {
2154a8e2292SDaniel Vetter          style=dashed
2164a8e2292SDaniel Vetter          label="Current state"
2174a8e2292SDaniel Vetter
2184a8e2292SDaniel Vetter          "drm_device" -> "drm_plane A"
2194a8e2292SDaniel Vetter          "drm_device" -> "drm_plane B"
2204a8e2292SDaniel Vetter          "drm_device" -> "drm_crtc"
2214a8e2292SDaniel Vetter          "drm_device" -> "drm_connector"
2224a8e2292SDaniel Vetter          "drm_device" -> "driver private object"
2234a8e2292SDaniel Vetter
2244a8e2292SDaniel Vetter          "drm_plane A" -> "drm_plane_state A"
2254a8e2292SDaniel Vetter          "drm_plane B" -> "drm_plane_state B"
2264a8e2292SDaniel Vetter          "drm_crtc" -> "drm_crtc_state"
2274a8e2292SDaniel Vetter          "drm_connector" -> "drm_connector_state"
2284a8e2292SDaniel Vetter          "driver private object" -> "driver private state"
2294a8e2292SDaniel Vetter      }
2304a8e2292SDaniel Vetter
2314a8e2292SDaniel Vetter      "drm_atomic_state" -> "drm_device" [label="atomic_commit"]
2324a8e2292SDaniel Vetter      "duplicated drm_plane_state A" -> "drm_device"[style=invis]
2334a8e2292SDaniel Vetter   }
2344a8e2292SDaniel Vetter
2354a8e2292SDaniel VetterAtomic provides transactional modeset (including planes) updates, but a
2364a8e2292SDaniel Vetterbit differently from the usual transactional approach of try-commit and
2374a8e2292SDaniel Vetterrollback:
2384a8e2292SDaniel Vetter
2394a8e2292SDaniel Vetter- Firstly, no hardware changes are allowed when the commit would fail. This
2404a8e2292SDaniel Vetter  allows us to implement the DRM_MODE_ATOMIC_TEST_ONLY mode, which allows
2414a8e2292SDaniel Vetter  userspace to explore whether certain configurations would work or not.
2424a8e2292SDaniel Vetter
2434a8e2292SDaniel Vetter- This would still allow setting and rollback of just the software state,
2444a8e2292SDaniel Vetter  simplifying conversion of existing drivers. But auditing drivers for
2454a8e2292SDaniel Vetter  correctness of the atomic_check code becomes really hard with that: Rolling
2464a8e2292SDaniel Vetter  back changes in data structures all over the place is hard to get right.
2474a8e2292SDaniel Vetter
2484a8e2292SDaniel Vetter- Lastly, for backwards compatibility and to support all use-cases, atomic
2494a8e2292SDaniel Vetter  updates need to be incremental and be able to execute in parallel. Hardware
2504a8e2292SDaniel Vetter  doesn't always allow it, but where possible plane updates on different CRTCs
2514a8e2292SDaniel Vetter  should not interfere, and not get stalled due to output routing changing on
2524a8e2292SDaniel Vetter  different CRTCs.
2534a8e2292SDaniel Vetter
2544a8e2292SDaniel VetterTaken all together there's two consequences for the atomic design:
2554a8e2292SDaniel Vetter
2564a8e2292SDaniel Vetter- The overall state is split up into per-object state structures:
2574a8e2292SDaniel Vetter  :c:type:`struct drm_plane_state <drm_plane_state>` for planes, :c:type:`struct
2584a8e2292SDaniel Vetter  drm_crtc_state <drm_crtc_state>` for CRTCs and :c:type:`struct
2594a8e2292SDaniel Vetter  drm_connector_state <drm_connector_state>` for connectors. These are the only
2604a8e2292SDaniel Vetter  objects with userspace-visible and settable state. For internal state drivers
2614a8e2292SDaniel Vetter  can subclass these structures through embeddeding, or add entirely new state
2620380c684SDaniel Vetter  structures for their globally shared hardware functions, see :c:type:`struct
2630380c684SDaniel Vetter  drm_private_state<drm_private_state>`.
2644a8e2292SDaniel Vetter
2654a8e2292SDaniel Vetter- An atomic update is assembled and validated as an entirely free-standing pile
2664a8e2292SDaniel Vetter  of structures within the :c:type:`drm_atomic_state <drm_atomic_state>`
2675fca5eceSDaniel Vetter  container. Driver private state structures are also tracked in the same
2685fca5eceSDaniel Vetter  structure; see the next chapter.  Only when a state is committed is it applied
2695fca5eceSDaniel Vetter  to the driver and modeset objects. This way rolling back an update boils down
2705fca5eceSDaniel Vetter  to releasing memory and unreferencing objects like framebuffers.
2714a8e2292SDaniel Vetter
2720380c684SDaniel VetterLocking of atomic state structures is internally using :c:type:`struct
2730380c684SDaniel Vetterdrm_modeset_lock <drm_modeset_lock>`. As a general rule the locking shouldn't be
2740380c684SDaniel Vetterexposed to drivers, instead the right locks should be automatically acquired by
2750380c684SDaniel Vetterany function that duplicates or peeks into a state, like e.g.
2766acc942cSDaniel Vetterdrm_atomic_get_crtc_state().  Locking only protects the software data
2770380c684SDaniel Vetterstructure, ordering of committing state changes to hardware is sequenced using
2780380c684SDaniel Vetter:c:type:`struct drm_crtc_commit <drm_crtc_commit>`.
2790380c684SDaniel Vetter
2804a8e2292SDaniel VetterRead on in this chapter, and also in :ref:`drm_atomic_helper` for more detailed
2814a8e2292SDaniel Vettercoverage of specific topics.
2824a8e2292SDaniel Vetter
283da6c0596SDaniel VetterHandling Driver Private State
284da6c0596SDaniel Vetter-----------------------------
285da6c0596SDaniel Vetter
286da6c0596SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_atomic.c
287da6c0596SDaniel Vetter   :doc: handling driver private state
288da6c0596SDaniel Vetter
2892fa91d15SJani NikulaAtomic Mode Setting Function Reference
2904a8e2292SDaniel Vetter--------------------------------------
2912fa91d15SJani Nikula
2925d070be6SDaniel Vetter.. kernel-doc:: include/drm/drm_atomic.h
2932fa91d15SJani Nikula   :internal:
2942fa91d15SJani Nikula
2951ea35768SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_atomic.c
2961ea35768SDaniel Vetter   :export:
2971ea35768SDaniel Vetter
29872fdb40cSDaniel VetterAtomic Mode Setting IOCTL and UAPI Functions
29972fdb40cSDaniel Vetter--------------------------------------------
30072fdb40cSDaniel Vetter
30172fdb40cSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c
30272fdb40cSDaniel Vetter   :doc: overview
30372fdb40cSDaniel Vetter
30472fdb40cSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c
30572fdb40cSDaniel Vetter   :export:
30672fdb40cSDaniel Vetter
30728575f16SDaniel VetterCRTC Abstraction
30828575f16SDaniel Vetter================
30928575f16SDaniel Vetter
31028575f16SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
311d5d487ebSDaniel Vetter   :doc: overview
312d5d487ebSDaniel Vetter
313d5d487ebSDaniel VetterCRTC Functions Reference
314d5d487ebSDaniel Vetter--------------------------------
31528575f16SDaniel Vetter
31628575f16SDaniel Vetter.. kernel-doc:: include/drm/drm_crtc.h
31728575f16SDaniel Vetter   :internal:
31828575f16SDaniel Vetter
319d5d487ebSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
320d5d487ebSDaniel Vetter   :export:
321d5d487ebSDaniel Vetter
3222fa91d15SJani NikulaFrame Buffer Abstraction
323311b62d9SDaniel Vetter========================
3242fa91d15SJani Nikula
325750fb8c4SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_framebuffer.c
326750fb8c4SDaniel Vetter   :doc: overview
3272fa91d15SJani Nikula
3287520a277SDaniel VetterFrame Buffer Functions Reference
3297520a277SDaniel Vetter--------------------------------
3307520a277SDaniel Vetter
3317520a277SDaniel Vetter.. kernel-doc:: include/drm/drm_framebuffer.h
3327520a277SDaniel Vetter   :internal:
3337520a277SDaniel Vetter
3341ea35768SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_framebuffer.c
3351ea35768SDaniel Vetter   :export:
3361ea35768SDaniel Vetter
3372fa91d15SJani NikulaDRM Format Handling
338311b62d9SDaniel Vetter===================
3392fa91d15SJani Nikula
3407e7b68efSBrian Starkey.. kernel-doc:: include/uapi/drm/drm_fourcc.h
3417e7b68efSBrian Starkey   :doc: overview
3427e7b68efSBrian Starkey
3437e7b68efSBrian StarkeyFormat Functions Reference
3447e7b68efSBrian Starkey--------------------------
3457e7b68efSBrian Starkey
34684770cc2SLaurent Pinchart.. kernel-doc:: include/drm/drm_fourcc.h
34784770cc2SLaurent Pinchart   :internal:
34884770cc2SLaurent Pinchart
3492fa91d15SJani Nikula.. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
3502fa91d15SJani Nikula   :export:
3512fa91d15SJani Nikula
3522fa91d15SJani NikulaDumb Buffer Objects
353311b62d9SDaniel Vetter===================
3542fa91d15SJani Nikula
3554f93624eSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_dumb_buffers.c
3564f93624eSDaniel Vetter   :doc: overview
3572fa91d15SJani Nikula
35843968d7bSDaniel VetterPlane Abstraction
35943968d7bSDaniel Vetter=================
36043968d7bSDaniel Vetter
361532b3671SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_plane.c
362532b3671SDaniel Vetter   :doc: overview
363532b3671SDaniel Vetter
36443968d7bSDaniel VetterPlane Functions Reference
36543968d7bSDaniel Vetter-------------------------
36643968d7bSDaniel Vetter
36743968d7bSDaniel Vetter.. kernel-doc:: include/drm/drm_plane.h
36843968d7bSDaniel Vetter   :internal:
36943968d7bSDaniel Vetter
37043968d7bSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_plane.c
37143968d7bSDaniel Vetter   :export:
37243968d7bSDaniel Vetter
3739d8f78f6SSimon SerPlane Composition Functions Reference
3749d8f78f6SSimon Ser-------------------------------------
3759d8f78f6SSimon Ser
3769d8f78f6SSimon Ser.. kernel-doc:: drivers/gpu/drm/drm_blend.c
3779d8f78f6SSimon Ser   :export:
3789d8f78f6SSimon Ser
379*31c558f4SSimon SerPlane Damage Tracking Functions Reference
380*31c558f4SSimon Ser-----------------------------------------
381*31c558f4SSimon Ser
382*31c558f4SSimon Ser.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c
383*31c558f4SSimon Ser   :export:
384*31c558f4SSimon Ser
385*31c558f4SSimon Ser.. kernel-doc:: include/drm/drm_damage_helper.h
386*31c558f4SSimon Ser   :internal:
387*31c558f4SSimon Ser
388311b62d9SDaniel VetterDisplay Modes Function Reference
389311b62d9SDaniel Vetter================================
3902fa91d15SJani Nikula
391311b62d9SDaniel Vetter.. kernel-doc:: include/drm/drm_modes.h
392311b62d9SDaniel Vetter   :internal:
393311b62d9SDaniel Vetter
394311b62d9SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_modes.c
395311b62d9SDaniel Vetter   :export:
3962fa91d15SJani Nikula
397ae2a6da8SDaniel VetterConnector Abstraction
398ae2a6da8SDaniel Vetter=====================
399ae2a6da8SDaniel Vetter
400ae2a6da8SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_connector.c
401ae2a6da8SDaniel Vetter   :doc: overview
402ae2a6da8SDaniel Vetter
403ae2a6da8SDaniel VetterConnector Functions Reference
404ae2a6da8SDaniel Vetter-----------------------------
40552217195SDaniel Vetter
40652217195SDaniel Vetter.. kernel-doc:: include/drm/drm_connector.h
40752217195SDaniel Vetter   :internal:
40852217195SDaniel Vetter
40952217195SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_connector.c
41052217195SDaniel Vetter   :export:
41152217195SDaniel Vetter
412935774cdSBrian StarkeyWriteback Connectors
413935774cdSBrian Starkey--------------------
414935774cdSBrian Starkey
415e2d7fc20SSam Ravnborg.. kernel-doc:: include/drm/drm_writeback.h
416e2d7fc20SSam Ravnborg  :internal:
417e2d7fc20SSam Ravnborg
418935774cdSBrian Starkey.. kernel-doc:: drivers/gpu/drm/drm_writeback.c
419935774cdSBrian Starkey  :doc: overview
420935774cdSBrian Starkey
421935774cdSBrian Starkey.. kernel-doc:: drivers/gpu/drm/drm_writeback.c
422935774cdSBrian Starkey  :export:
423935774cdSBrian Starkey
424321a95aeSDaniel VetterEncoder Abstraction
425321a95aeSDaniel Vetter===================
426321a95aeSDaniel Vetter
427e03e6de0SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_encoder.c
428e03e6de0SDaniel Vetter   :doc: overview
429e03e6de0SDaniel Vetter
430e03e6de0SDaniel VetterEncoder Functions Reference
431e03e6de0SDaniel Vetter---------------------------
432e03e6de0SDaniel Vetter
433321a95aeSDaniel Vetter.. kernel-doc:: include/drm/drm_encoder.h
434321a95aeSDaniel Vetter   :internal:
435321a95aeSDaniel Vetter
436321a95aeSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_encoder.c
437321a95aeSDaniel Vetter   :export:
438321a95aeSDaniel Vetter
4392fa91d15SJani NikulaKMS Locking
440311b62d9SDaniel Vetter===========
4412fa91d15SJani Nikula
4422fa91d15SJani Nikula.. kernel-doc:: drivers/gpu/drm/drm_modeset_lock.c
4432fa91d15SJani Nikula   :doc: kms locking
4442fa91d15SJani Nikula
4452fa91d15SJani Nikula.. kernel-doc:: include/drm/drm_modeset_lock.h
4462fa91d15SJani Nikula   :internal:
4472fa91d15SJani Nikula
4482fa91d15SJani Nikula.. kernel-doc:: drivers/gpu/drm/drm_modeset_lock.c
4492fa91d15SJani Nikula   :export:
4502fa91d15SJani Nikula
4512fa91d15SJani NikulaKMS Properties
4522fa91d15SJani Nikula==============
4532fa91d15SJani Nikula
45459e71ee7SDaniel VetterProperty Types and Blob Property Support
45559e71ee7SDaniel Vetter----------------------------------------
45659e71ee7SDaniel Vetter
457c8458c7eSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_property.c
458c8458c7eSDaniel Vetter   :doc: overview
459c8458c7eSDaniel Vetter
46059e71ee7SDaniel Vetter.. kernel-doc:: include/drm/drm_property.h
46159e71ee7SDaniel Vetter   :internal:
46259e71ee7SDaniel Vetter
46359e71ee7SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_property.c
46459e71ee7SDaniel Vetter   :export:
46559e71ee7SDaniel Vetter
4664ada6f22SDaniel VetterStandard Connector Properties
4674ada6f22SDaniel Vetter-----------------------------
4684ada6f22SDaniel Vetter
4694ada6f22SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_connector.c
4704ada6f22SDaniel Vetter   :doc: standard connector properties
4714ada6f22SDaniel Vetter
47250525c33SStanislav LisovskiyHDMI Specific Connector Properties
473ba609631SDaniel Vetter----------------------------------
47450525c33SStanislav Lisovskiy
47550525c33SStanislav Lisovskiy.. kernel-doc:: drivers/gpu/drm/drm_connector.c
47650525c33SStanislav Lisovskiy   :doc: HDMI connector properties
47750525c33SStanislav Lisovskiy
478e954f77fSSimon SerStandard CRTC Properties
479e954f77fSSimon Ser------------------------
480e954f77fSSimon Ser
481e954f77fSSimon Ser.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
482e954f77fSSimon Ser   :doc: standard CRTC properties
483e954f77fSSimon Ser
4841e4d84c6SDaniel VetterPlane Composition Properties
4851e4d84c6SDaniel Vetter----------------------------
4861e4d84c6SDaniel Vetter
4871e4d84c6SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_blend.c
4881e4d84c6SDaniel Vetter   :doc: overview
48952a9fcdaSDaniel Vetter
490e07f001cSSimon SerDamage Tracking Properties
491e07f001cSSimon Ser--------------------------
492d3b21767SLukasz Spintzyk
493d3b21767SLukasz Spintzyk.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c
494d3b21767SLukasz Spintzyk   :doc: overview
495d3b21767SLukasz Spintzyk
496a6acccf8SDaniel VetterColor Management Properties
497a6acccf8SDaniel Vetter---------------------------
498a6acccf8SDaniel Vetter
499a6acccf8SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
500a6acccf8SDaniel Vetter   :doc: overview
501a6acccf8SDaniel Vetter
502a6acccf8SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
503a6acccf8SDaniel Vetter   :export:
504a6acccf8SDaniel Vetter
50565b2f7c4SVille Syrjälä.. kernel-doc:: include/drm/drm_color_mgmt.h
50665b2f7c4SVille Syrjälä   :internal:
50765b2f7c4SVille Syrjälä
5089498c19bSDaniel VetterTile Group Property
5099498c19bSDaniel Vetter-------------------
5109498c19bSDaniel Vetter
5119498c19bSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_connector.c
5129498c19bSDaniel Vetter   :doc: Tile group
5139498c19bSDaniel Vetter
5149a83a71aSGustavo PadovanExplicit Fencing Properties
5159a83a71aSGustavo Padovan---------------------------
5169a83a71aSGustavo Padovan
51772fdb40cSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c
5189a83a71aSGustavo Padovan   :doc: explicit fencing properties
5199a83a71aSGustavo Padovan
520ab7a664fSNicholas Kazlauskas
521ab7a664fSNicholas KazlauskasVariable Refresh Properties
522ab7a664fSNicholas Kazlauskas---------------------------
523ab7a664fSNicholas Kazlauskas
524ab7a664fSNicholas Kazlauskas.. kernel-doc:: drivers/gpu/drm/drm_connector.c
525ab7a664fSNicholas Kazlauskas   :doc: Variable refresh properties
526ab7a664fSNicholas Kazlauskas
5272fa91d15SJani NikulaExisting KMS Properties
5282fa91d15SJani Nikula-----------------------
5292fa91d15SJani Nikula
5303f0df756SDaniel VetterThe following table gives description of drm properties exposed by various
5313f0df756SDaniel Vettermodules/drivers. Because this table is very unwieldy, do not add any new
5323f0df756SDaniel Vetterproperties here. Instead document them in a section above.
5332fa91d15SJani Nikula
5342fa91d15SJani Nikula.. csv-table::
5352fa91d15SJani Nikula   :header-rows: 1
5362fa91d15SJani Nikula   :file: kms-properties.csv
5372fa91d15SJani Nikula
5382fa91d15SJani NikulaVertical Blanking
5392fa91d15SJani Nikula=================
5402fa91d15SJani Nikula
54157d30230SDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_vblank.c
54257d30230SDaniel Vetter   :doc: vblank handling
5432fa91d15SJani Nikula
5442fa91d15SJani NikulaVertical Blanking and Interrupt Handling Functions Reference
5452fa91d15SJani Nikula------------------------------------------------------------
5462fa91d15SJani Nikula
5473ed4351aSDaniel Vetter.. kernel-doc:: include/drm/drm_vblank.h
54834a67dd7SDaniel Vetter   :internal:
5491ea35768SDaniel Vetter
5503ed4351aSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/drm_vblank.c
5511ea35768SDaniel Vetter   :export:
5525e6c2b4fSLyude Paul
5535e6c2b4fSLyude PaulVertical Blank Work
5545e6c2b4fSLyude Paul===================
5555e6c2b4fSLyude Paul
5565e6c2b4fSLyude Paul.. kernel-doc:: drivers/gpu/drm/drm_vblank_work.c
5575e6c2b4fSLyude Paul   :doc: vblank works
5585e6c2b4fSLyude Paul
5595e6c2b4fSLyude PaulVertical Blank Work Functions Reference
5605e6c2b4fSLyude Paul---------------------------------------
5615e6c2b4fSLyude Paul
5625e6c2b4fSLyude Paul.. kernel-doc:: include/drm/drm_vblank_work.h
5635e6c2b4fSLyude Paul   :internal:
5645e6c2b4fSLyude Paul
5655e6c2b4fSLyude Paul.. kernel-doc:: drivers/gpu/drm/drm_vblank_work.c
5665e6c2b4fSLyude Paul   :export:
567