NextBSD graphics: bumping drm-kmod 6.6 → 6.12
Can we move the Intel/AMD/Radeon kexts to the Linux-6.12 DRM backport — and do we need FreeBSD 15.1? A decision plan from a three-agent code/ports review, June 2026.
1. The port landscape
| Port | DRM base | Version | Min __FreeBSD_version | Maps to |
|---|---|---|---|---|
drm-612-kmod | Linux 6.12 LTS | 6.12.85_1 | 1500509 | 15.1+ / 16 (≥1600018) |
drm-66-kmod | Linux 6.6 LTS | 6.6.25_10 | 1500031 | 15.0 (what NextBSD uses today) |
drm-61-kmod | Linux 6.1 LTS | — | older | fallback / non-amd64 |
The graphics/drm-kmod meta-port doesn’t use a single default variable — it selects by OSVERSION (verbatim from its Makefile on freebsd-ports main):
. if ${OSVERSION} >= 1500509 && ${ARCH} == amd64
RUN_DEPENDS+= ${KMODDIR}/drm.ko:graphics/drm-612-kmod # 15.1+ -> 6.12
. elif ${OSVERSION} >= 1500031 && ${ARCH} == amd64
RUN_DEPENDS+= ${KMODDIR}/drm.ko:graphics/drm-66-kmod # 15.0 -> 6.6
. else
RUN_DEPENDS+= ${KMODDIR}/drm.ko:graphics/drm-61-kmod # older -> 6.1
. endif
2. The hard gate: 6.12 needs 15.1
This is over-determined — three independent facts, no judgment call:
(a) The port refuses to build on 15.0. From graphics/drm-612-kmod/Makefile:
.elif ${OSVERSION} < 1500509
IGNORE= not supported on FreeBSD < 1500509, no kernel support
pkg-descr: “for FreeBSD 15 1500509 and above, or FreeBSD 16 1600018 and above.” Versions: 15.0 = 1500068 → excluded; 15.1 = 1501000 → ok; main/16 = 1600018 → ok (sys/sys/param.h).
(b) The 6.12 LinuxKPI symbols are absent from 15.0. 186 LinuxKPI commits landed between releng/15.0 and releng/15.1; the DRM-load-bearing 6.12 additions are all present on 15.1 and verifiably absent from 15.0 (checked with git merge-base --is-ancestor):
fd_file()(6.12struct fdchange),fop_flagsinstruct file_operations(commits7d5531407e77,e51f77079a0d)- the
<asm/unaligned.h> → <linux/unaligned.h>header move (7f3770a0224d), 6.12kvrealloc()variant (ce3348bf1de9),mem_is_zero()(026509a6bc7a) - expanded folio / dma-mapping (
dmam_free_coherent, attrs threading) / xarray /vmap_pfn/ GEM-fault helpers — the exact surface a modern drm core touches
(c) The FreeBSD Foundation scopes the 6.12 port to “15.1 onwards.” The 1500509 gate corresponds to the 15.1-RELEASE line (15.1 shipped 2026-06-16).
3. Where NextBSD is today
The graphics kexts are built from the freebsd/drm-kmod 6.6-lts branch, pulled directly in the modules workflow — not vendored, not pinned by a version variable:
# nextbsd-kernel-modules/.github/workflows/build.yml:225-226 git clone --depth 1 --branch 6.6-lts https://github.com/freebsd/drm-kmod.git /tmp/drm-kmod # built out-of-tree: make -C /tmp/drm-kmod SYSDIR=/usr/src/sys, inside FreeBSD buildenv, # against the NextBSD kernel obj from the kernel 'continuous' release
- The DRM version lives in exactly one place — that
--branch 6.6-ltsliteral. The same checkout also generates the device-id personalities fromi915_pciids.h/amdgpu_drv.c/drm_pciids.h. - Kexts produced:
DMABuf,IOGraphics(drm.ko),TTM,IntelGraphics(i915kms),AMDGraphics(amdgpu),RadeonGraphics(radeonkms), chained viaOSBundleLibraries. - LinuxKPI is baked into the kernel, from stock
releng/15.0(thepatches/serieshas no linuxkpi/drm patch).config/NEXTBSDadds the drm hard-deps GENERIC misses (device iic,options LINDEBUGFS); the third,linuxkpi_video, is wired viasrc-overlay/conf/files.linuxkpi_video. drm.ko’sMODULE_DEPENDs resolve against these baked symbols (NextBSD ships no.kotree, so unbaked deps can’t load). - Firmware is bundled per-vendor inside each kext from
linux-firmwaretag20260519(sparse-clonei915 amdgpu radeon,cp -RLinto<kext>/Contents/Resources/firmware/); the kernel finds the raw blobs via patch0004-...firmware_path.... No separate gpu-firmware kext.
4. Firmware is decoupled from the DRM version
Good news for the bump: FreeBSD’s gpu-firmware-*-kmod ports are date-versioned (YYYYMMDD, currently 20260519) and shared across all drm-XX-kmod lines — one firmware set serves 6.1/6.6/6.12 alike (the meta-port’s only floor is gpu-firmware-kmod ≥ 20220511). NextBSD already bundles linux-firmware 20260519. So the “firmware bump” is just choosing a current linux-firmware tag with blobs for the new GPUs 6.12 enables — independent of the DRM version, no coupling to manage.
5. What 6.12 actually buys (and the Xe gap)
| Driver | 6.6 → 6.12 delta |
|---|---|
Intel i915 | Extended/stabilized coverage up to Meteor Lake / Arrow Lake-class iGPUs. |
Intel xe | NOT present even in 6.12. Lunar Lake / Battlemage (Xe2) need the separate Linux xe driver, not yet ported to FreeBSD (drm-kmod issue #316). The main remaining gap. |
amdgpu | Newer RDNA/Navi generations beyond 6.6; better modern-Radeon compatibility. |
radeon | Legacy; essentially unchanged (older GCN / pre-GCN). |
So: move to 6.12 for newer Intel iGPUs (through Meteor/Arrow Lake) and newer AMD Radeon. Xe2 discrete (Arc B-series Battlemage) and Lunar Lake remain unsupported regardless — that needs an xe port, a separate future effort.
6. The plan
Ordered; the base bump is the prerequisite, the kext bump rides on top.
- Bump the kernel base
releng/15.0 → releng/15.1(the real work). SetFREEBSD_BRANCH: releng/15.1in the kernel and modules workflows; re-apply the 7-patch stack onto 15.1 (rebase; expect minor drift); rebuild the toolchain/base/compat chain. pkg ABI is preserved (FreeBSD:15:amd64spans all 15.x), so the package ecosystem and thecontinuousrelease ingest are unaffected. This is the only change that touches the whole 5-repo chain. - Flip the drm-kmod branch:
--branch 6.6-lts → 6.12-lts(one literal, modulesbuild.yml:225), rebuild against the new 15.1 kernel obj. - Re-verify drm.ko’s baked
MODULE_DEPENDs. Confirmiic,lindebugfs,linuxkpi_videostill satisfy 6.12 drm.ko; if 6.12 adds a new hard dep or helper module, bake it in (newconfig/NEXTBSDline and/or asrc-overlay/conf/files.*fragment, mirroringfiles.linuxkpi_video). Surfaces at load time (“depends on X — not available”), not at kernel CI. - Check
MODULE_DEPENDversion ranges. drm-kmod bumps its internal linuxkpi/drmcompat min/preferred versions between releases; the baked kernel LinuxKPI version must fall in 6.12’s accepted range (tied to step 1). - Re-run the personality generators against the 6.12 source (the workflow already
finds the pciids headers, so path drift is handled; just confirm the table-parsing regexes still match if upstream restructured the macros). - Bump
FW_TAGto a currentlinux-firmwaretag for the new GPUs (independent of DRM version).
7. Risks & sequencing
- The base bump is the cost, not the kext bump. Everything pins
releng/15.0today; moving to 15.1 ripples through toolchain → kernel → modules → compat → ISO. It is a deliberate release-tracking step, not a drop-in. - LinuxKPI symbol gap is the gating blocker — the entire reason this can’t be a modules-only change (see §2).
- New baked
MODULE_DEPENDs are the most likely silent breakage — visible only at kext load, not CI. - Firmware size — amdgpu blobs are already “hundreds of MB” bundled in-kext; 6.12-era i915/amdgpu sets are larger and inflate
graphics-kexts.tar.gzand the ISO. May warrant per-GPU firmware subsetting instead of the whole-vendor-dircp -RL. - No codesign / no special build flags —
ko2kextdoesn’t sign and the drm-kmod build uses no version-specific flags beyond the crossbuildenv, so the wrap step itself needs no change.
8. Recommendation
Treat this as two tickets, sequenced:
- “Bump NextBSD base
releng/15.0 → releng/15.1” — the prerequisite, justified on its own (15.1 LinuxKPI, bug/security fixes, same pkg ABI). Do this first and prove the chain still builds and boots. - “Bump graphics kexts
drm-kmod6.6 → 6.12 + firmware” — rides on (1): branch flip, dep re-verify,FW_TAGbump.
Do not attempt the kext bump on the 15.0 base — it will hit the IGNORE gate / missing-symbol link failures. And set expectations: 6.12 extends Intel through Meteor/Arrow Lake and newer AMD, but does not add Xe2 (Battlemage/Lunar Lake) — that’s a separate xe-port effort.
Sources & caveats
Caveat: code citations for the LinuxKPI delta are against the local freebsd-src with release branches (origin/releng/15.0, origin/releng/15.1, origin/main); port facts are from current upstream (FreshPorts + the freebsd-ports main Makefiles via GitHub raw, since cgit was fetch-blocked).
- Ports: drm-612-kmod, drm-66-kmod, drm-kmod meta, gpu-firmware-kmod; drm-612-kmod Makefile
- Upstream: freebsd/drm-kmod (rel. “DRM from Linux 6.12.85”, 2026-06-01), issue #316 (Xe RFE)
- Announcements: FreeBSD Foundation: graphics port upgraded to Linux 6.12, Phoronix, FreeBSD 15.1 announce
- NextBSD:
nextbsd-kernel-modules/.github/workflows/build.yml(drm-kmod job, firmware bundle),nextbsd-kernel/config/NEXTBSD(graphics deps),src-overlay/conf/files.linuxkpi_video,patches/series;freebsd-src/sys/sys/param.h,sys/compat/linuxkpi.