AMDGPU - Display Contributions¶
First of all, if you are here, you probably want to give some technicalcontribution to the display code, and for that, we say thank you :)
This page summarizes some of the issues you can help with; keep in mind thatthis is a static page, and it is always a good idea to try to reach developerson the amd-gfx mailing list or some of the maintainers. Finally, this pagefollows the DRM way of creating a TODO list; for more information, check‘TODO list’.
Gitlab issues¶
Users can report issues associated with AMD GPUs at:
Usually, we try to add a proper label to all new tickets to make it easy tofilter issues. If you can reproduce any problem, you could help by adding moreinformation or fixing the issue.
Level: diverse
IGT¶
IGT provides many integration tests that can be run on your GPU. We alwayswant to pass a large set of tests to increase the test coverage in our CI. Ifyou wish to contribute to the display code but are unsure where a good placeis, we recommend you run all IGT tests and try to fix any failure you see inyour hardware. Keep in mind that this failure can be an IGT problem or a kernelissue; it is necessary to analyze case-by-case.
Level: diverse
Compilation¶
Fix compilation warnings¶
Enable the W1 or W2 warning level in the kernel compilation and try to fix theissues on the display side.
Level: Starter
Fix compilation issues when using um architecture¶
Linux has a User-mode Linux (UML) feature, and the kernel can be compiled totheum architecture. Compiling forum can bring multiple advantagesfrom the test perspective. We currently have some compilation issues in thisarea that we need to fix.
Level: Intermediate
Code Refactor¶
Add prefix to DC functions to improve the debug with ftrace¶
The Ftrace debug feature (check ‘ftrace - Function Tracer’) is afantastic way to check the code path when developers try to make sense of abug. Ftrace provides a filter mechanism that can be useful when the developerhas some hunch of which part of the code can cause the issue; for this reason,if a set of functions has a proper prefix, it becomes easy to create a goodfilter. Additionally, prefixes can improve stack trace readability.
The DC code does not follow some prefix rules, which makes the Ftrace filtermore complicated and reduces the readability of the stack trace. If you wantsomething simple to start contributing to the display, you can make patches foradding prefixes to DC functions. To create those prefixes, use part of the filename as a prefix for all functions in the target file. Check the‘amdgpu_dm_crtc.c` andamdgpu_dm_plane.c for some references. However, westrongly advise not to send huge patches changing these prefixes; otherwise, itwill be hard to review and test, which can generate second thoughts frommaintainers. Try small steps; in case of double, you can ask before you put ineffort. We recommend first looking at folders like dceXYZ, dcnXYZ, basics,bios, core, clk_mgr, hwss, resource, and irq.
Level: Starter
Reduce code duplication¶
AMD has an extensive portfolio with various dGPUs and APUs that amdgpusupports. To maintain the new hardware release cadence, DCE/DCN was designed ina modular design, making the bring-up for new hardware fast. Over the years,amdgpu accumulated some technical debt in the code duplication area. For thistask, it would be a good idea to find a tool that can discover code duplication(including patterns) and use it as guidance to reduce duplications.
Level: Intermediate
Make atomic_commit_[check|tail] more readable¶
The functions responsible for atomic commit and tail are intricate andextensive. In particularamdgpu_dm_atomic_commit_tail is a long function andcould benefit from being split into smaller helpers. Improvements in this areaare more than welcome, but keep in mind that changes in this area will affectall ASICs, meaning that refactoring requires a comprehensive verification; inother words, this effort can take some time for validation.
Level: Advanced
Documentation¶
Expand kernel-doc¶
Many DC functions do not have a proper kernel-doc; understanding a function andadding documentation is a great way to learn more about the amdgpu driver andalso leave an outstanding contribution to the entire community.
Level: Starter
Beyond AMDGPU¶
AMDGPU provides features that are not yet enabled in the userspace. Thissection highlights some of the coolest display features, which could be enabledwith the userspace developer helper.
Enable underlay¶
AMD display has this feature called underlay (which you can read more about at‘Multiplane Overlay (MPO)’) which is intended tosave power when playing a video. The basic idea is to put a video in theunderlay plane at the bottom and the desktop in the plane above it with a holein the video area. This feature is enabled in ChromeOS, and from our datameasurement, it can save power.
Level: Unknown
Adaptive Backlight Modulation (ABM)¶
ABM is a feature that adjusts the display panel’s backlight level and pixelvalues depending on the displayed image. This power-saving feature can be veryuseful when the system starts to run off battery; since this will impact thedisplay output fidelity, it would be good if this option was something thatusers could turn on or off.
Level: Unknown
HDR & Color management & VRR¶
HDR, Color Management, and VRR are huge topics and it’s hard to put these intoconcise ToDos. If you are interested in this topic, we recommend checking someblog posts from the community developers to better understand some of thespecific challenges and people working on the subject. If anyone wants to workon some particular part, we can try to help with some basic guidance. Finally,keep in mind that we already have some kernel-doc in place for those areas.
Level: Unknown