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 Bridge Connector Helper Reference
192 ---------------------------------
194 .. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
197 Panel-Bridge Helper Reference
198 -----------------------------
200 .. kernel-doc:: drivers/gpu/drm/bridge/panel.c
203 .. _drm_panel_helper:
205 Panel Helper Reference
206 ======================
208 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
211 .. kernel-doc:: include/drm/drm_panel.h
214 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
217 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
220 Panel Self Refresh Helper Reference
221 ===================================
223 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
226 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
229 HDCP Helper Functions Reference
230 ===============================
232 .. kernel-doc:: drivers/gpu/drm/display/drm_hdcp_helper.c
235 Display Port Helper Functions Reference
236 =======================================
238 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
241 .. kernel-doc:: include/drm/display/drm_dp.h
244 .. kernel-doc:: include/drm/display/drm_dp_helper.h
247 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
250 Display Port CEC Helper Functions Reference
251 ===========================================
253 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
256 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
259 Display Port Dual Mode Adaptor Helper Functions Reference
260 =========================================================
262 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
263 :doc: dp dual mode helpers
265 .. kernel-doc:: include/drm/display/drm_dp_dual_mode_helper.h
268 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
271 Display Port MST Helpers
272 ========================
277 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
280 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
281 :doc: Branch device and port refcounting
286 .. kernel-doc:: include/drm/display/drm_dp_mst_helper.h
289 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
292 Topology Lifetime Internals
293 ---------------------------
295 These functions aren't exported to drivers, but are documented here to help make
296 the MST topology helpers easier to understand
298 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
299 :functions: drm_dp_mst_topology_try_get_mstb drm_dp_mst_topology_get_mstb
300 drm_dp_mst_topology_put_mstb
301 drm_dp_mst_topology_try_get_port drm_dp_mst_topology_get_port
302 drm_dp_mst_topology_put_port
303 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc
305 MIPI DBI Helper Functions Reference
306 ===================================
308 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
311 .. kernel-doc:: include/drm/drm_mipi_dbi.h
314 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
317 MIPI DSI Helper Functions Reference
318 ===================================
320 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
323 .. kernel-doc:: include/drm/drm_mipi_dsi.h
326 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
329 Display Stream Compression Helper Functions Reference
330 =====================================================
332 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
335 .. kernel-doc:: include/drm/display/drm_dsc.h
338 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
341 Output Probing Helper Functions Reference
342 =========================================
344 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
345 :doc: output probing helper overview
347 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
350 EDID Helper Functions Reference
351 ===============================
353 .. kernel-doc:: include/drm/drm_edid.h
356 .. kernel-doc:: drivers/gpu/drm/drm_edid.c
359 SCDC Helper Functions Reference
360 ===============================
362 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
365 .. kernel-doc:: include/drm/display/drm_scdc_helper.h
368 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
371 HDMI Infoframes Helper Reference
372 ================================
374 Strictly speaking this is not a DRM helper library but generally useable
375 by any driver interfacing with HDMI outputs like v4l or alsa drivers.
376 But it nicely fits into the overall topic of mode setting helper
377 libraries and hence is also included here.
379 .. kernel-doc:: include/linux/hdmi.h
382 .. kernel-doc:: drivers/video/hdmi.c
385 Rectangle Utilities Reference
386 =============================
388 .. kernel-doc:: include/drm/drm_rect.h
391 .. kernel-doc:: include/drm/drm_rect.h
394 .. kernel-doc:: drivers/gpu/drm/drm_rect.c
397 Flip-work Helper Reference
398 ==========================
400 .. kernel-doc:: include/drm/drm_flip_work.h
403 .. kernel-doc:: include/drm/drm_flip_work.h
406 .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
409 Auxiliary Modeset Helpers
410 =========================
412 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
413 :doc: aux kms helpers
415 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
421 .. kernel-doc:: drivers/gpu/drm/drm_of.c
424 .. kernel-doc:: drivers/gpu/drm/drm_of.c
427 Legacy Plane Helper Reference
428 =============================
430 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
433 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
436 Legacy CRTC/Modeset Helper Functions Reference
437 ==============================================
439 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
442 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
448 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c
451 .. kernel-doc:: include/drm/drm_privacy_screen_driver.h
454 .. kernel-doc:: include/drm/drm_privacy_screen_machine.h
457 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c