1 =============================
2 Mode Setting Helper Functions
3 =============================
5 The DRM subsystem aims for a strong separation between core code and helper
6 libraries. Core code takes care of general setup and teardown and decoding
7 userspace requests to kernel internal objects. Everything else is handled by a
8 large set of helper libraries, which can be combined freely to pick and choose
9 for each driver what fits, and avoid shared code where special behaviour is
12 This distinction between core code and helpers is especially strong in the
13 modesetting code, where there's a shared userspace ABI for all drivers. This is
14 in contrast to the render side, where pretty much everything (with very few
15 exceptions) can be considered optional helper code.
17 There are a few areas these helpers can grouped into:
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.
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
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.
36 Modeset Helper Reference for Common Vtables
37 ===========================================
39 .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
42 .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
45 .. _drm_atomic_helper:
47 Atomic Modeset Helper Functions Reference
48 =========================================
53 .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
56 Implementing Asynchronous Atomic Commit
57 ---------------------------------------
59 .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
60 :doc: implementing nonblocking commit
62 Atomic State Reset and Initialization
63 -------------------------------------
65 .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
66 :doc: atomic state reset and initialization
68 Helper Functions Reference
69 --------------------------
71 .. kernel-doc:: include/drm/drm_atomic_helper.h
74 .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
77 Simple KMS Helper Reference
78 ===========================
80 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
83 .. kernel-doc:: include/drm/drm_simple_kms_helper.h
86 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
89 fbdev Helper Functions Reference
90 ================================
92 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
95 .. kernel-doc:: include/drm/drm_fb_helper.h
98 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
101 Framebuffer CMA Helper Functions Reference
102 ==========================================
104 .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
105 :doc: framebuffer cma helper functions
107 .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
112 Framebuffer GEM Helper Reference
113 ================================
115 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
118 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
127 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
130 Default bridge callback sequence
131 --------------------------------
133 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
134 :doc: bridge callbacks
137 Bridge Helper Reference
138 -------------------------
140 .. kernel-doc:: include/drm/drm_bridge.h
143 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
146 Panel-Bridge Helper Reference
147 -----------------------------
149 .. kernel-doc:: drivers/gpu/drm/bridge/panel.c
152 .. _drm_panel_helper:
154 Panel Helper Reference
155 ======================
157 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
160 .. kernel-doc:: include/drm/drm_panel.h
163 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
166 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
169 Display Port Helper Functions Reference
170 =======================================
172 .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
175 .. kernel-doc:: include/drm/drm_dp_helper.h
178 .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
181 Display Port CEC Helper Functions Reference
182 ===========================================
184 .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
187 .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
190 Display Port Dual Mode Adaptor Helper Functions Reference
191 =========================================================
193 .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
194 :doc: dp dual mode helpers
196 .. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
199 .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
202 Display Port MST Helper Functions Reference
203 ===========================================
205 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
208 .. kernel-doc:: include/drm/drm_dp_mst_helper.h
211 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
214 MIPI DSI Helper Functions Reference
215 ===================================
217 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
220 .. kernel-doc:: include/drm/drm_mipi_dsi.h
223 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
226 Output Probing Helper Functions Reference
227 =========================================
229 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
230 :doc: output probing helper overview
232 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
235 EDID Helper Functions Reference
236 ===============================
238 .. kernel-doc:: include/drm/drm_edid.h
241 .. kernel-doc:: drivers/gpu/drm/drm_edid.c
244 SCDC Helper Functions Reference
245 ===============================
247 .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
250 .. kernel-doc:: include/drm/drm_scdc_helper.h
253 .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
256 Rectangle Utilities Reference
257 =============================
259 .. kernel-doc:: include/drm/drm_rect.h
262 .. kernel-doc:: include/drm/drm_rect.h
265 .. kernel-doc:: drivers/gpu/drm/drm_rect.c
268 HDMI Infoframes Helper Reference
269 ================================
271 Strictly speaking this is not a DRM helper library but generally useable
272 by any driver interfacing with HDMI outputs like v4l or alsa drivers.
273 But it nicely fits into the overall topic of mode setting helper
274 libraries and hence is also included here.
276 .. kernel-doc:: include/linux/hdmi.h
279 .. kernel-doc:: drivers/video/hdmi.c
282 Flip-work Helper Reference
283 ==========================
285 .. kernel-doc:: include/drm/drm_flip_work.h
288 .. kernel-doc:: include/drm/drm_flip_work.h
291 .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
294 Auxiliary Modeset Helpers
295 =========================
297 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
298 :doc: aux kms helpers
300 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
306 .. kernel-doc:: drivers/gpu/drm/drm_of.c
309 .. kernel-doc:: drivers/gpu/drm/drm_of.c
312 Legacy Plane Helper Reference
313 =============================
315 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
318 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
321 Legacy CRTC/Modeset Helper Functions Reference
322 ==============================================
324 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
327 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c