1ba162ae7SRodrigo Siqueira.. _display_todos: 2ba162ae7SRodrigo Siqueira 3ba162ae7SRodrigo Siqueira============================== 4ba162ae7SRodrigo SiqueiraAMDGPU - Display Contributions 5ba162ae7SRodrigo Siqueira============================== 6ba162ae7SRodrigo Siqueira 7ba162ae7SRodrigo SiqueiraFirst of all, if you are here, you probably want to give some technical 8ba162ae7SRodrigo Siqueiracontribution to the display code, and for that, we say thank you :) 9ba162ae7SRodrigo Siqueira 10ba162ae7SRodrigo SiqueiraThis page summarizes some of the issues you can help with; keep in mind that 11ba162ae7SRodrigo Siqueirathis is a static page, and it is always a good idea to try to reach developers 12ba162ae7SRodrigo Siqueirain the amdgfx or some of the maintainers. Finally, this page follows the DRM 13ba162ae7SRodrigo Siqueiraway of creating a TODO list; for more information, check 14ba162ae7SRodrigo Siqueira'Documentation/gpu/todo.rst'. 15ba162ae7SRodrigo Siqueira 16ba162ae7SRodrigo SiqueiraGitlab issues 17ba162ae7SRodrigo Siqueira============= 18ba162ae7SRodrigo Siqueira 19ba162ae7SRodrigo SiqueiraUsers can report issues associated with AMD GPUs at: 20ba162ae7SRodrigo Siqueira 21ba162ae7SRodrigo Siqueira- https://gitlab.freedesktop.org/drm/amd 22ba162ae7SRodrigo Siqueira 23ba162ae7SRodrigo SiqueiraUsually, we try to add a proper label to all new tickets to make it easy to 24ba162ae7SRodrigo Siqueirafilter issues. If you can reproduce any problem, you could help by adding more 25ba162ae7SRodrigo Siqueirainformation or fixing the issue. 26ba162ae7SRodrigo Siqueira 27ba162ae7SRodrigo SiqueiraLevel: diverse 28ba162ae7SRodrigo Siqueira 29ba162ae7SRodrigo SiqueiraIGT 30ba162ae7SRodrigo Siqueira=== 31ba162ae7SRodrigo Siqueira 32ba162ae7SRodrigo Siqueira`IGT`_ provides many integration tests that can be run on your GPU. We always 33ba162ae7SRodrigo Siqueirawant to pass a large set of tests to increase the test coverage in our CI. If 34ba162ae7SRodrigo Siqueirayou wish to contribute to the display code but are unsure where a good place 35ba162ae7SRodrigo Siqueirais, we recommend you run all IGT tests and try to fix any failure you see in 36ba162ae7SRodrigo Siqueirayour hardware. Keep in mind that this failure can be an IGT problem or a kernel 37ba162ae7SRodrigo Siqueiraissue; it is necessary to analyze case-by-case. 38ba162ae7SRodrigo Siqueira 39ba162ae7SRodrigo SiqueiraLevel: diverse 40ba162ae7SRodrigo Siqueira 41ba162ae7SRodrigo Siqueira.. _IGT: https://gitlab.freedesktop.org/drm/igt-gpu-tools 42ba162ae7SRodrigo Siqueira 43ba162ae7SRodrigo SiqueiraCompilation 44ba162ae7SRodrigo Siqueira=========== 45ba162ae7SRodrigo Siqueira 46ba162ae7SRodrigo SiqueiraFix compilation warnings 47ba162ae7SRodrigo Siqueira------------------------ 48ba162ae7SRodrigo Siqueira 49ba162ae7SRodrigo SiqueiraEnable the W1 or W2 warning level in the kernel compilation and try to fix the 50ba162ae7SRodrigo Siqueiraissues on the display side. 51ba162ae7SRodrigo Siqueira 52ba162ae7SRodrigo SiqueiraLevel: Starter 53ba162ae7SRodrigo Siqueira 54ba162ae7SRodrigo SiqueiraFix compilation issues when using um architecture 55ba162ae7SRodrigo Siqueira------------------------------------------------- 56ba162ae7SRodrigo Siqueira 57ba162ae7SRodrigo SiqueiraLinux has a User-mode Linux (UML) feature, and the kernel can be compiled to 58ba162ae7SRodrigo Siqueirathe **um** architecture. Compiling for **um** can bring multiple advantages 59ba162ae7SRodrigo Siqueirafrom the test perspective. We currently have some compilation issues in this 60ba162ae7SRodrigo Siqueiraarea that we need to fix. 61ba162ae7SRodrigo Siqueira 62ba162ae7SRodrigo SiqueiraLevel: Intermediate 63ba162ae7SRodrigo Siqueira 64ba162ae7SRodrigo SiqueiraCode Refactor 65ba162ae7SRodrigo Siqueira============= 66ba162ae7SRodrigo Siqueira 67ba162ae7SRodrigo SiqueiraAdd prefix to DC functions to improve the debug with ftrace 68ba162ae7SRodrigo Siqueira----------------------------------------------------------- 69ba162ae7SRodrigo Siqueira 70ba162ae7SRodrigo SiqueiraThe Ftrace debug feature (check 'Documentation/trace/ftrace.rst') is a 71ba162ae7SRodrigo Siqueirafantastic way to check the code path when developers try to make sense of a 72ba162ae7SRodrigo Siqueirabug. Ftrace provides a filter mechanism that can be useful when the developer 73ba162ae7SRodrigo Siqueirahas some hunch of which part of the code can cause the issue; for this reason, 74ba162ae7SRodrigo Siqueiraif a set of functions has a proper prefix, it becomes easy to create a good 75ba162ae7SRodrigo Siqueirafilter. Additionally, prefixes can improve stack trace readability. 76ba162ae7SRodrigo Siqueira 77ba162ae7SRodrigo SiqueiraThe DC code does not follow some prefix rules, which makes the Ftrace filter 78ba162ae7SRodrigo Siqueiramore complicated and reduces the readability of the stack trace. If you want 79ba162ae7SRodrigo Siqueirasomething simple to start contributing to the display, you can make patches for 80ba162ae7SRodrigo Siqueiraadding prefixes to DC functions. To create those prefixes, use part of the file 81ba162ae7SRodrigo Siqueiraname as a prefix for all functions in the target file. Check the 82ba162ae7SRodrigo Siqueira'amdgpu_dm_crtc.c` and `amdgpu_dm_plane.c` for some references. However, we 83ba162ae7SRodrigo Siqueirastrongly advise not to send huge patches changing these prefixes; otherwise, it 84ba162ae7SRodrigo Siqueirawill be hard to review and test, which can generate second thoughts from 85ba162ae7SRodrigo Siqueiramaintainers. Try small steps; in case of double, you can ask before you put in 86ba162ae7SRodrigo Siqueiraeffort. We recommend first looking at folders like dceXYZ, dcnXYZ, basics, 87ba162ae7SRodrigo Siqueirabios, core, clk_mgr, hwss, resource, and irq. 88ba162ae7SRodrigo Siqueira 89ba162ae7SRodrigo SiqueiraLevel: Starter 90ba162ae7SRodrigo Siqueira 91ba162ae7SRodrigo SiqueiraReduce code duplication 92ba162ae7SRodrigo Siqueira----------------------- 93ba162ae7SRodrigo Siqueira 94ba162ae7SRodrigo SiqueiraAMD has an extensive portfolio with various dGPUs and APUs that amdgpu 95ba162ae7SRodrigo Siqueirasupports. To maintain the new hardware release cadence, DCE/DCN was designed in 96ba162ae7SRodrigo Siqueiraa modular design, making the bring-up for new hardware fast. Over the years, 97ba162ae7SRodrigo Siqueiraamdgpu accumulated some technical debt in the code duplication area. For this 98ba162ae7SRodrigo Siqueiratask, it would be a good idea to find a tool that can discover code duplication 99ba162ae7SRodrigo Siqueira(including patterns) and use it as guidance to reduce duplications. 100ba162ae7SRodrigo Siqueira 101ba162ae7SRodrigo SiqueiraLevel: Intermediate 102ba162ae7SRodrigo Siqueira 103ba162ae7SRodrigo SiqueiraMake atomic_commit_[check|tail] more readable 104ba162ae7SRodrigo Siqueira--------------------------------------------- 105ba162ae7SRodrigo Siqueira 106ba162ae7SRodrigo SiqueiraThe functions responsible for atomic commit and tail are intricate and 107ba162ae7SRodrigo Siqueiraextensive. In particular `amdgpu_dm_atomic_commit_tail` is a long function and 108ba162ae7SRodrigo Siqueiracould benefit from being split into smaller helpers. Improvements in this area 109ba162ae7SRodrigo Siqueiraare more than welcome, but keep in mind that changes in this area will affect 110ba162ae7SRodrigo Siqueiraall ASICs, meaning that refactoring requires a comprehensive verification; in 111ba162ae7SRodrigo Siqueiraother words, this effort can take some time for validation. 112ba162ae7SRodrigo Siqueira 113ba162ae7SRodrigo SiqueiraLevel: Advanced 114ba162ae7SRodrigo Siqueira 115ba162ae7SRodrigo SiqueiraDocumentation 116ba162ae7SRodrigo Siqueira============= 117ba162ae7SRodrigo Siqueira 118ba162ae7SRodrigo SiqueiraExpand kernel-doc 119ba162ae7SRodrigo Siqueira----------------- 120ba162ae7SRodrigo Siqueira 121ba162ae7SRodrigo SiqueiraMany DC functions do not have a proper kernel-doc; understanding a function and 122ba162ae7SRodrigo Siqueiraadding documentation is a great way to learn more about the amdgpu driver and 123ba162ae7SRodrigo Siqueiraalso leave an outstanding contribution to the entire community. 124ba162ae7SRodrigo Siqueira 125ba162ae7SRodrigo SiqueiraLevel: Starter 126ba162ae7SRodrigo Siqueira 127ba162ae7SRodrigo SiqueiraBeyond AMDGPU 128ba162ae7SRodrigo Siqueira============= 129ba162ae7SRodrigo Siqueira 130ba162ae7SRodrigo SiqueiraAMDGPU provides features that are not yet enabled in the userspace. This 131ba162ae7SRodrigo Siqueirasection highlights some of the coolest display features, which could be enabled 132ba162ae7SRodrigo Siqueirawith the userspace developer helper. 133ba162ae7SRodrigo Siqueira 134ba162ae7SRodrigo SiqueiraEnable underlay 135ba162ae7SRodrigo Siqueira--------------- 136ba162ae7SRodrigo Siqueira 137ba162ae7SRodrigo SiqueiraAMD display has this feature called underlay (which you can read more about at 138*6c6d0cbfSSimon Horman'Documentation/gpu/amdgpu/display/mpo-overview.rst') which is intended to 139ba162ae7SRodrigo Siqueirasave power when playing a video. The basic idea is to put a video in the 140ba162ae7SRodrigo Siqueiraunderlay plane at the bottom and the desktop in the plane above it with a hole 141ba162ae7SRodrigo Siqueirain the video area. This feature is enabled in ChromeOS, and from our data 142ba162ae7SRodrigo Siqueirameasurement, it can save power. 143ba162ae7SRodrigo Siqueira 144ba162ae7SRodrigo SiqueiraLevel: Unknown 145ba162ae7SRodrigo Siqueira 146ba162ae7SRodrigo SiqueiraAdaptive Backlight Modulation (ABM) 147ba162ae7SRodrigo Siqueira----------------------------------- 148ba162ae7SRodrigo Siqueira 149ba162ae7SRodrigo SiqueiraABM is a feature that adjusts the display panel's backlight level and pixel 150ba162ae7SRodrigo Siqueiravalues depending on the displayed image. This power-saving feature can be very 151ba162ae7SRodrigo Siqueirauseful when the system starts to run off battery; since this will impact the 152ba162ae7SRodrigo Siqueiradisplay output fidelity, it would be good if this option was something that 153ba162ae7SRodrigo Siqueirausers could turn on or off. 154ba162ae7SRodrigo Siqueira 155ba162ae7SRodrigo SiqueiraLevel: Unknown 156ba162ae7SRodrigo Siqueira 157ba162ae7SRodrigo Siqueira 158ba162ae7SRodrigo SiqueiraHDR & Color management & VRR 159ba162ae7SRodrigo Siqueira---------------------------- 160ba162ae7SRodrigo Siqueira 161ba162ae7SRodrigo SiqueiraHDR, Color Management, and VRR are huge topics and it's hard to put these into 162ba162ae7SRodrigo Siqueiraconcise ToDos. If you are interested in this topic, we recommend checking some 163ba162ae7SRodrigo Siqueirablog posts from the community developers to better understand some of the 164ba162ae7SRodrigo Siqueiraspecific challenges and people working on the subject. If anyone wants to work 165ba162ae7SRodrigo Siqueiraon some particular part, we can try to help with some basic guidance. Finally, 166ba162ae7SRodrigo Siqueirakeep in mind that we already have some kernel-doc in place for those areas. 167ba162ae7SRodrigo Siqueira 168ba162ae7SRodrigo SiqueiraLevel: Unknown 169