blob: 7c5e2549a58a61091b286e88c2171cbc9439668f [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
Daniel Vetter1ea35762017-03-02 16:16:36 +010040 :doc: overview
Daniel Vetterbcb32b62016-08-12 22:48:38 +020041
42.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
Daniel Vetter1ea35762017-03-02 16:16:36 +010043 :internal:
Jani Nikula2fa91d12016-06-21 14:49:02 +030044
Daniel Vetter4a8e2292017-03-02 16:16:38 +010045.. _drm_atomic_helper:
46
Jani Nikula2fa91d12016-06-21 14:49:02 +030047Atomic 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
Daniel Vetter1ea0c022016-11-21 18:18:02 +010068Helper Functions Reference
69--------------------------
70
Jani Nikula2fa91d12016-06-21 14:49:02 +030071.. kernel-doc:: include/drm/drm_atomic_helper.h
72 :internal:
73
74.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
75 :export:
76
Jani Nikula2fa91d12016-06-21 14:49:02 +030077Legacy CRTC/Modeset Helper Functions Reference
78==============================================
79
80.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030081 :doc: overview
82
Daniel Vetterbcb32b62016-08-12 22:48:38 +020083.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +030084 :export:
85
Daniel Vetterbcb32b62016-08-12 22:48:38 +020086Simple KMS Helper Reference
87===========================
88
Daniel Vetter1ea35762017-03-02 16:16:36 +010089.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
90 :doc: overview
91
Daniel Vetterbcb32b62016-08-12 22:48:38 +020092.. kernel-doc:: include/drm/drm_simple_kms_helper.h
93 :internal:
94
95.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
96 :export:
97
Jani Nikula2fa91d12016-06-21 14:49:02 +030098fbdev Helper Functions Reference
99================================
100
101.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
102 :doc: fbdev helpers
103
Jani Nikula2fa91d12016-06-21 14:49:02 +0300104.. kernel-doc:: include/drm/drm_fb_helper.h
105 :internal:
106
Daniel Vetter1ea35762017-03-02 16:16:36 +0100107.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
108 :export:
109
Jani Nikula2fa91d12016-06-21 14:49:02 +0300110Framebuffer CMA Helper Functions Reference
111==========================================
112
113.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
114 :doc: framebuffer cma helper functions
115
116.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
117 :export:
118
Daniel Vetter2564d0b2017-03-02 16:16:35 +0100119.. _drm_bridges:
120
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200121Bridges
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
Daniel Vetter199e4e92016-08-31 18:09:05 +0200136
137Bridge Helper Reference
138-------------------------
139
140.. kernel-doc:: include/drm/drm_bridge.h
141 :internal:
142
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200143.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
144 :export:
145
Eric Anholt13dfc052017-06-02 13:25:14 -0700146Panel-Bridge Helper Reference
147-----------------------------
148
149.. kernel-doc:: drivers/gpu/drm/bridge/panel.c
150 :export:
151
Daniel Vetter2564d0b2017-03-02 16:16:35 +0100152.. _drm_panel_helper:
153
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200154Panel Helper Reference
155======================
156
Daniel Vetter1ea35762017-03-02 16:16:36 +0100157.. kernel-doc:: drivers/gpu/drm/drm_panel.c
158 :doc: drm panel
159
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200160.. kernel-doc:: include/drm/drm_panel.h
161 :internal:
162
163.. kernel-doc:: drivers/gpu/drm/drm_panel.c
164 :export:
165
Jani Nikula2fa91d12016-06-21 14:49:02 +0300166Display Port Helper Functions Reference
167=======================================
168
169.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
170 :doc: dp helpers
171
172.. kernel-doc:: include/drm/drm_dp_helper.h
173 :internal:
174
175.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
176 :export:
177
178Display Port Dual Mode Adaptor Helper Functions Reference
179=========================================================
180
181.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
182 :doc: dp dual mode helpers
183
184.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
185 :internal:
186
187.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
188 :export:
189
190Display Port MST Helper Functions Reference
191===========================================
192
193.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
194 :doc: dp mst helper
195
196.. kernel-doc:: include/drm/drm_dp_mst_helper.h
197 :internal:
198
199.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
200 :export:
201
202MIPI DSI Helper Functions Reference
203===================================
204
205.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
206 :doc: dsi helpers
207
208.. kernel-doc:: include/drm/drm_mipi_dsi.h
209 :internal:
210
211.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
212 :export:
213
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200214Output Probing Helper Functions Reference
215=========================================
216
217.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
218 :doc: output probing helper overview
219
220.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
221 :export:
222
Jani Nikula2fa91d12016-06-21 14:49:02 +0300223EDID Helper Functions Reference
224===============================
225
Daniel Vettercdc3d092016-08-31 18:09:06 +0200226.. kernel-doc:: include/drm/drm_edid.h
227 :internal:
228
Jani Nikula2fa91d12016-06-21 14:49:02 +0300229.. kernel-doc:: drivers/gpu/drm/drm_edid.c
230 :export:
231
Thierry Reding3ad33ae2017-03-13 16:53:59 +0530232SCDC Helper Functions Reference
233===============================
234
235.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
236 :doc: scdc helpers
237
238.. kernel-doc:: include/drm/drm_scdc_helper.h
239 :internal:
240
241.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
242 :export:
243
Jani Nikula2fa91d12016-06-21 14:49:02 +0300244Rectangle Utilities Reference
245=============================
246
247.. kernel-doc:: include/drm/drm_rect.h
248 :doc: rect utils
249
250.. kernel-doc:: include/drm/drm_rect.h
251 :internal:
252
253.. kernel-doc:: drivers/gpu/drm/drm_rect.c
254 :export:
255
Jani Nikula2fa91d12016-06-21 14:49:02 +0300256HDMI Infoframes Helper Reference
257================================
258
259Strictly speaking this is not a DRM helper library but generally useable
260by any driver interfacing with HDMI outputs like v4l or alsa drivers.
261But it nicely fits into the overall topic of mode setting helper
262libraries and hence is also included here.
263
264.. kernel-doc:: include/linux/hdmi.h
265 :internal:
266
267.. kernel-doc:: drivers/video/hdmi.c
268 :export:
269
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200270Flip-work Helper Reference
271==========================
272
273.. kernel-doc:: include/drm/drm_flip_work.h
274 :doc: flip utils
275
276.. kernel-doc:: include/drm/drm_flip_work.h
277 :internal:
278
279.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
280 :export:
281
Jani Nikula2fa91d12016-06-21 14:49:02 +0300282Plane Helper Reference
283======================
284
285.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
Jani Nikula2fa91d12016-06-21 14:49:02 +0300286 :doc: overview
287
Daniel Vetterbcb32b62016-08-12 22:48:38 +0200288.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
289 :export:
290
Daniel Vetter1de72fa2016-08-12 22:48:39 +0200291Auxiliary Modeset Helpers
292=========================
293
294.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
295 :doc: aux kms helpers
296
297.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
298 :export: