Will FreeBSD 15.1 support AMD 9070XT GPUs?

Angband from a DRM (Direct Rendering Manager) perspective 9070XT (the same for the 9060 XT) will be supported on 15.1 with the new drm-612-kmod (see D56888), though the existing gpu firmware package will need to be updated.

I.e for the 9070 (XT) according to the documentation you will need these firmware files:
  • DCN 4.0.1
  • GC 12.0.1
  • VCN 5.0.0
  • SDMA 7.0.1
  • MP0/1 14.0.3
As the current gpu-firmware-amd-kmod does not provide all of these binaries you will have to manually build the port point to at least the 20250808_2 github tag. A newer firmware version may be needed to fix board specific issues but at least this tag should boot.
 
As the current gpu-firmware-amd-kmod does not provide all of these binaries you will have to manually build the port point to at least the 20250808_2 github tag.
Fahrenheit, do you have any tip on how to build the port to the 20250808_2 tag? Where do I start? I can see those dc, dcn, vcn, sdma subdirectories in /usr/ports/graphics/gpu-firmware-amd-kmod/. There are not yet any '*dcn_4*' for example, but I guess they'll appear as the new drm-612-kmod gets pulled whenever that happens.

How do I 'build to the 20250808_2' tag?
 
matt_k I didn't actually saw the zip I had shared, looking at it today it doesn't need any changes to use the correct tag.
Sorry, which zip file? The prior links were pointers to a GitHub branch, a diff, etc. I didn’t spot an obvious zip file as a reference?
 

Attachments

Angband are you running -CURRENT? I guess it is only possible to try this with -CURRENT or wait for -15.1-RELEASE.
 
The firmware package has no issues compiling in 15.0 or later (probably 14.x also).
Drm 6.12 needs that /usr/src branch be main, stable/15 or releng/15.1 (and up to date, i.e. do a git pull after branch checkout).
After compilation it should run with the stable 15 kernel (i.e. the latest or weekly branch for base) or at least 15.1 beta 2.

So if you are planning on:
* running 15.1 use releng/15.1
* latest stable of 15, use stablr/15
* 16, use main
 
The firmware package has no issues compiling in 15.0 or later (probably 14.x also).
Drm 6.12 needs that /usr/src branch be main, stable/15 or releng/15.1 (and up to date, i.e. do a git pull after branch checkout).
After compilation it should run with the stable 15 kernel (i.e. the latest or weekly branch for base) or at least 15.1 beta 2.

So if you are planning on:
* running 15.1 use releng/15.1
* latest stable of 15, use stablr/15
* 16, use main
I may be too stupid to do what is required. I am tracking
  • releng/15.1 on /usr/src
  • main on /usr/ports
I am running FreeBSD-15.1-BETA3

there are these three files changed in /usr/ports/ according to the zip file you provided.

sh:
root:/usr/ports # git status

On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   graphics/gpu-firmware-amd-kmod/Makefile
    modified:   graphics/gpu-firmware-amd-kmod/distinfo
    modified:   graphics/gpu-firmware-amd-kmod/pkg-plist

no changes added to commit (use "git add" and/or "git commit -a")

I also followed your previous post #9 in this thread and built all the flavors, all went without errors. Now what? I don't have drm-612-kmod in my /usr/ports/graphics/ and drm-latest-kmod is version 6.9.
Following this post https://github.com/freebsd/drm-kmod/pull/427 leads nowhere:
sh:
[I] ~ $ git clone -b update-to-linux-6.12 https://github.com/dumbbell/drm-kmod.git
Cloning into 'drm-kmod'...
fatal: Remote branch update-to-linux-6.12 not found in upstream origin

I am sorry, but I am learning my way around git, building from source and this all is new to me.
 
Sorry, which zip file? The prior links were pointers to a GitHub branch, a diff, etc. I didn’t spot an obvious zip file as a reference?
1779231403713.png
 
matt_k from the attached file, replace existing files on /usr/ports/graphics/drm-latest-kmod, then run (on that dir):

# make package
# pkg install work/pkg/*.pkg

Before rebooting, remove amdgpu from the kld_list on /etc/rc.conf (you will thank me if things don't work), reboot.
On a text terminal (use ctrl+alt+F2 for example) login and issue:

# kldload amdgpu

If it works (i.e. no kernel panic) you can add back amdgpu to kld_list on /etc/rc.conf. You can confirm that everything is working by installing the drm_info package and call drm_info, if you get output DRM is working.
If does not work, after the panic reboot, copy /var/log/messages to some place for you to attach to a bug report or some such, and either remove the drm-latest-kmod package or keep using the X with scfb until a fix appears.

And welcome to the leading edge of graphics support on FreeBSD :)
 

Attachments

Thank you fahrenheit.
I did that, the module loads but leads to a blank screen. There is no kernel panic though and the computer responds, just the monitor is off.
I have a pastebin, but I think this is starting to become too much effort, when I can just wait for -15.1-RELEASE and then it will probably just work.

https://pastebin.com/6JnZzZcG
 
matt_k well, the good news is that all the required firmware was found, the bad news is that there were issues starting some firmware blob

May 20 12:41:35 slaanesh kernel: drmn0: [mmhub] page fault (src_id:0 ring:158 vmid:0 pasid:0)
May 20 12:41:35 slaanesh kernel: drmn0: in page starting at address 0x0000000000f00000 from client 18
May 20 12:41:35 slaanesh kernel: drmn0: MMVM_L2_PROTECTION_FAULT_STATUS_LO32:0x00000D3D
May 20 12:41:35 slaanesh kernel: drmn0: Faulty UTCL2 client ID: MP0 (0x6)
May 20 12:41:35 slaanesh kernel: drmn0: MORE_FAULTS: 0x1
May 20 12:41:35 slaanesh kernel: drmn0: WALKER_ERROR: 0x6
May 20 12:41:35 slaanesh kernel: drmn0: PERMISSION_FAULTS: 0x3
May 20 12:41:35 slaanesh kernel: drmn0: MAPPING_ERROR: 0x1
May 20 12:41:35 slaanesh kernel: drmn0: RW: 0x0
May 20 12:41:35 slaanesh kernel: drmn0: failed to load ucode DMCUB(0x3D) drmn0: psp gfx command LOAD_IP_FW(0x6) failed and response status is (0x910D)
May 20 12:41:35 slaanesh kernel: drmn0: RAS: optional ras ta ucode is not available
May 20 12:41:35 slaanesh kernel: drmn0: RAP: optional rap ta ucode is not available

I would open an issue in https://github.com/freebsd/drm-kmod/ with that full log to see if the developers have some ideia.
But a search says that it's probably related with the firmware files (requires a newer version probably).

But I would say, that at least from the drm side, you are fine for 15.1, it's just a matter of getting the right firmware package released.
 
matt_k interested in testing the future firmware package?

