Enabling AMD Radeon 6900 XT Graphics on FreeBSD 13.1
Author: Jonathan Vasquez <jon@xyinn.org>
Last Updated: 2022-12-19-1305
Currently On: FreeBSD 13.1-STABLE (stable/13-n253276-293ff98462a7/GENERIC)
Summary
The following will show you how to get the AMD Radeon 6900 XT card running on FreeBSD 13.1. Unfortunately, my new workstation's AMD Ryzen 9 7950X's integrated graphics (Raphael) isn't supported on FreeBSD (yet?), so I decided to get a dedicated card based on the success of astyle found here. Thanks to astyle for their post.
Make sure you have the ports collection installed and updated.
Build the amdgpu kernel module
# cd /usr/ports/graphics/drm-510-kmod
# make install clean
Build the firmware for our card
# cd ../gpu-firmware-amd-kmod
# make install clean FLAVOR=sienna_cichlid
Load the kernel module
# kldload amdgpu
Once you are done, you'll want to make sure your /etc/rc.conf
loads the module automatically at boot. It should look something like this:
/etc/rc.conf:
kld_list="amdgpu"
dmesg | grep drm (pruned)
If you check your kernel buffer, you should see activity that looks something like this (pruned):
[drm] amdgpu kernel modesetting enabled.
[drm] initializing kernel modesetting (SIENNA_CICHLID 0x1002:0x73AF 0x1043:0x04FE 0xC0).
[drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
drmn0: VRAM: 16368M 0x0000008000000000 - 0x00000083FEFFFFFF (16368M used)
drmn0: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF
[drm] Detected VRAM RAM=16368M, BAR=16384M
[drm] RAM width 256bits GDDR6
[drm] amdgpu: 16368M of VRAM memory ready
[drm] amdgpu: 16368M of GTT memory ready.
[drm] GART: num cpu pages 131072, num gpu pages 131072
[drm] PCIE GART of 512M enabled (table at 0x0000008000300000).
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_sos.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_ta.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_smc.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_dmcub.bin'
[drm] Loading DMUB firmware via PSP: version=0x0202000C
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_pfp.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_me.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_ce.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_rlc.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_mec.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_mec2.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_sdma.bin'
drmn0: successfully loaded firmware image 'amdgpu/sienna_cichlid_vcn.bin'
[drm] Found VCN firmware Version ENC: 1.18 DEC: 2 VEP: 0 Revision: 14
drmn0: SMU is initialized successfully!
[drm] Display Core initialized with v3.2.104!
[drm] DMUB hardware initialized: version=0x0202000C
[drm] Initialized amdgpu 3.40.0 20150101 for drmn0 on minor 0
pciconf -vl
vgapci0@pci0:3:0:0: class=0x030000 rev=0xc0 hdr=0x00 vendor=0x1002 device=0x73af subvendor=0x1043 subdevice=0x04fe
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Navi 21 [Radeon RX 6900 XT]'
class = display
subclass = VGA