Linux 5.9 Brings Hardware Accelerated Video Playback To 10+ Year Old AMD Graphics Cards Using The "amdgpu" Linux Kernel Driver

From LinuxReviews
Jump to navigationJump to search
Amdlogo.png

AMD kicked off their HD 7000 series graphics cards with the launch of the Radeon HD 7970 code-named "Tahiti" in December 2011. Linux users are finally able to get working Hardware Video Decoding and Vulkan support on these and other older AMD graphics cards using the Linux kernel's "amdgpu" driver.

written by 윤채경 (Yoon Chae-kyung)  2020-09-10 - last edited 2020-09-14. © CC BY

Radeon-7850-vaapi.jpg
The mpv video player playing a video with SNSD performing "Time Machine" on stage. Playback is done using hardware accelerated video decoding on a Radeon 7850 GPU powered by the "amdgpu" kernel driver. The desktop environment is something called Xfce 4.14 and the GNU/Linux distribution is an upcoming IBM product called "Fedora 33".'

The Linux graphics driver for AMD graphics cards was named radeon when the Radeon HD 7000 series graphics cards were launched back in 2011. That driver worked alright at the time and basic things like OpenGL backed by the Mesa graphics stack, video accelerated playback and HDMI audio worked fine on early "Graphics Core Next" (GCN) based cards.

Vulkan-1.2.png
Those with 10 year old AMD graphics cards can finally use Vulkan and hardware accelerated video decoding.

AMD started developing a shiny new revolutionary Linux driver called amdgpu around the time their third generation GCN "Volcanic Island" cards were launched. AMD stuck the amdgpu driver and sort of forgot about the radeon driver. That left those with first and second-generation GCN cards in the cold as second-class citizens.

Using the radeon driver on older AMD graphics cards and APUs was fine for many years, and those with older cards did not miss out on much until the advent of the Vulkan graphics API. The Mesa RADV Vulkan driver can only be used with the amdgpu graphics driver.

amdgpu did get some support for older cards a few years back but there were some glaring problems with using that driver:

  • HDMI audio didn't work on most cards.
  • Hardware accelerated video encoding and decoding was unsupported.

That meant that those with old AMD graphics cards had to choose between Vulkan OR hardware accelerated video decoding. You could not have both features.

That situation will finally be rectified when Linux 5.9 is released. AMD developer Alex Jivin took it upon himself to port UVD and VCE power managment, UVD clock control and VCE clock control for Southern Island graphics cards from the radeon driver to the amdgpu driver this summer and the code was sneaked in during the Linux 5.9 merge window. AMD has also provided new amdgpu firmware for these cards.

Linux 5.9 finally allows those with very old AMD graphics cards to use Vulkan and have working hardware accelerated video encoding and decoding.

Vkmark on radeon 7850.jpg
vulkaninfo and the vkmark Vulkan benchmark running on a AMD Radeon HD 7850 GPU using the amdgpu module on kernel 5.9 rc4.

amdgpu is still not the default driver for older AMD graphics cards. Using a kernel parameter is still required. You will need to use one of the following kernel parameters to choose it:

Ancient AMD tech Kernel options enabling the amdgpu driver
Southern Islands cards
HD7750-HD7970, HD8550M-HD8790M

R9 270, R7 240, R7 250, R9-280, R9 370X

radeon.si_support=0 amdgpu.si_support=1
Sea Islands

HD7790, HD8180-HD8400
R7 260, R9 290
AMD E1-6010, Athlon 5350, ++

radeon.cik_support=0 amdgpu.cik_support=1

Kernel parameters can be added to GRUB_CMDLINE_LINUX= in /etc/sysconfig/grub (assuming you are using the GRUB bootloader).

AMD HD7850 GPU.20200108.jpg
The around ten years old AMD Radeon HD 7850 technology can now be used for Vulkan and hardware accellerated video decoding on Linux using the amdgpu driver.

We have tested the shiny new amdgpu support for a decade old graphics cards in Linux 5.9 using Linux 5.9 rc4 and a AMD Radeon 7850 with 2 GiB RAM. This particular first-generation GCN card finally works as it should have when it was launched in March 2012. HDMI audio output works, Vulkan works and VAAPI accelerated hardware video decoding works. They've even made suspend to RAM work. Suspend to disk, on the other hand, is utterly broken. Perhaps they forgot about that one. Still, the current situation is better than it was when we wrote our "The Current State Of Older AMD Graphics Hardware On Linux: What Driver To Use And What To Expect" article earlier this year.

Radeon-7850-amdgpu-after-suspend-to-disk.jpg
The kernel ring buffer (dmesg) on a machine with a Radeon HD 7850 GPU running Linux 5.9 rc4 after resuming from hibernation. The screenshot was taken by ssh-ing in from another machine since there's no hope of getting anything on the attached monitor at that point.

OpenCL compute using the Radeon Open Compute framework is of course not supported on any of the older first and second generation GCN cards. AMD didn't write a huge graphics compute framework just so hobbyists can have OpenCL acceleration in LibreOffice. You can use Radeon Open Compute for that purpose on most RX 400-series cards and newer but you can forget about it if your card is older than that.

The newfound support for hardware video decoding on older AMD graphics cards is probably a big part of the reason why some AMD fanboys call AMD graphics cards "fine wine": It may take a decade but you'll eventually get most of the feature-set you should have gotten right away when you bought the card. AMD has added support for their upcoming "Sienna Cichlid" and "Navy Flounder" graphics chips to Linux 5.9 so we can only hope those who buy these upcoming AMD cards based on an entirely new architecture (they are not NAVI-based, amdgpu/sdma_v5_2.c clearly shows it's a new display core) will get them mostly working quicker than those who bought first-generation GCN cards did.

5.00
(2 votes)


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.