Same procedure as before, extract these files on top of /usr/ports/graphics/gpu-firmware-amd-kmod and use /usr/ports/graphics/drm-612-kmod (or /usr/ports/graphics/drm-latest-kmod). (if you still have the old package it's okay to use it).

build with:

# cd /usr/ports/graphics/gpu-firmware-amd-kmod/
# for FLV in $(make -V FLAVORS); do make package FLAVOR=${FLV}; done

And install with:

# for dir in work-*; do pkg install -y -f $dir/pkg/*.pkg; done

Let's hope you have better luck now.
 

Attachments

The build fails with this.
I did
make clean before running make package
Code:
===>  Building packages for gpu-firmware-amd-kmod-yellow-carp-20260309.1501000_2
===>   Building gpu-firmware-amd-kmod-yellow-carp-20260309.1501000_2
pkg-static: Unable to access file /usr/ports/graphics/gpu-firmware-amd-kmod/work-yellow_carp/stage/usr/local/%%SDMA_4_4_4%%/boot/modules/amdgpu_sdma_4_4_4_bin.ko:No such file or directory
*** Error code 1
 
matt_k did you do:

# for FLV in $(make -V FLAVORS); do make package FLAVOR=${FLV}; done


Just make package won't work.
yes, I did that. I just did not write it in my previous post. It builds like 127 packages and then stops at aforementioned yellow_carp.
Code:
[I] /u/p/g/gpu-firmware-amd-kmod $ ls -la | grep work | wc -l
     127
[I] /u/p/g/gpu-firmware-amd-kmod $

There is indeed no %%SDMA_4_4_4%% directory anywhere. Not sure what those %% are supposed to do.

Code:
[I] /u/p/g/gpu-firmware-amd-kmod $ ls -laR | grep SDMA
[I] /u/p/g/gpu-firmware-amd-kmod [0|1]$

There are however, some amdgpu_sdma_4_4_4_bin.ko files somewhere else though:
Code:
[I] /u/p/g/gpu-firmware-amd-kmod $ find . -type f -iname "*sdma_4_4_4_bin.ko"
./work-sdma_4_4_4/stage/boot/modules/amdgpu_sdma_4_4_4_bin.ko
./work-sdma_4_4_4/drm-kmod-firmware-20250808_2/amdgpukmsfw/sdma_4_4_4/amdgpu_sdma_4_4_4_bin.ko
[I] /u/p/g/gpu-firmware-amd-kmod $

EDIT3: OK, I looked into the Makefile and there is no sdma_4_4_4 mentioned. 4.4.2 and 4.4.5 are mentioned So I did make clean and then rm -rf work*, because some work-* directories remain even after make clean. Now I'm building it again.

EDIT4: It fails again with the same error
Code:
===>  Building packages for gpu-firmware-amd-kmod-yellow-carp-20260309.1501000_2
===>   Building gpu-firmware-amd-kmod-yellow-carp-20260309.1501000_2
pkg-static: Unable to access file /usr/ports/graphics/gpu-firmware-amd-kmod/work-yellow_carp/stage/usr/local/%%SDMA_4_4_4%%/boot/modules/amdgpu_sdma_4_4_4_bin.ko:No such file or directory
*** Error code 1

Stop.
make: stopped making "package" in /usr/ports/graphics/gpu-firmware-amd-kmod
 
matt_k can you try this new version? Please clean packages on cache (i.e. # rm /var/cache/pkg/gpu-firmware-amd-kmod* )

If you want to expedite your build. these are the packages you will need:

# make package FLAVOR=dcn_4_0_1
# make package FLAVOR=gc_12_0_0
# make package FLAVOR=psp_14_0_2
# make package FLAVOR=sdma_7_0_0
# make package FLAVOR=vcn_5_0_0
# echo "Removing existing firmware packages"
# pkg remove -g gpu-firmware-amd-kmod*
# echo "Installing new packages"
# pkg install -y work-dcn_4_0_1/pkg/*.pkg
# pkg install -y work-gc_12_0_0/pkg/*.pkg
# pkg install -y work-psp_14_0_2/pkg/*.pkg
# pkg install -y work-sdma_7_0_0/pkg/*.pkg
# pkg install -y work-vcn_5_0_0/pkg/*.pkg

Note: if you are building everything, mullins will fail.

If everything worked fine, you will have the following modules on /boot/modules
  • amdgpu_dcn_4_0_1_dmcub_bin.ko
  • amdgpu_gc_12_0_0_imu_bin.ko
  • amdgpu_gc_12_0_0_me_bin.ko
  • amdgpu_gc_12_0_0_mec_bin.ko
  • amdgpu_gc_12_0_0_mes_bin.ko
  • amdgpu_gc_12_0_0_mes1_bin.ko
  • amdgpu_gc_12_0_0_pfp_bin.ko
  • amdgpu_gc_12_0_0_rlc_bin.ko
  • amdgpu_gc_12_0_0_toc_bin.ko
  • amdgpu_gc_12_0_0_uni_mes_bin.ko
  • amdgpu_psp_14_0_2_sos_bin.ko
  • amdgpu_psp_14_0_2_ta_bin.ko
  • amdgpu_sdma_7_0_0_bin.ko
  • amdgpu_vcn_5_0_0_bin.ko
 

Attachments

I did what you said, the firmware files build successfully, I can see all the files from you list above in /boot/modules/, after reboot I can issue kldload amdgpu and the result is blank screen after loading the amdgpu driver.
This was in /var/log/messages: pastebin

This seems to be the first error, does it mean that the VCN part of firmware failed to load and managed to produce a page fault?
Code:
May 25 20:22:00 slaanesh kernel: [drm] Found VCN firmware Version ENC: 1.12 DEC: 9 VEP: 0 Revision: 15
May 25 20:22:00 slaanesh kernel: drmn0: [mmhub] page fault (src_id:0 ring:158 vmid:0 pasid:0)
EDIT#3: (btw, its the exact same error as before, the only difference are version numbers), it's the same page at the same address, etc.

Also, I have the drm-latest-kmod from the last iteration (your post #16 in this thread). Is that correct?
 
Back
Top