Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 1 | ============================= |
| 2 | Mode Setting Helper Functions |
| 3 | ============================= |
| 4 | |
| 5 | The plane, CRTC, encoder and connector functions provided by the drivers |
| 6 | implement the DRM API. They're called by the DRM core and ioctl handlers |
| 7 | to handle device state changes and configuration request. As |
| 8 | implementing those functions often requires logic not specific to |
| 9 | drivers, mid-layer helper functions are available to avoid duplicating |
| 10 | boilerplate code. |
| 11 | |
| 12 | The DRM core contains one mid-layer implementation. The mid-layer |
| 13 | provides implementations of several plane, CRTC, encoder and connector |
| 14 | functions (called from the top of the mid-layer) that pre-process |
| 15 | requests and call lower-level functions provided by the driver (at the |
| 16 | bottom of the mid-layer). For instance, the |
| 17 | :c:func:`drm_crtc_helper_set_config()` function can be used to |
| 18 | fill the :c:type:`struct drm_crtc_funcs <drm_crtc_funcs>` |
| 19 | set_config field. When called, it will split the set_config operation |
| 20 | in smaller, simpler operations and call the driver to handle them. |
| 21 | |
| 22 | To 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 |
| 26 | mid-layer bottom operations handlers, and fill the :c:type:`struct |
| 27 | drm_crtc_funcs <drm_crtc_funcs>`, :c:type:`struct |
| 28 | drm_encoder_funcs <drm_encoder_funcs>` and :c:type:`struct |
| 29 | drm_connector_funcs <drm_connector_funcs>` structures with |
| 30 | pointers to the mid-layer top API functions. Installing the mid-layer |
| 31 | bottom operation handlers is best done right after registering the |
| 32 | corresponding KMS object. |
| 33 | |
| 34 | The mid-layer is not split between CRTC, encoder and connector |
| 35 | operations. To use it, a driver must provide bottom functions for all of |
| 36 | the three KMS entities. |
| 37 | |
| 38 | Atomic Modeset Helper Functions Reference |
| 39 | ========================================= |
| 40 | |
| 41 | Overview |
| 42 | -------- |
| 43 | |
| 44 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 45 | :doc: overview |
| 46 | |
| 47 | Implementing Asynchronous Atomic Commit |
| 48 | --------------------------------------- |
| 49 | |
| 50 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 51 | :doc: implementing nonblocking commit |
| 52 | |
| 53 | Atomic 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 | |
| 65 | Modeset 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 | |
| 74 | Legacy 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 | |
| 83 | Output 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 | |
| 92 | fbdev 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 | |
| 104 | Framebuffer 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 | |
| 113 | Display 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 | |
| 125 | Display 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 | |
| 137 | Display 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 | |
| 149 | MIPI 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 | |
| 161 | EDID Helper Functions Reference |
| 162 | =============================== |
| 163 | |
| 164 | .. kernel-doc:: drivers/gpu/drm/drm_edid.c |
| 165 | :export: |
| 166 | |
| 167 | Rectangle 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 | |
| 179 | Flip-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 | |
| 191 | HDMI Infoframes Helper Reference |
| 192 | ================================ |
| 193 | |
| 194 | Strictly speaking this is not a DRM helper library but generally useable |
| 195 | by any driver interfacing with HDMI outputs like v4l or alsa drivers. |
| 196 | But it nicely fits into the overall topic of mode setting helper |
| 197 | libraries 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 | |
| 205 | Plane 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 | |
| 214 | Tile group |
| 215 | ---------- |
| 216 | |
| 217 | .. kernel-doc:: drivers/gpu/drm/drm_crtc.c |
| 218 | :doc: Tile group |
| 219 | |
| 220 | Bridges |
| 221 | ======= |
| 222 | |
| 223 | Overview |
| 224 | -------- |
| 225 | |
| 226 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 227 | :doc: overview |
| 228 | |
| 229 | Default 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 | |
| 238 | Panel 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 | |
| 250 | Simple 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 |