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

PortDRM baseVersionMin __FreeBSD_versionMaps to
drm-612-kmodLinux 6.12 LTS6.12.85_1150050915.1+ / 16 (≥1600018)
drm-66-kmodLinux 6.6 LTS6.6.25_10150003115.0 (what NextBSD uses today)
drm-61-kmodLinux 6.1 LTSolderfallback / 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 = 1500068excluded; 15.1 = 1501000ok; 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):

(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

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)

Driver6.6 → 6.12 delta
Intel i915Extended/stabilized coverage up to Meteor Lake / Arrow Lake-class iGPUs.
Intel xeNOT 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.
amdgpuNewer RDNA/Navi generations beyond 6.6; better modern-Radeon compatibility.
radeonLegacy; 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.

  1. Bump the kernel base releng/15.0 → releng/15.1 (the real work). Set FREEBSD_BRANCH: releng/15.1 in 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:amd64 spans all 15.x), so the package ecosystem and the continuous release ingest are unaffected. This is the only change that touches the whole 5-repo chain.
  2. Flip the drm-kmod branch: --branch 6.6-lts → 6.12-lts (one literal, modules build.yml:225), rebuild against the new 15.1 kernel obj.
  3. Re-verify drm.ko’s baked MODULE_DEPENDs. Confirm iic, lindebugfs, linuxkpi_video still satisfy 6.12 drm.ko; if 6.12 adds a new hard dep or helper module, bake it in (new config/NEXTBSD line and/or a src-overlay/conf/files.* fragment, mirroring files.linuxkpi_video). Surfaces at load time (“depends on X — not available”), not at kernel CI.
  4. Check MODULE_DEPEND version 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).
  5. 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).
  6. Bump FW_TAG to a current linux-firmware tag for the new GPUs (independent of DRM version).

7. Risks & sequencing

8. Recommendation

Treat this as two tickets, sequenced:

  1. “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.
  2. “Bump graphics kexts drm-kmod 6.6 → 6.12 + firmware” — rides on (1): branch flip, dep re-verify, FW_TAG bump.

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).