display-contributing.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. .. _display_todos:
  2. ==============================
  3. AMDGPU - Display Contributions
  4. ==============================
  5. First of all, if you are here, you probably want to give some technical
  6. contribution to the display code, and for that, we say thank you :)
  7. This page summarizes some of the issues you can help with; keep in mind that
  8. this is a static page, and it is always a good idea to try to reach developers
  9. in the amdgfx or some of the maintainers. Finally, this page follows the DRM
  10. way of creating a TODO list; for more information, check
  11. 'Documentation/gpu/todo.rst'.
  12. Gitlab issues
  13. =============
  14. Users can report issues associated with AMD GPUs at:
  15. - https://gitlab.freedesktop.org/drm/amd
  16. Usually, we try to add a proper label to all new tickets to make it easy to
  17. filter issues. If you can reproduce any problem, you could help by adding more
  18. information or fixing the issue.
  19. Level: diverse
  20. IGT
  21. ===
  22. `IGT`_ provides many integration tests that can be run on your GPU. We always
  23. want to pass a large set of tests to increase the test coverage in our CI. If
  24. you wish to contribute to the display code but are unsure where a good place
  25. is, we recommend you run all IGT tests and try to fix any failure you see in
  26. your hardware. Keep in mind that this failure can be an IGT problem or a kernel
  27. issue; it is necessary to analyze case-by-case.
  28. Level: diverse
  29. .. _IGT: https://gitlab.freedesktop.org/drm/igt-gpu-tools
  30. Compilation
  31. ===========
  32. Fix compilation warnings
  33. ------------------------
  34. Enable the W1 or W2 warning level in the kernel compilation and try to fix the
  35. issues on the display side.
  36. Level: Starter
  37. Fix compilation issues when using um architecture
  38. -------------------------------------------------
  39. Linux has a User-mode Linux (UML) feature, and the kernel can be compiled to
  40. the **um** architecture. Compiling for **um** can bring multiple advantages
  41. from the test perspective. We currently have some compilation issues in this
  42. area that we need to fix.
  43. Level: Intermediate
  44. Code Refactor
  45. =============
  46. Add prefix to DC functions to improve the debug with ftrace
  47. -----------------------------------------------------------
  48. The Ftrace debug feature (check 'Documentation/trace/ftrace.rst') is a
  49. fantastic way to check the code path when developers try to make sense of a
  50. bug. Ftrace provides a filter mechanism that can be useful when the developer
  51. has some hunch of which part of the code can cause the issue; for this reason,
  52. if a set of functions has a proper prefix, it becomes easy to create a good
  53. filter. Additionally, prefixes can improve stack trace readability.
  54. The DC code does not follow some prefix rules, which makes the Ftrace filter
  55. more complicated and reduces the readability of the stack trace. If you want
  56. something simple to start contributing to the display, you can make patches for
  57. adding prefixes to DC functions. To create those prefixes, use part of the file
  58. name as a prefix for all functions in the target file. Check the
  59. 'amdgpu_dm_crtc.c` and `amdgpu_dm_plane.c` for some references. However, we
  60. strongly advise not to send huge patches changing these prefixes; otherwise, it
  61. will be hard to review and test, which can generate second thoughts from
  62. maintainers. Try small steps; in case of double, you can ask before you put in
  63. effort. We recommend first looking at folders like dceXYZ, dcnXYZ, basics,
  64. bios, core, clk_mgr, hwss, resource, and irq.
  65. Level: Starter
  66. Reduce code duplication
  67. -----------------------
  68. AMD has an extensive portfolio with various dGPUs and APUs that amdgpu
  69. supports. To maintain the new hardware release cadence, DCE/DCN was designed in
  70. a modular design, making the bring-up for new hardware fast. Over the years,
  71. amdgpu accumulated some technical debt in the code duplication area. For this
  72. task, it would be a good idea to find a tool that can discover code duplication
  73. (including patterns) and use it as guidance to reduce duplications.
  74. Level: Intermediate
  75. Make atomic_commit_[check|tail] more readable
  76. ---------------------------------------------
  77. The functions responsible for atomic commit and tail are intricate and
  78. extensive. In particular `amdgpu_dm_atomic_commit_tail` is a long function and
  79. could benefit from being split into smaller helpers. Improvements in this area
  80. are more than welcome, but keep in mind that changes in this area will affect
  81. all ASICs, meaning that refactoring requires a comprehensive verification; in
  82. other words, this effort can take some time for validation.
  83. Level: Advanced
  84. Documentation
  85. =============
  86. Expand kernel-doc
  87. -----------------
  88. Many DC functions do not have a proper kernel-doc; understanding a function and
  89. adding documentation is a great way to learn more about the amdgpu driver and
  90. also leave an outstanding contribution to the entire community.
  91. Level: Starter
  92. Beyond AMDGPU
  93. =============
  94. AMDGPU provides features that are not yet enabled in the userspace. This
  95. section highlights some of the coolest display features, which could be enabled
  96. with the userspace developer helper.
  97. Enable underlay
  98. ---------------
  99. AMD display has this feature called underlay (which you can read more about at
  100. 'Documentation/gpu/amdgpu/display/mpo-overview.rst') which is intended to
  101. save power when playing a video. The basic idea is to put a video in the
  102. underlay plane at the bottom and the desktop in the plane above it with a hole
  103. in the video area. This feature is enabled in ChromeOS, and from our data
  104. measurement, it can save power.
  105. Level: Unknown
  106. Adaptive Backlight Modulation (ABM)
  107. -----------------------------------
  108. ABM is a feature that adjusts the display panel's backlight level and pixel
  109. values depending on the displayed image. This power-saving feature can be very
  110. useful when the system starts to run off battery; since this will impact the
  111. display output fidelity, it would be good if this option was something that
  112. users could turn on or off.
  113. Level: Unknown
  114. HDR & Color management & VRR
  115. ----------------------------
  116. HDR, Color Management, and VRR are huge topics and it's hard to put these into
  117. concise ToDos. If you are interested in this topic, we recommend checking some
  118. blog posts from the community developers to better understand some of the
  119. specific challenges and people working on the subject. If anyone wants to work
  120. on some particular part, we can try to help with some basic guidance. Finally,
  121. keep in mind that we already have some kernel-doc in place for those areas.
  122. Level: Unknown