AMDGPU DC Pull Request Submitted For Linux 4.15 Kernel - 132,395 Lines Of Code

Written by Michael Larabel in Radeon on 17 November 2017 at 05:40 AM EST. 53 Comments
RADEON
One day after submitting the main DRM feature pull request for Linux 4.15, David Airlie of Red Hat has submitted the secondary pull request that would feature the long-awaited introduction of AMDGPU DC into the mainline kernel.

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!
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week