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 |
Daniel Vetter | 1ea3576 | 2017-03-02 16:16:36 +0100 | [diff] [blame] | 40 | :doc: overview |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 41 | |
| 42 | .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h |
Daniel Vetter | 1ea3576 | 2017-03-02 16:16:36 +0100 | [diff] [blame] | 43 | :internal: |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 44 | |
Daniel Vetter | 4a8e229 | 2017-03-02 16:16:38 +0100 | [diff] [blame] | 45 | .. _drm_atomic_helper: |
| 46 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 47 | Atomic Modeset Helper Functions Reference |
| 48 | ========================================= |
| 49 | |
| 50 | Overview |
| 51 | -------- |
| 52 | |
| 53 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 54 | :doc: overview |
| 55 | |
| 56 | Implementing Asynchronous Atomic Commit |
| 57 | --------------------------------------- |
| 58 | |
| 59 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 60 | :doc: implementing nonblocking commit |
| 61 | |
| 62 | Atomic State Reset and Initialization |
| 63 | ------------------------------------- |
| 64 | |
| 65 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 66 | :doc: atomic state reset and initialization |
| 67 | |
Daniel Vetter | 1ea0c02 | 2016-11-21 18:18:02 +0100 | [diff] [blame] | 68 | Helper Functions Reference |
| 69 | -------------------------- |
| 70 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 71 | .. kernel-doc:: include/drm/drm_atomic_helper.h |
| 72 | :internal: |
| 73 | |
| 74 | .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c |
| 75 | :export: |
| 76 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 77 | Simple KMS Helper Reference |
| 78 | =========================== |
| 79 | |
Daniel Vetter | 1ea3576 | 2017-03-02 16:16:36 +0100 | [diff] [blame] | 80 | .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c |
| 81 | :doc: overview |
| 82 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 83 | .. kernel-doc:: include/drm/drm_simple_kms_helper.h |
| 84 | :internal: |
| 85 | |
| 86 | .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c |
| 87 | :export: |
| 88 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 89 | fbdev Helper Functions Reference |
| 90 | ================================ |
| 91 | |
| 92 | .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c |
| 93 | :doc: fbdev helpers |
| 94 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 95 | .. kernel-doc:: include/drm/drm_fb_helper.h |
| 96 | :internal: |
| 97 | |
Daniel Vetter | 1ea3576 | 2017-03-02 16:16:36 +0100 | [diff] [blame] | 98 | .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c |
| 99 | :export: |
| 100 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 101 | Framebuffer CMA Helper Functions Reference |
| 102 | ========================================== |
| 103 | |
| 104 | .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c |
| 105 | :doc: framebuffer cma helper functions |
| 106 | |
| 107 | .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c |
| 108 | :export: |
| 109 | |
Daniel Vetter | 2564d0b | 2017-03-02 16:16:35 +0100 | [diff] [blame] | 110 | .. _drm_bridges: |
| 111 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 112 | Bridges |
| 113 | ======= |
| 114 | |
| 115 | Overview |
| 116 | -------- |
| 117 | |
| 118 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 119 | :doc: overview |
| 120 | |
| 121 | Default bridge callback sequence |
| 122 | -------------------------------- |
| 123 | |
| 124 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 125 | :doc: bridge callbacks |
| 126 | |
Daniel Vetter | 199e4e9 | 2016-08-31 18:09:05 +0200 | [diff] [blame] | 127 | |
| 128 | Bridge Helper Reference |
| 129 | ------------------------- |
| 130 | |
| 131 | .. kernel-doc:: include/drm/drm_bridge.h |
| 132 | :internal: |
| 133 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 134 | .. kernel-doc:: drivers/gpu/drm/drm_bridge.c |
| 135 | :export: |
| 136 | |
Eric Anholt | 13dfc05 | 2017-06-02 13:25:14 -0700 | [diff] [blame] | 137 | Panel-Bridge Helper Reference |
| 138 | ----------------------------- |
| 139 | |
| 140 | .. kernel-doc:: drivers/gpu/drm/bridge/panel.c |
| 141 | :export: |
| 142 | |
Daniel Vetter | 2564d0b | 2017-03-02 16:16:35 +0100 | [diff] [blame] | 143 | .. _drm_panel_helper: |
| 144 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 145 | Panel Helper Reference |
| 146 | ====================== |
| 147 | |
Daniel Vetter | 1ea3576 | 2017-03-02 16:16:36 +0100 | [diff] [blame] | 148 | .. kernel-doc:: drivers/gpu/drm/drm_panel.c |
| 149 | :doc: drm panel |
| 150 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 151 | .. kernel-doc:: include/drm/drm_panel.h |
| 152 | :internal: |
| 153 | |
| 154 | .. kernel-doc:: drivers/gpu/drm/drm_panel.c |
| 155 | :export: |
| 156 | |
Hans de Goede | 404d1a3 | 2017-11-25 20:35:48 +0100 | [diff] [blame] | 157 | .. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c |
| 158 | :export: |
| 159 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 160 | Display Port Helper Functions Reference |
| 161 | ======================================= |
| 162 | |
| 163 | .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c |
| 164 | :doc: dp helpers |
| 165 | |
| 166 | .. kernel-doc:: include/drm/drm_dp_helper.h |
| 167 | :internal: |
| 168 | |
| 169 | .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c |
| 170 | :export: |
| 171 | |
Hans Verkuil | d2e2d26 | 2018-07-11 15:29:08 +0200 | [diff] [blame^] | 172 | Display Port CEC Helper Functions Reference |
| 173 | =========================================== |
| 174 | |
| 175 | .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c |
| 176 | :doc: dp cec helpers |
| 177 | |
| 178 | .. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c |
| 179 | :export: |
| 180 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 181 | Display Port Dual Mode Adaptor Helper Functions Reference |
| 182 | ========================================================= |
| 183 | |
| 184 | .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c |
| 185 | :doc: dp dual mode helpers |
| 186 | |
| 187 | .. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h |
| 188 | :internal: |
| 189 | |
| 190 | .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c |
| 191 | :export: |
| 192 | |
| 193 | Display Port MST Helper Functions Reference |
| 194 | =========================================== |
| 195 | |
| 196 | .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c |
| 197 | :doc: dp mst helper |
| 198 | |
| 199 | .. kernel-doc:: include/drm/drm_dp_mst_helper.h |
| 200 | :internal: |
| 201 | |
| 202 | .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c |
| 203 | :export: |
| 204 | |
| 205 | MIPI DSI Helper Functions Reference |
| 206 | =================================== |
| 207 | |
| 208 | .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c |
| 209 | :doc: dsi helpers |
| 210 | |
| 211 | .. kernel-doc:: include/drm/drm_mipi_dsi.h |
| 212 | :internal: |
| 213 | |
| 214 | .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c |
| 215 | :export: |
| 216 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 217 | Output Probing Helper Functions Reference |
| 218 | ========================================= |
| 219 | |
| 220 | .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c |
| 221 | :doc: output probing helper overview |
| 222 | |
| 223 | .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c |
| 224 | :export: |
| 225 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 226 | EDID Helper Functions Reference |
| 227 | =============================== |
| 228 | |
Daniel Vetter | cdc3d09 | 2016-08-31 18:09:06 +0200 | [diff] [blame] | 229 | .. kernel-doc:: include/drm/drm_edid.h |
| 230 | :internal: |
| 231 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 232 | .. kernel-doc:: drivers/gpu/drm/drm_edid.c |
| 233 | :export: |
| 234 | |
Thierry Reding | 3ad33ae | 2017-03-13 16:53:59 +0530 | [diff] [blame] | 235 | SCDC Helper Functions Reference |
| 236 | =============================== |
| 237 | |
| 238 | .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c |
| 239 | :doc: scdc helpers |
| 240 | |
| 241 | .. kernel-doc:: include/drm/drm_scdc_helper.h |
| 242 | :internal: |
| 243 | |
| 244 | .. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c |
| 245 | :export: |
| 246 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 247 | Rectangle Utilities Reference |
| 248 | ============================= |
| 249 | |
| 250 | .. kernel-doc:: include/drm/drm_rect.h |
| 251 | :doc: rect utils |
| 252 | |
| 253 | .. kernel-doc:: include/drm/drm_rect.h |
| 254 | :internal: |
| 255 | |
| 256 | .. kernel-doc:: drivers/gpu/drm/drm_rect.c |
| 257 | :export: |
| 258 | |
Jani Nikula | 2fa91d1 | 2016-06-21 14:49:02 +0300 | [diff] [blame] | 259 | HDMI Infoframes Helper Reference |
| 260 | ================================ |
| 261 | |
| 262 | Strictly speaking this is not a DRM helper library but generally useable |
| 263 | by any driver interfacing with HDMI outputs like v4l or alsa drivers. |
| 264 | But it nicely fits into the overall topic of mode setting helper |
| 265 | libraries and hence is also included here. |
| 266 | |
| 267 | .. kernel-doc:: include/linux/hdmi.h |
| 268 | :internal: |
| 269 | |
| 270 | .. kernel-doc:: drivers/video/hdmi.c |
| 271 | :export: |
| 272 | |
Daniel Vetter | bcb32b6 | 2016-08-12 22:48:38 +0200 | [diff] [blame] | 273 | Flip-work Helper Reference |
| 274 | ========================== |
| 275 | |
| 276 | .. kernel-doc:: include/drm/drm_flip_work.h |
| 277 | :doc: flip utils |
| 278 | |
| 279 | .. kernel-doc:: include/drm/drm_flip_work.h |
| 280 | :internal: |
| 281 | |
| 282 | .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c |
| 283 | :export: |
| 284 | |
Daniel Vetter | 1de72fa | 2016-08-12 22:48:39 +0200 | [diff] [blame] | 285 | Auxiliary Modeset Helpers |
| 286 | ========================= |
| 287 | |
| 288 | .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c |
| 289 | :doc: aux kms helpers |
| 290 | |
| 291 | .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c |
| 292 | :export: |
Noralf Trønnes | 4c3dbb2 | 2017-08-13 15:31:44 +0200 | [diff] [blame] | 293 | |
| 294 | Framebuffer GEM Helper Reference |
| 295 | ================================ |
| 296 | |
| 297 | .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c |
| 298 | :doc: overview |
| 299 | |
| 300 | .. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c |
| 301 | :export: |
Daniel Vetter | 5fca5ec | 2017-12-14 21:30:54 +0100 | [diff] [blame] | 302 | |
| 303 | Legacy Plane Helper Reference |
| 304 | ============================= |
| 305 | |
| 306 | .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c |
| 307 | :doc: overview |
| 308 | |
| 309 | .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c |
| 310 | :export: |
| 311 | |
| 312 | Legacy CRTC/Modeset Helper Functions Reference |
| 313 | ============================================== |
| 314 | |
| 315 | .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c |
| 316 | :doc: overview |
| 317 | |
| 318 | .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c |
| 319 | :export: |