blob: 03040aa14fe879a9f259a86ec3587d35309bc0b8 [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
Daniel Vetter1ea0c022016-11-21 18:18:02 +010066Helper Functions Reference
67--------------------------
68
Jani Nikula2fa91d12016-06-21 14:49:02 +030069.. kernel-doc:: include/drm/drm_atomic_helper.h
70 :internal:
71
72.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
73 :export:
74
Jani Nikula2fa91d12016-06-21 14:49:02 +030075Legacy CRTC/Modeset Helper Functions Reference
76==============================================
77
78.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030079 :doc: overview
80
Daniel Vetterbcb32b62016-08-12 22:48:38 +020081.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030082 :export:
83
Daniel Vetterbcb32b62016-08-12 22:48:38 +020084Simple KMS Helper Reference
85===========================
86
87.. kernel-doc:: include/drm/drm_simple_kms_helper.h
88 :internal:
89
90.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
91 :export:
92
93.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
94 :doc: overview
95
Jani Nikula2fa91d12016-06-21 14:49:02 +030096fbdev Helper Functions Reference
97================================
98
99.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
100 :doc: fbdev helpers
101
102.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
103 :export:
104
105.. kernel-doc:: include/drm/drm_fb_helper.h
106 :internal:
107
108Framebuffer CMA Helper Functions Reference
109==========================================
110
111.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
112 :doc: framebuffer cma helper functions
113
114.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
115 :export:
116
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200117Bridges
118=======
119
120Overview
121--------
122
123.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
124 :doc: overview
125
126Default bridge callback sequence
127--------------------------------
128
129.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
130 :doc: bridge callbacks
131
Daniel Vetter199e4e92016-08-31 18:09:05 +0200132
133Bridge Helper Reference
134-------------------------
135
136.. kernel-doc:: include/drm/drm_bridge.h
137 :internal:
138
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200139.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
140 :export:
141
142Panel Helper Reference
143======================
144
145.. kernel-doc:: include/drm/drm_panel.h
146 :internal:
147
148.. kernel-doc:: drivers/gpu/drm/drm_panel.c
149 :export:
150
151.. kernel-doc:: drivers/gpu/drm/drm_panel.c
152 :doc: drm panel
153
Jani Nikula2fa91d12016-06-21 14:49:02 +0300154Display Port Helper Functions Reference
155=======================================
156
157.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
158 :doc: dp helpers
159
160.. kernel-doc:: include/drm/drm_dp_helper.h
161 :internal:
162
163.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
164 :export:
165
166Display Port Dual Mode Adaptor Helper Functions Reference
167=========================================================
168
169.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
170 :doc: dp dual mode helpers
171
172.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
173 :internal:
174
175.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
176 :export:
177
178Display Port MST Helper Functions Reference
179===========================================
180
181.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
182 :doc: dp mst helper
183
184.. kernel-doc:: include/drm/drm_dp_mst_helper.h
185 :internal:
186
187.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
188 :export:
189
190MIPI DSI Helper Functions Reference
191===================================
192
193.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
194 :doc: dsi helpers
195
196.. kernel-doc:: include/drm/drm_mipi_dsi.h
197 :internal:
198
199.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
200 :export:
201
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200202Output Probing Helper Functions Reference
203=========================================
204
205.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
206 :doc: output probing helper overview
207
208.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
209 :export:
210
Jani Nikula2fa91d12016-06-21 14:49:02 +0300211EDID Helper Functions Reference
212===============================
213
Daniel Vettercdc3d092016-08-31 18:09:06 +0200214.. kernel-doc:: include/drm/drm_edid.h
215 :internal:
216
Jani Nikula2fa91d12016-06-21 14:49:02 +0300217.. kernel-doc:: drivers/gpu/drm/drm_edid.c
218 :export:
219
220Rectangle Utilities Reference
221=============================
222
223.. kernel-doc:: include/drm/drm_rect.h
224 :doc: rect utils
225
226.. kernel-doc:: include/drm/drm_rect.h
227 :internal:
228
229.. kernel-doc:: drivers/gpu/drm/drm_rect.c
230 :export:
231
Jani Nikula2fa91d12016-06-21 14:49:02 +0300232HDMI Infoframes Helper Reference
233================================
234
235Strictly speaking this is not a DRM helper library but generally useable
236by any driver interfacing with HDMI outputs like v4l or alsa drivers.
237But it nicely fits into the overall topic of mode setting helper
238libraries and hence is also included here.
239
240.. kernel-doc:: include/linux/hdmi.h
241 :internal:
242
243.. kernel-doc:: drivers/video/hdmi.c
244 :export:
245
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200246Flip-work Helper Reference
247==========================
248
249.. kernel-doc:: include/drm/drm_flip_work.h
250 :doc: flip utils
251
252.. kernel-doc:: include/drm/drm_flip_work.h
253 :internal:
254
255.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
256 :export:
257
Jani Nikula2fa91d12016-06-21 14:49:02 +0300258Plane Helper Reference
259======================
260
261.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +0300262 :doc: overview
263
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200264.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
265 :export:
266
Daniel Vetter1de72fa2016-08-12 22:48:39 +0200267Auxiliary Modeset Helpers
268=========================
269
270.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
271 :doc: aux kms helpers
272
273.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
274 :export: