Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 1 | ============================= |
| 2 | Mode Setting Helper Functions |
| 3 | ============================= |
| 4 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 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 |
| 10 | needed. |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 11 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 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. |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 16 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 17 | There are a few areas these helpers can grouped into: |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 18 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 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. |
| 24 | |
| 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 |
| 30 | EDIDs. |
| 31 | |
| 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. |
| 35 | |
| 36 | Modeset Helper Reference for Common Vtables |
| 37 | =========================================== |
| 38 | |
| 39 | .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h |
| 40 | :internal: |
| 41 | |
| 42 | .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h |
| 43 | :doc: overview |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 44 | |
| 45 | Atomic Modeset Helper Functions Reference |
| 46 | ========================================= |
| 47 | |
| 48 | Overview |
| 49 | -------- |
| 50 | |
| 51 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 52 | :doc: overview |
| 53 | |
| 54 | Implementing Asynchronous Atomic Commit |
| 55 | --------------------------------------- |
| 56 | |
| 57 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 58 | :doc: implementing nonblocking commit |
| 59 | |
| 60 | Atomic State Reset and Initialization |
| 61 | ------------------------------------- |
| 62 | |
| 63 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 64 | :doc: atomic state reset and initialization |
| 65 | |
| 66 | .. kernel-doc:: include/drm/drm_atomic_helper.h |
| 67 | :internal: |
| 68 | |
| 69 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 70 | :export: |
| 71 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 72 | Legacy CRTC/Modeset Helper Functions Reference |
| 73 | ============================================== |
| 74 | |
| 75 | .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 76 | :doc: overview |
| 77 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 78 | .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 79 | :export: |
| 80 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 81 | Simple KMS Helper Reference |
| 82 | =========================== |
| 83 | |
| 84 | .. kernel-doc:: include/drm/drm_simple_kms_helper.h |
| 85 | :internal: |
| 86 | |
| 87 | .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c |
| 88 | :export: |
| 89 | |
| 90 | .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c |
| 91 | :doc: overview |
| 92 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 93 | fbdev Helper Functions Reference |
| 94 | ================================ |
| 95 | |
| 96 | .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c |
| 97 | :doc: fbdev helpers |
| 98 | |
| 99 | .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c |
| 100 | :export: |
| 101 | |
| 102 | .. kernel-doc:: include/drm/drm_fb_helper.h |
| 103 | :internal: |
| 104 | |
| 105 | Framebuffer CMA Helper Functions Reference |
| 106 | ========================================== |
| 107 | |
| 108 | .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c |
| 109 | :doc: framebuffer cma helper functions |
| 110 | |
| 111 | .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c |
| 112 | :export: |
| 113 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 114 | Bridges |
| 115 | ======= |
| 116 | |
| 117 | Overview |
| 118 | -------- |
| 119 | |
| 120 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 121 | :doc: overview |
| 122 | |
| 123 | Default bridge callback sequence |
| 124 | -------------------------------- |
| 125 | |
| 126 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 127 | :doc: bridge callbacks |
| 128 | |
Daniel Vetter | 199e4e9 | 2016-08-31 18:09:05 +0200 | [diff] [blame] | 129 | |
| 130 | Bridge Helper Reference |
| 131 | ------------------------- |
| 132 | |
| 133 | .. kernel-doc:: include/drm/drm_bridge.h |
| 134 | :internal: |
| 135 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 136 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 137 | :export: |
| 138 | |
| 139 | Panel Helper Reference |
| 140 | ====================== |
| 141 | |
| 142 | .. kernel-doc:: include/drm/drm_panel.h |
| 143 | :internal: |
| 144 | |
| 145 | .. kernel-doc:: drivers/gpu/drm/drm_panel.c |
| 146 | :export: |
| 147 | |
| 148 | .. kernel-doc:: drivers/gpu/drm/drm_panel.c |
| 149 | :doc: drm panel |
| 150 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 151 | Display Port Helper Functions Reference |
| 152 | ======================================= |
| 153 | |
| 154 | .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c |
| 155 | :doc: dp helpers |
| 156 | |
| 157 | .. kernel-doc:: include/drm/drm_dp_helper.h |
| 158 | :internal: |
| 159 | |
| 160 | .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c |
| 161 | :export: |
| 162 | |
| 163 | Display Port Dual Mode Adaptor Helper Functions Reference |
| 164 | ========================================================= |
| 165 | |
| 166 | .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c |
| 167 | :doc: dp dual mode helpers |
| 168 | |
| 169 | .. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h |
| 170 | :internal: |
| 171 | |
| 172 | .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c |
| 173 | :export: |
| 174 | |
| 175 | Display Port MST Helper Functions Reference |
| 176 | =========================================== |
| 177 | |
| 178 | .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c |
| 179 | :doc: dp mst helper |
| 180 | |
| 181 | .. kernel-doc:: include/drm/drm_dp_mst_helper.h |
| 182 | :internal: |
| 183 | |
| 184 | .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c |
| 185 | :export: |
| 186 | |
| 187 | MIPI DSI Helper Functions Reference |
| 188 | =================================== |
| 189 | |
| 190 | .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c |
| 191 | :doc: dsi helpers |
| 192 | |
| 193 | .. kernel-doc:: include/drm/drm_mipi_dsi.h |
| 194 | :internal: |
| 195 | |
| 196 | .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c |
| 197 | :export: |
| 198 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 199 | Output Probing Helper Functions Reference |
| 200 | ========================================= |
| 201 | |
| 202 | .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c |
| 203 | :doc: output probing helper overview |
| 204 | |
| 205 | .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c |
| 206 | :export: |
| 207 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 208 | EDID Helper Functions Reference |
| 209 | =============================== |
| 210 | |
Daniel Vetter | cdc3d09 | 2016-08-31 18:09:06 +0200 | [diff] [blame] | 211 | .. kernel-doc:: include/drm/drm_edid.h |
| 212 | :internal: |
| 213 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 214 | .. kernel-doc:: drivers/gpu/drm/drm_edid.c |
| 215 | :export: |
| 216 | |
| 217 | Rectangle Utilities Reference |
| 218 | ============================= |
| 219 | |
| 220 | .. kernel-doc:: include/drm/drm_rect.h |
| 221 | :doc: rect utils |
| 222 | |
| 223 | .. kernel-doc:: include/drm/drm_rect.h |
| 224 | :internal: |
| 225 | |
| 226 | .. kernel-doc:: drivers/gpu/drm/drm_rect.c |
| 227 | :export: |
| 228 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 229 | HDMI Infoframes Helper Reference |
| 230 | ================================ |
| 231 | |
| 232 | Strictly speaking this is not a DRM helper library but generally useable |
| 233 | by any driver interfacing with HDMI outputs like v4l or alsa drivers. |
| 234 | But it nicely fits into the overall topic of mode setting helper |
| 235 | libraries and hence is also included here. |
| 236 | |
| 237 | .. kernel-doc:: include/linux/hdmi.h |
| 238 | :internal: |
| 239 | |
| 240 | .. kernel-doc:: drivers/video/hdmi.c |
| 241 | :export: |
| 242 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 243 | Flip-work Helper Reference |
| 244 | ========================== |
| 245 | |
| 246 | .. kernel-doc:: include/drm/drm_flip_work.h |
| 247 | :doc: flip utils |
| 248 | |
| 249 | .. kernel-doc:: include/drm/drm_flip_work.h |
| 250 | :internal: |
| 251 | |
| 252 | .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c |
| 253 | :export: |
| 254 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 255 | Plane Helper Reference |
| 256 | ====================== |
| 257 | |
| 258 | .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 259 | :doc: overview |
| 260 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 261 | .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c |
| 262 | :export: |
| 263 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 264 | Tile group |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 265 | ========== |
| 266 | |
| 267 | # FIXME: This should probably be moved into a property documentation section |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 268 | |
| 269 | .. kernel-doc:: drivers/gpu/drm/drm_crtc.c |
| 270 | :doc: Tile group |
Daniel Vetter | 1de72fa | 2016-08-12 22:48:39 +0200 | [diff] [blame] | 271 | |
| 272 | Auxiliary Modeset Helpers |
| 273 | ========================= |
| 274 | |
| 275 | .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c |
| 276 | :doc: aux kms helpers |
| 277 | |
| 278 | .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c |
| 279 | :export: |