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 format Helper Functions Reference
120 =================================
122 .. kernel-doc:: drivers/gpu/drm/drm_format_helper.c
125 Framebuffer DMA Helper Functions Reference
126 ==========================================
128 .. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
129 :doc: framebuffer dma helper functions
131 .. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
134 Framebuffer GEM Helper Reference
135 ================================
137 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
140 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
151 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
154 Display Driver Integration
155 --------------------------
157 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
158 :doc: display driver integration
160 Special Care with MIPI-DSI bridges
161 ----------------------------------
163 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
164 :doc: special care dsi
169 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
170 :doc: bridge operations
172 Bridge Connector Helper
173 -----------------------
175 .. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
179 Bridge Helper Reference
180 -------------------------
182 .. kernel-doc:: include/drm/drm_bridge.h
185 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
188 MIPI-DSI bridge operation
189 -------------------------
191 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
192 :doc: dsi bridge operations
195 Bridge Connector Helper Reference
196 ---------------------------------
198 .. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
201 Panel-Bridge Helper Reference
202 -----------------------------
204 .. kernel-doc:: drivers/gpu/drm/bridge/panel.c
207 .. _drm_panel_helper:
209 Panel Helper Reference
210 ======================
212 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
215 .. kernel-doc:: include/drm/drm_panel.h
218 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
221 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
224 Panel Self Refresh Helper Reference
225 ===================================
227 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
230 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
233 HDCP Helper Functions Reference
234 ===============================
236 .. kernel-doc:: drivers/gpu/drm/display/drm_hdcp_helper.c
239 Display Port Helper Functions Reference
240 =======================================
242 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
245 .. kernel-doc:: include/drm/display/drm_dp.h
248 .. kernel-doc:: include/drm/display/drm_dp_helper.h
251 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c
254 Display Port CEC Helper Functions Reference
255 ===========================================
257 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
260 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c
263 Display Port Dual Mode Adaptor Helper Functions Reference
264 =========================================================
266 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
267 :doc: dp dual mode helpers
269 .. kernel-doc:: include/drm/display/drm_dp_dual_mode_helper.h
272 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
275 Display Port MST Helpers
276 ========================
281 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
284 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
285 :doc: Branch device and port refcounting
290 .. kernel-doc:: include/drm/display/drm_dp_mst_helper.h
293 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
296 Topology Lifetime Internals
297 ---------------------------
299 These functions aren't exported to drivers, but are documented here to help make
300 the MST topology helpers easier to understand
302 .. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c
303 :functions: drm_dp_mst_topology_try_get_mstb drm_dp_mst_topology_get_mstb
304 drm_dp_mst_topology_put_mstb
305 drm_dp_mst_topology_try_get_port drm_dp_mst_topology_get_port
306 drm_dp_mst_topology_put_port
307 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc
309 MIPI DBI Helper Functions Reference
310 ===================================
312 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
315 .. kernel-doc:: include/drm/drm_mipi_dbi.h
318 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
321 MIPI DSI Helper Functions Reference
322 ===================================
324 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
327 .. kernel-doc:: include/drm/drm_mipi_dsi.h
330 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
333 Display Stream Compression Helper Functions Reference
334 =====================================================
336 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
339 .. kernel-doc:: include/drm/display/drm_dsc.h
342 .. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c
345 Output Probing Helper Functions Reference
346 =========================================
348 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
349 :doc: output probing helper overview
351 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
354 EDID Helper Functions Reference
355 ===============================
357 .. kernel-doc:: include/drm/drm_edid.h
360 .. kernel-doc:: drivers/gpu/drm/drm_edid.c
363 .. kernel-doc:: include/drm/drm_eld.h
366 .. kernel-doc:: drivers/gpu/drm/drm_eld.c
369 SCDC Helper Functions Reference
370 ===============================
372 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
375 .. kernel-doc:: include/drm/display/drm_scdc_helper.h
378 .. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c
381 HDMI Infoframes Helper Reference
382 ================================
384 Strictly speaking this is not a DRM helper library but generally usable
385 by any driver interfacing with HDMI outputs like v4l or alsa drivers.
386 But it nicely fits into the overall topic of mode setting helper
387 libraries and hence is also included here.
389 .. kernel-doc:: include/linux/hdmi.h
392 .. kernel-doc:: drivers/video/hdmi.c
395 Rectangle Utilities Reference
396 =============================
398 .. kernel-doc:: include/drm/drm_rect.h
401 .. kernel-doc:: include/drm/drm_rect.h
404 .. kernel-doc:: drivers/gpu/drm/drm_rect.c
407 Flip-work Helper Reference
408 ==========================
410 .. kernel-doc:: include/drm/drm_flip_work.h
413 .. kernel-doc:: include/drm/drm_flip_work.h
416 .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
419 Auxiliary Modeset Helpers
420 =========================
422 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
423 :doc: aux kms helpers
425 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
431 .. kernel-doc:: drivers/gpu/drm/drm_of.c
434 .. kernel-doc:: drivers/gpu/drm/drm_of.c
437 Legacy Plane Helper Reference
438 =============================
440 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
443 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
446 Legacy CRTC/Modeset Helper Functions Reference
447 ==============================================
449 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
452 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
458 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c
461 .. kernel-doc:: include/drm/drm_privacy_screen_driver.h
464 .. kernel-doc:: include/drm/drm_privacy_screen_machine.h
467 .. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c