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 driver is now in HEAD! Thus, it'll be shipped with FreeBSD 10.0-RELEASE.

Next steps for the Radeon driver may be:

  • suspend/resume tests and debugging
  • backport to FreeBSD 9

But nothing is decided yet and the priority will be to debug what we have currently.

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 is in HEAD as of r254885.

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

  • The console is unusable, once radeonkms is loaded. So Ctrl+Atl-Fx doesn't work and ending the X session let the computer with an unusable computer (only remote access is working).
  • Multiple video cards which share the same output ports are not supported.
  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

Update your kernel as usual and reboot before proceeding with next steps.

You must put add the following flags in your /etc/make.conf:

WITH_NEW_XORG="YES"
WITH_GALLIUM="YES"

If this is the first time you set WITH_NEW_XORG, be sure to update your ports.

About WITH_GALLIUM, the support is very very early and the Gallium drivers may not work for you. Please do not report about failure with them at this time.

  1. If you have x11-drivers/xf86-video-ati already installed, remove it.
  2. Checkout the in-development xf86-video-ati port in a directory of your choice, and install it like a normal port:
svn co https://trillian.chruetertee.ch/svn/ports/trunk/x11-drivers/xf86-video-ati

cd xf86-video-ati
sudo make install clean
  1. If you have graphics/libGL and graphics/dri already instaled, remove them; you may have to force their deletion.
  2. Checkout the in-development Mesa ports in a directory of your choice, and install as usual:
svn co https://trillian.chruetertee.ch/svn/ports/trunk/graphics

cd graphics/libGL
sudo make install clean

cd ../dri
sudo make install clean

As mentionned above, Gallium drivers installed by graphics/dri are a work-in-progress. Please do not report problems about them for now.

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

If you encounter problems with either the kernel driver or the in-development ports, please send a mail to freebsd-x11@FreeBSD.org and join:

  • the output of dmesg
  • the output of pciconf -lvbce
  • the output of devinfo -vr
  • the output of pkg info
  • your Xorg.log if the problem is at X.Org startup or during your X session
  • any port build/install errors if relevant
  • core.$n.txt (in /var/crash) if you have a kernel panic
  • any details you see fit

If everything is working for you, you may report on the same mailing (this helps us know which hardware/software configuration are believed to work) and join:

  • the output of dmesg
  • the output of pciconf -lvbce
  • the output of pkg info
  • your X.lorg
  • any details you see fit

Thank you very much in advance for any reports! Those are very valuable.

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

  • amd_gpu.1377592407.txt.gz
  • Last modified: 2013/08/27 08:33
  • by JeanSébastienPédron