169 lines · plain
1.. _display_todos:2 3==============================4AMDGPU - Display Contributions5==============================6 7First of all, if you are here, you probably want to give some technical8contribution to the display code, and for that, we say thank you :)9 10This page summarizes some of the issues you can help with; keep in mind that11this is a static page, and it is always a good idea to try to reach developers12in the amdgfx or some of the maintainers. Finally, this page follows the DRM13way of creating a TODO list; for more information, check14'Documentation/gpu/todo.rst'.15 16Gitlab issues17=============18 19Users can report issues associated with AMD GPUs at:20 21- https://gitlab.freedesktop.org/drm/amd22 23Usually, we try to add a proper label to all new tickets to make it easy to24filter issues. If you can reproduce any problem, you could help by adding more25information or fixing the issue.26 27Level: diverse28 29IGT30===31 32`IGT`_ provides many integration tests that can be run on your GPU. We always33want to pass a large set of tests to increase the test coverage in our CI. If34you wish to contribute to the display code but are unsure where a good place35is, we recommend you run all IGT tests and try to fix any failure you see in36your hardware. Keep in mind that this failure can be an IGT problem or a kernel37issue; it is necessary to analyze case-by-case.38 39Level: diverse40 41.. _IGT: https://gitlab.freedesktop.org/drm/igt-gpu-tools42 43Compilation44===========45 46Fix compilation warnings47------------------------48 49Enable the W1 or W2 warning level in the kernel compilation and try to fix the50issues on the display side.51 52Level: Starter53 54Fix compilation issues when using um architecture55-------------------------------------------------56 57Linux has a User-mode Linux (UML) feature, and the kernel can be compiled to58the **um** architecture. Compiling for **um** can bring multiple advantages59from the test perspective. We currently have some compilation issues in this60area that we need to fix.61 62Level: Intermediate63 64Code Refactor65=============66 67Add prefix to DC functions to improve the debug with ftrace68-----------------------------------------------------------69 70The Ftrace debug feature (check 'Documentation/trace/ftrace.rst') is a71fantastic way to check the code path when developers try to make sense of a72bug. Ftrace provides a filter mechanism that can be useful when the developer73has some hunch of which part of the code can cause the issue; for this reason,74if a set of functions has a proper prefix, it becomes easy to create a good75filter. Additionally, prefixes can improve stack trace readability.76 77The DC code does not follow some prefix rules, which makes the Ftrace filter78more complicated and reduces the readability of the stack trace. If you want79something simple to start contributing to the display, you can make patches for80adding prefixes to DC functions. To create those prefixes, use part of the file81name as a prefix for all functions in the target file. Check the82'amdgpu_dm_crtc.c` and `amdgpu_dm_plane.c` for some references. However, we83strongly advise not to send huge patches changing these prefixes; otherwise, it84will be hard to review and test, which can generate second thoughts from85maintainers. Try small steps; in case of double, you can ask before you put in86effort. We recommend first looking at folders like dceXYZ, dcnXYZ, basics,87bios, core, clk_mgr, hwss, resource, and irq.88 89Level: Starter90 91Reduce code duplication92-----------------------93 94AMD has an extensive portfolio with various dGPUs and APUs that amdgpu95supports. To maintain the new hardware release cadence, DCE/DCN was designed in96a modular design, making the bring-up for new hardware fast. Over the years,97amdgpu accumulated some technical debt in the code duplication area. For this98task, it would be a good idea to find a tool that can discover code duplication99(including patterns) and use it as guidance to reduce duplications.100 101Level: Intermediate102 103Make atomic_commit_[check|tail] more readable104---------------------------------------------105 106The functions responsible for atomic commit and tail are intricate and107extensive. In particular `amdgpu_dm_atomic_commit_tail` is a long function and108could benefit from being split into smaller helpers. Improvements in this area109are more than welcome, but keep in mind that changes in this area will affect110all ASICs, meaning that refactoring requires a comprehensive verification; in111other words, this effort can take some time for validation.112 113Level: Advanced114 115Documentation116=============117 118Expand kernel-doc119-----------------120 121Many DC functions do not have a proper kernel-doc; understanding a function and122adding documentation is a great way to learn more about the amdgpu driver and123also leave an outstanding contribution to the entire community.124 125Level: Starter126 127Beyond AMDGPU128=============129 130AMDGPU provides features that are not yet enabled in the userspace. This131section highlights some of the coolest display features, which could be enabled132with the userspace developer helper.133 134Enable underlay135---------------136 137AMD display has this feature called underlay (which you can read more about at138'Documentation/gpu/amdgpu/display/mpo-overview.rst') which is intended to139save power when playing a video. The basic idea is to put a video in the140underlay plane at the bottom and the desktop in the plane above it with a hole141in the video area. This feature is enabled in ChromeOS, and from our data142measurement, it can save power.143 144Level: Unknown145 146Adaptive Backlight Modulation (ABM)147-----------------------------------148 149ABM is a feature that adjusts the display panel's backlight level and pixel150values depending on the displayed image. This power-saving feature can be very151useful when the system starts to run off battery; since this will impact the152display output fidelity, it would be good if this option was something that153users could turn on or off.154 155Level: Unknown156 157 158HDR & Color management & VRR159----------------------------160 161HDR, Color Management, and VRR are huge topics and it's hard to put these into162concise ToDos. If you are interested in this topic, we recommend checking some163blog posts from the community developers to better understand some of the164specific challenges and people working on the subject. If anyone wants to work165on some particular part, we can try to help with some basic guidance. Finally,166keep in mind that we already have some kernel-doc in place for those areas.167 168Level: Unknown169