The New AMD GPU Open-Source Driver On Linux 4.2 Works, But Still A Lot Of Work Ahead

Written by Michael Larabel in Display Drivers on 25 July 2015 at 01:30 PM EDT. Page 1 of 5. 12 Comments.

With the Linux 4.2 kernel settling down nicely and AMD developers having already sent in a few round of fixes for their new AMDGPU kernel DRM driver, I've started testing out this new kernel driver -- plus the new xf86-video-amdgpu DDX and the associated new Mesa/LibDRM code -- that is providing the open-source accelerated graphics support for Tonga and all new/future GPUs like Carrizo and Fiji.

This week I started testing out this new driver stack that's long been in development for the Radeon R9 285 "Tonga" and newer. It's the AMDGPU driver stack that may also interface with a new Catalyst Linux driver in the future for a unified Linux driver approach. With Linux 4.2 the AMDGPU DRM driver is part of the mainline kernel while the changes needed to Mesa and libdrm remain in branched repositories. There's also the new xf86-video-amdgpu DDX that's needed with xf86-video-ati not supporting the new kernel driver.

Since the AMD Radeon R9 285 "Tonga" launched last year it's only been supported by the Catalyst driver under Linux without any open-source support, but that's finally changed with it being the first graphics card officially supported by AMDGPU.

First up in my testing atop Ubuntu 15.04 I simply installed the latest Ubuntu mainline kernel daily PPA Git package of Linux 4.2 and rebooted... The AMDGPU driver is already enabled by default for these kernels. You also need to grab the latest proprietary firmware/microcode files for TONGA, in order for this kernel driver to properly initialize the hardware. The new microcode files are now tossed in /lib/firmware/amdgpu rather than /lib/firmware/radeon, a mistake I made at first but can quickly be figured out from the dmesg.

With simply upgrading to Linux 4.2 and having the TONGA microcode files for the hardware, kernel mode-setting was working! Though with not yet building the new user-space stack, it fell back to using the xf86-video-modesetting driver and LLVMpipe. That all was working fine and no display issues were encountered.

Building the user-space stack is a bit trickier since the libdrm and Mesa changes haven't yet been mainlined. You'll also want to be using the LLVM SVN code for the latest AMDGPU compiler back-end support. At first I was using the AMDGPU branch of Mesa with Alex Deucher's AMDGPU branch of DRM, but that was resulting in build problems due to interface changes with libdrm. I then ended up finding Alex's AMDGPU Mesa branch, which at the time of testing was updated three days ago, and that had built fine against the branched libdrm code. I haven't heard when AMD might mainline their AMDGPU support in libdrm and Mesa, but I'd hope it will be done soon ahead of the Mesa 11.0 release in September.


Related Articles