blob: 0b302fedf1afcc3278b6eedc5dd14fb66a9aceab [file] [log] [blame]
Jani Nikula2fa91d12016-06-21 14:49:02 +03001=============================
2Mode Setting Helper Functions
3=============================
4
5The plane, CRTC, encoder and connector functions provided by the drivers
6implement the DRM API. They're called by the DRM core and ioctl handlers
7to handle device state changes and configuration request. As
8implementing those functions often requires logic not specific to
9drivers, mid-layer helper functions are available to avoid duplicating
10boilerplate code.
11
12The DRM core contains one mid-layer implementation. The mid-layer
13provides implementations of several plane, CRTC, encoder and connector
14functions (called from the top of the mid-layer) that pre-process
15requests and call lower-level functions provided by the driver (at the
16bottom of the mid-layer). For instance, the
17:c:func:`drm_crtc_helper_set_config()` function can be used to
18fill the :c:type:`struct drm_crtc_funcs <drm_crtc_funcs>`
19set_config field. When called, it will split the set_config operation
20in smaller, simpler operations and call the driver to handle them.
21
22To use the mid-layer, drivers call
23:c:func:`drm_crtc_helper_add()`,
24:c:func:`drm_encoder_helper_add()` and
25:c:func:`drm_connector_helper_add()` functions to install their
26mid-layer bottom operations handlers, and fill the :c:type:`struct
27drm_crtc_funcs <drm_crtc_funcs>`, :c:type:`struct
28drm_encoder_funcs <drm_encoder_funcs>` and :c:type:`struct
29drm_connector_funcs <drm_connector_funcs>` structures with
30pointers to the mid-layer top API functions. Installing the mid-layer
31bottom operation handlers is best done right after registering the
32corresponding KMS object.
33
34The mid-layer is not split between CRTC, encoder and connector
35operations. To use it, a driver must provide bottom functions for all of
36the three KMS entities.
37
38Atomic Modeset Helper Functions Reference
39=========================================
40
41Overview
42--------
43
44.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
45 :doc: overview
46
47Implementing Asynchronous Atomic Commit
48---------------------------------------
49
50.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
51 :doc: implementing nonblocking commit
52
53Atomic State Reset and Initialization
54-------------------------------------
55
56.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
57 :doc: atomic state reset and initialization
58
59.. kernel-doc:: include/drm/drm_atomic_helper.h
60 :internal:
61
62.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
63 :export:
64
65Modeset Helper Reference for Common Vtables
66===========================================
67
68.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
69 :internal:
70
71.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
72 :doc: overview
73
74Legacy CRTC/Modeset Helper Functions Reference
75==============================================
76
77.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
78 :export:
79
80.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
81 :doc: overview
82
83Output Probing Helper Functions Reference
84=========================================
85
86.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
87 :doc: output probing helper overview
88
89.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
90 :export:
91
92fbdev Helper Functions Reference
93================================
94
95.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
96 :doc: fbdev helpers
97
98.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
99 :export:
100
101.. kernel-doc:: include/drm/drm_fb_helper.h
102 :internal:
103
104Framebuffer CMA Helper Functions Reference
105==========================================
106
107.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
108 :doc: framebuffer cma helper functions
109
110.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
111 :export:
112
113Display Port Helper Functions Reference
114=======================================
115
116.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
117 :doc: dp helpers
118
119.. kernel-doc:: include/drm/drm_dp_helper.h
120 :internal:
121
122.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
123 :export:
124
125Display Port Dual Mode Adaptor Helper Functions Reference
126=========================================================
127
128.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
129 :doc: dp dual mode helpers
130
131.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
132 :internal:
133
134.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
135 :export:
136
137Display Port MST Helper Functions Reference
138===========================================
139
140.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
141 :doc: dp mst helper
142
143.. kernel-doc:: include/drm/drm_dp_mst_helper.h
144 :internal:
145
146.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
147 :export:
148
149MIPI DSI Helper Functions Reference
150===================================
151
152.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
153 :doc: dsi helpers
154
155.. kernel-doc:: include/drm/drm_mipi_dsi.h
156 :internal:
157
158.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
159 :export:
160
161EDID Helper Functions Reference
162===============================
163
164.. kernel-doc:: drivers/gpu/drm/drm_edid.c
165 :export:
166
167Rectangle Utilities Reference
168=============================
169
170.. kernel-doc:: include/drm/drm_rect.h
171 :doc: rect utils
172
173.. kernel-doc:: include/drm/drm_rect.h
174 :internal:
175
176.. kernel-doc:: drivers/gpu/drm/drm_rect.c
177 :export:
178
179Flip-work Helper Reference
180==========================
181
182.. kernel-doc:: include/drm/drm_flip_work.h
183 :doc: flip utils
184
185.. kernel-doc:: include/drm/drm_flip_work.h
186 :internal:
187
188.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
189 :export:
190
191HDMI Infoframes Helper Reference
192================================
193
194Strictly speaking this is not a DRM helper library but generally useable
195by any driver interfacing with HDMI outputs like v4l or alsa drivers.
196But it nicely fits into the overall topic of mode setting helper
197libraries and hence is also included here.
198
199.. kernel-doc:: include/linux/hdmi.h
200 :internal:
201
202.. kernel-doc:: drivers/video/hdmi.c
203 :export:
204
205Plane Helper Reference
206======================
207
208.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
209 :export:
210
211.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
212 :doc: overview
213
214Tile group
215----------
216
217.. kernel-doc:: drivers/gpu/drm/drm_crtc.c
218 :doc: Tile group
219
220Bridges
221=======
222
223Overview
224--------
225
226.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
227 :doc: overview
228
229Default bridge callback sequence
230--------------------------------
231
232.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
233 :doc: bridge callbacks
234
235.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
236 :export:
237
238Panel Helper Reference
239======================
240
241.. kernel-doc:: include/drm/drm_panel.h
242 :internal:
243
244.. kernel-doc:: drivers/gpu/drm/drm_panel.c
245 :export:
246
247.. kernel-doc:: drivers/gpu/drm/drm_panel.c
248 :doc: drm panel
249
250Simple KMS Helper Reference
251===========================
252
253.. kernel-doc:: include/drm/drm_simple_kms_helper.h
254 :internal:
255
256.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
257 :export:
258
259.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
260 :doc: overview