1=============================
2Mode Setting Helper Functions
3=============================
4
5The 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.
11
12This 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.
16
17There are a few areas these helpers can grouped into:
18
19* 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   :doc: overview
41
42.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
43   :internal:
44
45.. _drm_atomic_helper:
46
47Atomic Modeset Helper Functions Reference
48=========================================
49
50Overview
51--------
52
53.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
54   :doc: overview
55
56Implementing Asynchronous Atomic Commit
57---------------------------------------
58
59.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
60   :doc: implementing nonblocking commit
61
62Atomic State Reset and Initialization
63-------------------------------------
64
65.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
66   :doc: atomic state reset and initialization
67
68Helper Functions Reference
69--------------------------
70
71.. kernel-doc:: include/drm/drm_atomic_helper.h
72   :internal:
73
74.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
75   :export:
76
77Simple KMS Helper Reference
78===========================
79
80.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
81   :doc: overview
82
83.. kernel-doc:: include/drm/drm_simple_kms_helper.h
84   :internal:
85
86.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
87   :export:
88
89fbdev Helper Functions Reference
90================================
91
92.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
93   :doc: fbdev helpers
94
95.. kernel-doc:: include/drm/drm_fb_helper.h
96   :internal:
97
98.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
99   :export:
100
101Framebuffer CMA Helper Functions Reference
102==========================================
103
104.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
105   :doc: framebuffer cma helper functions
106
107.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
108   :export:
109
110.. _drm_bridges:
111
112Framebuffer GEM Helper Reference
113================================
114
115.. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
116   :doc: overview
117
118.. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
119   :export:
120
121Bridges
122=======
123
124Overview
125--------
126
127.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
128   :doc: overview
129
130Default bridge callback sequence
131--------------------------------
132
133.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
134   :doc: bridge callbacks
135
136
137Bridge Helper Reference
138-------------------------
139
140.. kernel-doc:: include/drm/drm_bridge.h
141   :internal:
142
143.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
144   :export:
145
146Panel-Bridge Helper Reference
147-----------------------------
148
149.. kernel-doc:: drivers/gpu/drm/bridge/panel.c
150   :export:
151
152.. _drm_panel_helper:
153
154Panel Helper Reference
155======================
156
157.. kernel-doc:: drivers/gpu/drm/drm_panel.c
158   :doc: drm panel
159
160.. kernel-doc:: include/drm/drm_panel.h
161   :internal:
162
163.. kernel-doc:: drivers/gpu/drm/drm_panel.c
164   :export:
165
166.. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
167   :export:
168
169Display Port Helper Functions Reference
170=======================================
171
172.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
173   :doc: dp helpers
174
175.. kernel-doc:: include/drm/drm_dp_helper.h
176   :internal:
177
178.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
179   :export:
180
181Display Port CEC Helper Functions Reference
182===========================================
183
184.. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
185   :doc: dp cec helpers
186
187.. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
188   :export:
189
190Display Port Dual Mode Adaptor Helper Functions Reference
191=========================================================
192
193.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
194   :doc: dp dual mode helpers
195
196.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
197   :internal:
198
199.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
200   :export:
201
202Display Port MST Helper Functions Reference
203===========================================
204
205.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
206   :doc: dp mst helper
207
208.. kernel-doc:: include/drm/drm_dp_mst_helper.h
209   :internal:
210
211.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
212   :export:
213
214MIPI DSI Helper Functions Reference
215===================================
216
217.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
218   :doc: dsi helpers
219
220.. kernel-doc:: include/drm/drm_mipi_dsi.h
221   :internal:
222
223.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
224   :export:
225
226Output Probing Helper Functions Reference
227=========================================
228
229.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
230   :doc: output probing helper overview
231
232.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
233   :export:
234
235EDID Helper Functions Reference
236===============================
237
238.. kernel-doc:: include/drm/drm_edid.h
239   :internal:
240
241.. kernel-doc:: drivers/gpu/drm/drm_edid.c
242   :export:
243
244SCDC Helper Functions Reference
245===============================
246
247.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
248   :doc: scdc helpers
249
250.. kernel-doc:: include/drm/drm_scdc_helper.h
251   :internal:
252
253.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
254   :export:
255
256Rectangle Utilities Reference
257=============================
258
259.. kernel-doc:: include/drm/drm_rect.h
260   :doc: rect utils
261
262.. kernel-doc:: include/drm/drm_rect.h
263   :internal:
264
265.. kernel-doc:: drivers/gpu/drm/drm_rect.c
266   :export:
267
268HDMI Infoframes Helper Reference
269================================
270
271Strictly speaking this is not a DRM helper library but generally useable
272by any driver interfacing with HDMI outputs like v4l or alsa drivers.
273But it nicely fits into the overall topic of mode setting helper
274libraries and hence is also included here.
275
276.. kernel-doc:: include/linux/hdmi.h
277   :internal:
278
279.. kernel-doc:: drivers/video/hdmi.c
280   :export:
281
282Flip-work Helper Reference
283==========================
284
285.. kernel-doc:: include/drm/drm_flip_work.h
286   :doc: flip utils
287
288.. kernel-doc:: include/drm/drm_flip_work.h
289   :internal:
290
291.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
292   :export:
293
294Auxiliary Modeset Helpers
295=========================
296
297.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
298   :doc: aux kms helpers
299
300.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
301   :export:
302
303OF/DT Helpers
304=============
305
306.. kernel-doc:: drivers/gpu/drm/drm_of.c
307   :doc: overview
308
309.. kernel-doc:: drivers/gpu/drm/drm_of.c
310   :export:
311
312Legacy Plane Helper Reference
313=============================
314
315.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
316   :doc: overview
317
318.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
319   :export:
320
321Legacy CRTC/Modeset Helper Functions Reference
322==============================================
323
324.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
325   :doc: overview
326
327.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
328   :export:
329