Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
AMDGPU DC Pull Request Submitted For Linux 4.15 Kernel - 132,395 Lines Of Code
If you don't know what AMDGPU DC is, you definitely need to be reading more Phoronix as it's been one of the most sought-after features by Radeon Linux users for months/years. AMDGPU DC is what will allow Radeon RX Vega (and Raven Ridge) to have working display support with the mainline Linux kernel, provides HDMI/DP audio support for recent AMD GPUs, atomic mode-setting, the fundamentals needed for exposing FreeSync, and other modern display functionality.
AMDGPU DC was originally known as "DAL" and has been a long time coming in getting this cross-OS display code up to Linux kernel standards and into a state where it's suitable for merging. Airlie sent in AMDGPU DC as its own pull request in case it's rejected by Linus Torvalds it wouldn't have delayed the rest of the new Direct Rendering Manager material.
This new display code path is 132,395 lines of code, not the overall driver size or anything along those lines. DC is huge. Airlie forewarned Torvalds in this pull request that there are other things he might not like as well besides the massive code size:
- DC is designed for a shared OS code-base and thus there's some abstractions in the code... Compared to the original DAL, much of the abstractions were removed/reworked, but still it's not virgin looking Linux kernel code.
- The tree contains the entire commit history, including the hairy code at first.
- The bandwidth calculation code is using floats/doubles rather than fixed-point, but it would be a big undertaking to change this code with the possibility of introducing regressions.
- The code quality is "slightly better than STAGING quality but not massively so."
Via this pull request.
It is also important to remind Linux users that AMDGPU DC is already what's being used within the company's AMDGPU-PRO hybrid driver with their DKMS kernel driver. Overall, DC has been working out fairly well throughout my testing.
AMD developers originally published DAL in early 2016 and at that stage was 93k lines of code before going through significant reworks. It's been a heck of a journey getting to this point where it will hopefully land in 4.15.
It is important to remind as well that AMDGPU DC isn't used by default unless you are on a Raven/Vega GPU. If you want to use DC with your Sea Islands through Polaris/Fiji hardware, you'll need to be booting with amdgpu.dc=1 for the time being to use the new display stack.
Now to wait and see what Torvalds decides to do with this code... Having it not be in 4.15 would be a huge letdown as it's souring the out-of-the-box Radeon RX Vega experience especially, but also other long-desired open-source AMD Linux features like HDMI/DP audio.
UPDATE: IT'S LANDED!