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.
Status
Current status (2013-08-15)
Several fixes were pushed recently:
- The panic during
kldunload radeonkmson some computers is fixed. The problem, also present ini915kms, was caused by the deletion of aniicbusdevice made twice. - Firmwares are unloaded along with
radeonkms. - Page flipping is actually enabled now. This fixes the KDE startup hang.
In sync with Linux...
| Component | Linux version |
|---|---|
| TTM | ff7c60c (between 3.8 and 3.9) |
| Radeon | 3.8 |
Features
| 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
Code repository and patches
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.
How to test
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
Setup kernel coredumps
You must have a swap device at least as large as the installed physical memory.
- Set dumpdev in
/boot/loader.conf:
dumpdev="/dev/$swap_device" # Replace with your swap device here.
- Set dumpdev in
/etc/rc.conf:
ddb_enable="YES" dumpdev="AUTO"
- The following sysctl is required in
/etc/sysctl.confto have coredumps while using X.Org:
debug.debugger_on_panic=0
Update kernel
- Clone the
kms-radeonbranch:
git clone -b kms-radeon https://github.com/dumbbell/freebsd.git
- Build the kernel as usual:
make buildkernel make installkernel
A new module, radeonkms is installed along with multiple AMD firmwares.
Install new X.Org driver
- You must reinstall
graphics/libdrmwith theKMSoption checked:
cd /usr/ports/graphics/libdrm make config # Check KMS make all deinstall reinstall clean
- You need to checkout the FreeBSD X11 team development ports tree. See X11 team wiki page for instructions on how to checkout their repository.
- If you have xf86-video-ati already installed, remove it.
- You must install the
x11-drivers/xf86-vide-ati-kmsport from the X11 team repository:
cd /path-to-x11-dev-repo/x11-drivers/xf86-video-ati-kms make install clean
Start X.Org
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.
Contact
For more details, contact Jean-Sébastien Pédron.