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.

The regression I was talking about in the last status update is not really one: I built Mesa with --enable-glx-tls and Firefox doesn't like this.

For the first time, I tested to build the branch on i386 but as of now, some atomic calls are not available. This will be fixed with Jung-uk Kim's projects/atomic64 branch. Meanwhile, the build of the driver is disabled on i386.

Also a good news: the driver will be committed to HEAD in the short term so that it'll be part of 10.0-RELEASE!

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 DONE
X.Org DONE DONE DONE DONE
XRandR Not tested Not tested DONE DONE
XVideo Not tested DONE DONE FAIL: mplayer is unable to use it
OpenGL WIP: glxgears works, WebGL demos fail DONE DONE Only software render
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.1376930252.txt.gz
  • Last modified: 2013/08/19 16:37
  • by KoopMast