blob: 34f755bc913327c937e0ef2600573022b3e17ea6 [file] [log] [blame]
Jani Nikula2fa91d12016-06-21 14:49:02 +03001=============================
2Mode Setting Helper Functions
3=============================
4
Daniel Vetterbcb32b62016-08-12 22:48:38 +02005The DRM subsystem aims for a strong separation between core code and helper
6libraries. Core code takes care of general setup and teardown and decoding
7userspace requests to kernel internal objects. Everything else is handled by a
8large set of helper libraries, which can be combined freely to pick and choose
9for each driver what fits, and avoid shared code where special behaviour is
10needed.
Jani Nikula2fa91d12016-06-21 14:49:02 +030011
Daniel Vetterbcb32b62016-08-12 22:48:38 +020012This distinction between core code and helpers is especially strong in the
13modesetting code, where there's a shared userspace ABI for all drivers. This is
14in contrast to the render side, where pretty much everything (with very few
15exceptions) can be considered optional helper code.
Jani Nikula2fa91d12016-06-21 14:49:02 +030016
Daniel Vetterbcb32b62016-08-12 22:48:38 +020017There are a few areas these helpers can grouped into:
Jani Nikula2fa91d12016-06-21 14:49:02 +030018
Daniel Vetterbcb32b62016-08-12 22:48:38 +020019* Helpers to implement modesetting. The important ones here are the atomic
20 helpers. Old drivers still often use the legacy CRTC helpers. They both share
21 the same set of common helper vtables. For really simple drivers (anything
22 that would have been a great fit in the deprecated fbdev subsystem) there's
23 also the simple display pipe helpers.
24
25* There's a big pile of helpers for handling outputs. First the generic bridge
26 helpers for handling encoder and transcoder IP blocks. Second the panel helpers
27 for handling panel-related information and logic. Plus then a big set of
28 helpers for the various sink standards (DisplayPort, HDMI, MIPI DSI). Finally
29 there's also generic helpers for handling output probing, and for dealing with
30 EDIDs.
31
32* The last group of helpers concerns itself with the frontend side of a display
33 pipeline: Planes, handling rectangles for visibility checking and scissoring,
34 flip queues and assorted bits.
35
36Modeset Helper Reference for Common Vtables
37===========================================
38
39.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
40 :internal:
41
42.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
43 :doc: overview
Jani Nikula2fa91d12016-06-21 14:49:02 +030044
45Atomic Modeset Helper Functions Reference
46=========================================
47
48Overview
49--------
50
51.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
52 :doc: overview
53
54Implementing Asynchronous Atomic Commit
55---------------------------------------
56
57.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
58 :doc: implementing nonblocking commit
59
60Atomic State Reset and Initialization
61-------------------------------------
62
63.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
64 :doc: atomic state reset and initialization
65
66.. kernel-doc:: include/drm/drm_atomic_helper.h
67 :internal:
68
69.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
70 :export:
71
Jani Nikula2fa91d12016-06-21 14:49:02 +030072Legacy CRTC/Modeset Helper Functions Reference
73==============================================
74
75.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030076 :doc: overview
77
Daniel Vetterbcb32b62016-08-12 22:48:38 +020078.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030079 :export:
80
Daniel Vetterbcb32b62016-08-12 22:48:38 +020081Simple KMS Helper Reference
82===========================
83
84.. kernel-doc:: include/drm/drm_simple_kms_helper.h
85 :internal:
86
87.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
88 :export:
89
90.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
91 :doc: overview
92
Jani Nikula2fa91d12016-06-21 14:49:02 +030093fbdev Helper Functions Reference
94================================
95
96.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
97 :doc: fbdev helpers
98
99.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
100 :export:
101
102.. kernel-doc:: include/drm/drm_fb_helper.h
103 :internal:
104
105Framebuffer CMA Helper Functions Reference
106==========================================
107
108.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
109 :doc: framebuffer cma helper functions
110
111.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
112 :export:
113
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200114Bridges
115=======
116
117Overview
118--------
119
120.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
121 :doc: overview
122
123Default bridge callback sequence
124--------------------------------
125
126.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
127 :doc: bridge callbacks
128
129.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
130 :export:
131
132Panel Helper Reference
133======================
134
135.. kernel-doc:: include/drm/drm_panel.h
136 :internal:
137
138.. kernel-doc:: drivers/gpu/drm/drm_panel.c
139 :export:
140
141.. kernel-doc:: drivers/gpu/drm/drm_panel.c
142 :doc: drm panel
143
Jani Nikula2fa91d12016-06-21 14:49:02 +0300144Display Port Helper Functions Reference
145=======================================
146
147.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
148 :doc: dp helpers
149
150.. kernel-doc:: include/drm/drm_dp_helper.h
151 :internal:
152
153.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
154 :export:
155
156Display Port Dual Mode Adaptor Helper Functions Reference
157=========================================================
158
159.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
160 :doc: dp dual mode helpers
161
162.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
163 :internal:
164
165.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
166 :export:
167
168Display Port MST Helper Functions Reference
169===========================================
170
171.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
172 :doc: dp mst helper
173
174.. kernel-doc:: include/drm/drm_dp_mst_helper.h
175 :internal:
176
177.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
178 :export:
179
180MIPI DSI Helper Functions Reference
181===================================
182
183.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
184 :doc: dsi helpers
185
186.. kernel-doc:: include/drm/drm_mipi_dsi.h
187 :internal:
188
189.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
190 :export:
191
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200192Output Probing Helper Functions Reference
193=========================================
194
195.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
196 :doc: output probing helper overview
197
198.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
199 :export:
200
Jani Nikula2fa91d12016-06-21 14:49:02 +0300201EDID Helper Functions Reference
202===============================
203
204.. kernel-doc:: drivers/gpu/drm/drm_edid.c
205 :export:
206
207Rectangle Utilities Reference
208=============================
209
210.. kernel-doc:: include/drm/drm_rect.h
211 :doc: rect utils
212
213.. kernel-doc:: include/drm/drm_rect.h
214 :internal:
215
216.. kernel-doc:: drivers/gpu/drm/drm_rect.c
217 :export:
218
Jani Nikula2fa91d12016-06-21 14:49:02 +0300219HDMI Infoframes Helper Reference
220================================
221
222Strictly speaking this is not a DRM helper library but generally useable
223by any driver interfacing with HDMI outputs like v4l or alsa drivers.
224But it nicely fits into the overall topic of mode setting helper
225libraries and hence is also included here.
226
227.. kernel-doc:: include/linux/hdmi.h
228 :internal:
229
230.. kernel-doc:: drivers/video/hdmi.c
231 :export:
232
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200233Flip-work Helper Reference
234==========================
235
236.. kernel-doc:: include/drm/drm_flip_work.h
237 :doc: flip utils
238
239.. kernel-doc:: include/drm/drm_flip_work.h
240 :internal:
241
242.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
243 :export:
244
Jani Nikula2fa91d12016-06-21 14:49:02 +0300245Plane Helper Reference
246======================
247
248.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +0300249 :doc: overview
250
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200251.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
252 :export:
253
Jani Nikula2fa91d12016-06-21 14:49:02 +0300254Tile group
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200255==========
256
257# FIXME: This should probably be moved into a property documentation section
Jani Nikula2fa91d12016-06-21 14:49:02 +0300258
259.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
260 :doc: Tile group