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 Simple KMS Helper Reference
84 ===========================
86 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
89 .. kernel-doc:: include/drm/drm_simple_kms_helper.h
92 .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
95 fbdev Helper Functions Reference
96 ================================
98 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
101 .. kernel-doc:: include/drm/drm_fb_helper.h
104 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
107 format Helper Functions Reference
108 =================================
110 .. kernel-doc:: drivers/gpu/drm/drm_format_helper.c
113 Framebuffer CMA Helper Functions Reference
114 ==========================================
116 .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
117 :doc: framebuffer cma helper functions
119 .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
122 Framebuffer GEM Helper Reference
123 ================================
125 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
128 .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
139 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
145 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
146 :doc: bridge operations
148 Bridge Connector Helper
149 -----------------------
151 .. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
155 Bridge Helper Reference
156 -------------------------
158 .. kernel-doc:: include/drm/drm_bridge.h
161 .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
164 Bridge Connector Helper Reference
165 ---------------------------------
167 .. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
170 Panel-Bridge Helper Reference
171 -----------------------------
173 .. kernel-doc:: drivers/gpu/drm/bridge/panel.c
176 .. _drm_panel_helper:
178 Panel Helper Reference
179 ======================
181 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
184 .. kernel-doc:: include/drm/drm_panel.h
187 .. kernel-doc:: drivers/gpu/drm/drm_panel.c
190 .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
193 Panel Self Refresh Helper Reference
194 ===================================
196 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
199 .. kernel-doc:: drivers/gpu/drm/drm_self_refresh_helper.c
202 HDCP Helper Functions Reference
203 ===============================
205 .. kernel-doc:: drivers/gpu/drm/drm_hdcp.c
208 Display Port Helper Functions Reference
209 =======================================
211 .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
214 .. kernel-doc:: include/drm/drm_dp_helper.h
217 .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
220 Display Port CEC Helper Functions Reference
221 ===========================================
223 .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
226 .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
229 Display Port Dual Mode Adaptor Helper Functions Reference
230 =========================================================
232 .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
233 :doc: dp dual mode helpers
235 .. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
238 .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
241 Display Port MST Helpers
242 ========================
247 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
250 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
251 :doc: Branch device and port refcounting
256 .. kernel-doc:: include/drm/drm_dp_mst_helper.h
259 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
262 Topology Lifetime Internals
263 ---------------------------
265 These functions aren't exported to drivers, but are documented here to help make
266 the MST topology helpers easier to understand
268 .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
269 :functions: drm_dp_mst_topology_try_get_mstb drm_dp_mst_topology_get_mstb
270 drm_dp_mst_topology_put_mstb
271 drm_dp_mst_topology_try_get_port drm_dp_mst_topology_get_port
272 drm_dp_mst_topology_put_port
273 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc
275 MIPI DBI Helper Functions Reference
276 ===================================
278 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
281 .. kernel-doc:: include/drm/drm_mipi_dbi.h
284 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
287 MIPI DSI Helper Functions Reference
288 ===================================
290 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
293 .. kernel-doc:: include/drm/drm_mipi_dsi.h
296 .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
299 Display Stream Compression Helper Functions Reference
300 =====================================================
302 .. kernel-doc:: drivers/gpu/drm/drm_dsc.c
305 .. kernel-doc:: include/drm/drm_dsc.h
308 .. kernel-doc:: drivers/gpu/drm/drm_dsc.c
311 Output Probing Helper Functions Reference
312 =========================================
314 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
315 :doc: output probing helper overview
317 .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
320 EDID Helper Functions Reference
321 ===============================
323 .. kernel-doc:: include/drm/drm_edid.h
326 .. kernel-doc:: drivers/gpu/drm/drm_edid.c
329 SCDC Helper Functions Reference
330 ===============================
332 .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
335 .. kernel-doc:: include/drm/drm_scdc_helper.h
338 .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
341 HDMI Infoframes Helper Reference
342 ================================
344 Strictly speaking this is not a DRM helper library but generally useable
345 by any driver interfacing with HDMI outputs like v4l or alsa drivers.
346 But it nicely fits into the overall topic of mode setting helper
347 libraries and hence is also included here.
349 .. kernel-doc:: include/linux/hdmi.h
352 .. kernel-doc:: drivers/video/hdmi.c
355 Rectangle Utilities Reference
356 =============================
358 .. kernel-doc:: include/drm/drm_rect.h
361 .. kernel-doc:: include/drm/drm_rect.h
364 .. kernel-doc:: drivers/gpu/drm/drm_rect.c
367 Flip-work Helper Reference
368 ==========================
370 .. kernel-doc:: include/drm/drm_flip_work.h
373 .. kernel-doc:: include/drm/drm_flip_work.h
376 .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
379 Auxiliary Modeset Helpers
380 =========================
382 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
383 :doc: aux kms helpers
385 .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
391 .. kernel-doc:: drivers/gpu/drm/drm_of.c
394 .. kernel-doc:: drivers/gpu/drm/drm_of.c
397 Legacy Plane Helper Reference
398 =============================
400 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
403 .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
406 Legacy CRTC/Modeset Helper Functions Reference
407 ==============================================
409 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
412 .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
415 SHMEM GEM Helper Reference
416 ==========================
418 .. kernel-doc:: drivers/gpu/drm/drm_gem_shmem_helper.c
421 .. kernel-doc:: include/drm/drm_gem_shmem_helper.h
424 .. kernel-doc:: drivers/gpu/drm/drm_gem_shmem_helper.c