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 Helper Functions Reference
63 --------------------------
65 .. kernel-doc:: include/drm/drm_atomic_helper.h
68 .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
71 Atomic State Reset and Initialization
72 -------------------------------------
74 .. kernel-doc:: drivers/gpu/drm/drm_atomic_state_helper.c
75 :doc: atomic state reset and initialization
77 Atomic State Helper Reference
78 -----------------------------
80 .. kernel-doc:: drivers/gpu/drm/drm_atomic_state_helper.c
83 GEM Atomic Helper Reference
84 ---------------------------
86 .. kernel-doc:: drivers/gpu/drm/drm_gem_atomic_helper.c
89 .. kernel-doc:: include/drm/drm_gem_atomic_helper.h
92 .. kernel-doc:: drivers/gpu/drm/drm_gem_atomic_helper.c
95 Simple KMS Helper Reference
96 ===========================
98 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
101 .. kernel-doc:: include/drm/drm_simple_kms_helper.h
104 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
107 fbdev Helper Functions Reference
108 ================================
110 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
113 .. kernel-doc:: include/drm/drm_fb_helper.h
116 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
119 .. kernel-doc:: drivers/gpu/drm/drm_fbdev_generic.c
122 format Helper Functions Reference
123 =================================
125 .. kernel-doc:: drivers/gpu/drm/drm_format_helper.c
128 Framebuffer DMA Helper Functions Reference
129 ==========================================
131 .. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
132 :doc: framebuffer dma helper functions
134 .. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
137 Framebuffer GEM Helper Reference
138 ================================
140 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
143 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
154 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
157 Display Driver Integration
158 --------------------------
160 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
161 :doc: display driver integration
163 Special Care with MIPI-DSI bridges
164 ----------------------------------
166 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
167 :doc: special care dsi
172 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
173 :doc: bridge operations
175 Bridge Connector Helper
176 -----------------------
178 .. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
182 Bridge Helper Reference
183 -------------------------
185 .. kernel-doc:: include/drm/drm_bridge.h
188 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
191 MIPI-DSI bridge operation
192 -------------------------
194 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
195 :doc: dsi bridge operations
198 Bridge Connector Helper Reference
199 ---------------------------------
201 .. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
204 Panel-Bridge Helper Reference
205 -----------------------------
207 .. kernel-doc:: drivers/gpu/drm/bridge/panel.c
210 .. _drm_panel_helper:
212 Panel Helper Reference
213 ======================
215 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
218 .. kernel-doc:: include/drm/drm_panel.h
221 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
224 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
227 Panel Self Refresh Helper Reference
228 ===================================
230 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
233 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
236 HDCP Helper Functions Reference
237 ===============================
239 .. kernel-doc:: drivers/gpu/drm/display/drm_hdcp_helper.c
242 Display Port Helper Functions Reference
243 =======================================
245 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
248 .. kernel-doc:: include/drm/display/drm_dp.h
251 .. kernel-doc:: include/drm/display/drm_dp_helper.h
254 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
257 Display Port CEC Helper Functions Reference
258 ===========================================
260 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
263 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
266 Display Port Dual Mode Adaptor Helper Functions Reference
267 =========================================================
269 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
270 :doc: dp dual mode helpers
272 .. kernel-doc:: include/drm/display/drm_dp_dual_mode_helper.h
275 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
278 Display Port MST Helpers
279 ========================
284 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
287 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
288 :doc: Branch device and port refcounting
293 .. kernel-doc:: include/drm/display/drm_dp_mst_helper.h
296 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
299 Topology Lifetime Internals
300 ---------------------------
302 These functions aren't exported to drivers, but are documented here to help make
303 the MST topology helpers easier to understand
305 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
306 :functions: drm_dp_mst_topology_try_get_mstb drm_dp_mst_topology_get_mstb
307 drm_dp_mst_topology_put_mstb
308 drm_dp_mst_topology_try_get_port drm_dp_mst_topology_get_port
309 drm_dp_mst_topology_put_port
310 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc
312 MIPI DBI Helper Functions Reference
313 ===================================
315 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
318 .. kernel-doc:: include/drm/drm_mipi_dbi.h
321 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
324 MIPI DSI Helper Functions Reference
325 ===================================
327 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
330 .. kernel-doc:: include/drm/drm_mipi_dsi.h
333 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
336 Display Stream Compression Helper Functions Reference
337 =====================================================
339 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
342 .. kernel-doc:: include/drm/display/drm_dsc.h
345 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
348 Output Probing Helper Functions Reference
349 =========================================
351 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
352 :doc: output probing helper overview
354 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
357 EDID Helper Functions Reference
358 ===============================
360 .. kernel-doc:: include/drm/drm_edid.h
363 .. kernel-doc:: drivers/gpu/drm/drm_edid.c
366 SCDC Helper Functions Reference
367 ===============================
369 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
372 .. kernel-doc:: include/drm/display/drm_scdc_helper.h
375 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
378 HDMI Infoframes Helper Reference
379 ================================
381 Strictly speaking this is not a DRM helper library but generally usable
382 by any driver interfacing with HDMI outputs like v4l or alsa drivers.
383 But it nicely fits into the overall topic of mode setting helper
384 libraries and hence is also included here.
386 .. kernel-doc:: include/linux/hdmi.h
389 .. kernel-doc:: drivers/video/hdmi.c
392 Rectangle Utilities Reference
393 =============================
395 .. kernel-doc:: include/drm/drm_rect.h
398 .. kernel-doc:: include/drm/drm_rect.h
401 .. kernel-doc:: drivers/gpu/drm/drm_rect.c
404 Flip-work Helper Reference
405 ==========================
407 .. kernel-doc:: include/drm/drm_flip_work.h
410 .. kernel-doc:: include/drm/drm_flip_work.h
413 .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
416 Auxiliary Modeset Helpers
417 =========================
419 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
420 :doc: aux kms helpers
422 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
428 .. kernel-doc:: drivers/gpu/drm/drm_of.c
431 .. kernel-doc:: drivers/gpu/drm/drm_of.c
434 Legacy Plane Helper Reference
435 =============================
437 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
440 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
443 Legacy CRTC/Modeset Helper Functions Reference
444 ==============================================
446 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
449 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
455 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c
458 .. kernel-doc:: include/drm/drm_privacy_screen_driver.h
461 .. kernel-doc:: include/drm/drm_privacy_screen_machine.h
464 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c