This is an old revision of the document!


AMD GPUs kernel-modesetting support

This page is dedicated to the project bringing kernel support for the AMD GPUs. It will allow the use of newer xf86-video-ati drivers and AMD GPUs.

This project started in January 2013. Initial radeon code comes from Linux 3.8-rc3 and a previous porting effort by Alexander Kabaev. Initial TTM port is provided by Konstantin Belousov.

Several fixes were pushed recently:

  • The panic during kldunload radeonkms on some computers is fixed. The problem, also present in i915kms, was caused by the deletion of an iicbus device made twice.
  • Firmwares are unloaded along with radeonkms.
  • Page flipping is actually enabled now. This fixes the KDE startup hang.
Component Linux version
TTM ff7c60c (between 3.8 and 3.9)
Radeon 3.8
Feature RS690 RV630 Evergreen (HD5000) Pitcairn (HD7000)
kldload DONE DONE DONE DONE
kldunload DONE DONE DONE Not tested
X.Org DONE DONE DONE WIP: drmn0: error: still active bo inside vm when shutting down X
XRandR Not tested Not tested DONE Not tested
XVideo Not tested DONE DONE FAIL: mplayer is unable to use it
OpenGL WIP: glxgears works, WebGL demos fail DONE DONE Not tested
VDPAU (3D) Not tested Not tested FAIL: vdpauinfo hangs in umtxn Not tested
VDPAU (UVD) Not tested Not tested Not tested Not tested
OpenCL Not tested Not tested Not tested Not tested
Power mgmt. Not tested Not tested Not tested Not tested
VGA connector Not tested Not tested Not tested Not tested
DVI connector Not tested DONE Not tested DONE
HDMI connector Not tested Not tested DONE Not tested
HDMI audio Not tested Not tested FAIL: No sound, applications write data too fast Not tested
DP connector Not tested Not tested Not tested Not tested
Suspend/resume Not tested Not tested Not tested Not tested

Notes:

  • VDPAU (UVD): Try with mplayer -vo vdpau -vc ffh264vdpau,ffvc1vdpau $file

The code, branched from 10-CURRENT, is available on GitHub in the kms-radeon branch: https://github.com/dumbbell/freebsd

J.R. Oldroyd prepared a patch for 9-STABLE. Note that this patch is not in sync with the Git branch above.

The driver in its current state isn't ready for end-user, not even close. Many issues are already known and I can't provide user support.

If you still want to test the driver, you should know that:

  • the branch is based on 10-CURRENT so it's obviously not production ready
  • 3D acceleration is unusable at this time, so OpenGL-based applications such as some modern desktop environments won't work
  • multiple video cards which share the same output ports are not supported

You must have a swap device at least as large as the installed physical memory.

  1. Set dumpdev in /boot/loader.conf:
dumpdev="/dev/$swap_device" # Replace with your swap device here.
  1. Set dumpdev in /etc/rc.conf:
ddb_enable="YES"
dumpdev="AUTO"
  1. The following sysctl is required in /etc/sysctl.conf to have coredumps while using X.Org:
debug.debugger_on_panic=0
  1. Clone the kms-radeon branch:
git clone -b kms-radeon https://github.com/dumbbell/freebsd.git
  1. Build the kernel as usual:
make buildkernel
make installkernel

A new module, radeonkms is installed along with multiple AMD firmwares.

  1. You must reinstall graphics/libdrm with the KMS option checked:
cd /usr/ports/graphics/libdrm
make config
# Check KMS
make all deinstall reinstall clean
  1. You need to checkout the FreeBSD X11 team development ports tree. See X11 team wiki page for instructions on how to checkout their repository.
  2. If you have xf86-video-ati already installed, remove it.
  3. You must install the x11-drivers/xf86-vide-ati-kms port from the X11 team repository:
cd /path-to-x11-dev-repo/x11-drivers/xf86-video-ati-kms
make install clean

Now you're ready to test! You can start your X11 session as usual.

Remember that 3D is not stable at this time, therefore some window managers and desktop environments will just hang. See the table in the status section above, summing up what was tested.

For more details, contact Jean-Sébastien Pédron.

  • amd_gpu.1376589599.txt.gz
  • Last modified: 2013/08/15 17:59
  • by JeanSébastienPédron