drm-kms-helpers.rst 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. =============================
  2. Mode Setting Helper Functions
  3. =============================
  4. The DRM subsystem aims for a strong separation between core code and helper
  5. libraries. Core code takes care of general setup and teardown and decoding
  6. userspace requests to kernel internal objects. Everything else is handled by a
  7. large set of helper libraries, which can be combined freely to pick and choose
  8. for each driver what fits, and avoid shared code where special behaviour is
  9. needed.
  10. This distinction between core code and helpers is especially strong in the
  11. modesetting code, where there's a shared userspace ABI for all drivers. This is
  12. in contrast to the render side, where pretty much everything (with very few
  13. exceptions) can be considered optional helper code.
  14. There are a few areas these helpers can grouped into:
  15. * Helpers to implement modesetting. The important ones here are the atomic
  16. helpers. Old drivers still often use the legacy CRTC helpers. They both share
  17. the same set of common helper vtables. For really simple drivers (anything
  18. that would have been a great fit in the deprecated fbdev subsystem) there's
  19. also the simple display pipe helpers.
  20. * There's a big pile of helpers for handling outputs. First the generic bridge
  21. helpers for handling encoder and transcoder IP blocks. Second the panel helpers
  22. for handling panel-related information and logic. Plus then a big set of
  23. helpers for the various sink standards (DisplayPort, HDMI, MIPI DSI). Finally
  24. there's also generic helpers for handling output probing, and for dealing with
  25. EDIDs.
  26. * The last group of helpers concerns itself with the frontend side of a display
  27. pipeline: Planes, handling rectangles for visibility checking and scissoring,
  28. flip queues and assorted bits.
  29. Modeset Helper Reference for Common Vtables
  30. ===========================================
  31. .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
  32. :internal:
  33. .. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
  34. :doc: overview
  35. Atomic Modeset Helper Functions Reference
  36. =========================================
  37. Overview
  38. --------
  39. .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
  40. :doc: overview
  41. Implementing Asynchronous Atomic Commit
  42. ---------------------------------------
  43. .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
  44. :doc: implementing nonblocking commit
  45. Atomic State Reset and Initialization
  46. -------------------------------------
  47. .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
  48. :doc: atomic state reset and initialization
  49. .. kernel-doc:: include/drm/drm_atomic_helper.h
  50. :internal:
  51. .. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
  52. :export:
  53. Legacy CRTC/Modeset Helper Functions Reference
  54. ==============================================
  55. .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
  56. :doc: overview
  57. .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
  58. :export:
  59. Simple KMS Helper Reference
  60. ===========================
  61. .. kernel-doc:: include/drm/drm_simple_kms_helper.h
  62. :internal:
  63. .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
  64. :export:
  65. .. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
  66. :doc: overview
  67. fbdev Helper Functions Reference
  68. ================================
  69. .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
  70. :doc: fbdev helpers
  71. .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
  72. :export:
  73. .. kernel-doc:: include/drm/drm_fb_helper.h
  74. :internal:
  75. Framebuffer CMA Helper Functions Reference
  76. ==========================================
  77. .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
  78. :doc: framebuffer cma helper functions
  79. .. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
  80. :export:
  81. Bridges
  82. =======
  83. Overview
  84. --------
  85. .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
  86. :doc: overview
  87. Default bridge callback sequence
  88. --------------------------------
  89. .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
  90. :doc: bridge callbacks
  91. Bridge Helper Reference
  92. -------------------------
  93. .. kernel-doc:: include/drm/drm_bridge.h
  94. :internal:
  95. .. kernel-doc:: drivers/gpu/drm/drm_bridge.c
  96. :export:
  97. Panel Helper Reference
  98. ======================
  99. .. kernel-doc:: include/drm/drm_panel.h
  100. :internal:
  101. .. kernel-doc:: drivers/gpu/drm/drm_panel.c
  102. :export:
  103. .. kernel-doc:: drivers/gpu/drm/drm_panel.c
  104. :doc: drm panel
  105. Display Port Helper Functions Reference
  106. =======================================
  107. .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
  108. :doc: dp helpers
  109. .. kernel-doc:: include/drm/drm_dp_helper.h
  110. :internal:
  111. .. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
  112. :export:
  113. Display Port Dual Mode Adaptor Helper Functions Reference
  114. =========================================================
  115. .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
  116. :doc: dp dual mode helpers
  117. .. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
  118. :internal:
  119. .. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
  120. :export:
  121. Display Port MST Helper Functions Reference
  122. ===========================================
  123. .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
  124. :doc: dp mst helper
  125. .. kernel-doc:: include/drm/drm_dp_mst_helper.h
  126. :internal:
  127. .. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
  128. :export:
  129. MIPI DSI Helper Functions Reference
  130. ===================================
  131. .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
  132. :doc: dsi helpers
  133. .. kernel-doc:: include/drm/drm_mipi_dsi.h
  134. :internal:
  135. .. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
  136. :export:
  137. Output Probing Helper Functions Reference
  138. =========================================
  139. .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
  140. :doc: output probing helper overview
  141. .. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
  142. :export:
  143. EDID Helper Functions Reference
  144. ===============================
  145. .. kernel-doc:: include/drm/drm_edid.h
  146. :internal:
  147. .. kernel-doc:: drivers/gpu/drm/drm_edid.c
  148. :export:
  149. Rectangle Utilities Reference
  150. =============================
  151. .. kernel-doc:: include/drm/drm_rect.h
  152. :doc: rect utils
  153. .. kernel-doc:: include/drm/drm_rect.h
  154. :internal:
  155. .. kernel-doc:: drivers/gpu/drm/drm_rect.c
  156. :export:
  157. HDMI Infoframes Helper Reference
  158. ================================
  159. Strictly speaking this is not a DRM helper library but generally useable
  160. by any driver interfacing with HDMI outputs like v4l or alsa drivers.
  161. But it nicely fits into the overall topic of mode setting helper
  162. libraries and hence is also included here.
  163. .. kernel-doc:: include/linux/hdmi.h
  164. :internal:
  165. .. kernel-doc:: drivers/video/hdmi.c
  166. :export:
  167. Flip-work Helper Reference
  168. ==========================
  169. .. kernel-doc:: include/drm/drm_flip_work.h
  170. :doc: flip utils
  171. .. kernel-doc:: include/drm/drm_flip_work.h
  172. :internal:
  173. .. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
  174. :export:
  175. Plane Helper Reference
  176. ======================
  177. .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
  178. :doc: overview
  179. .. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
  180. :export:
  181. Tile group
  182. ==========
  183. # FIXME: This should probably be moved into a property documentation section
  184. .. kernel-doc:: drivers/gpu/drm/drm_crtc.c
  185. :doc: Tile group
  186. Auxiliary Modeset Helpers
  187. =========================
  188. .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
  189. :doc: aux kms helpers
  190. .. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
  191. :export: