[Midnightbsd-cvs] [MidnightBSD/src] 595ed6: drm.md: add gap analysis and plan for building drm...
Lucas Holt
noreply at github.com
Thu Jun 11 17:00:15 EDT 2026
Branch: refs/heads/feature/drm-515-kmod-linuxkpi
Home: https://github.com/MidnightBSD/src
Commit: 595ed65268ba27916ba46a3cb763c2a16e62f557
https://github.com/MidnightBSD/src/commit/595ed65268ba27916ba46a3cb763c2a16e62f557
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
A drm.md
Log Message:
-----------
drm.md: add gap analysis and plan for building drm-515-kmod
Document the LinuxKPI gaps between MidnightBSD master (~FreeBSD 13.5-STABLE
level) and FreeBSD 14-STABLE that block graphics/drm-515-kmod, and lay out a
two-workstream plan (LinuxKPI uplift via vendor import + port Makefile
recognition of MidnightBSD). Scope is build/link only; runtime bring-up is
out of scope.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: ed3ad8fa26c2ac35b13e998e395f5edb75df95bb
https://github.com/MidnightBSD/src/commit/ed3ad8fa26c2ac35b13e998e395f5edb75df95bb
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/device.h
M sys/compat/linuxkpi/common/src/linux_devres.c
Log Message:
-----------
linuxkpi: backport devm_add_action()/devm_add_action_or_reset()
Add the devres managed-action helpers from FreeBSD 14-STABLE to the
LinuxKPI devres layer. linux_aperture.c (used by the new linuxkpi_video
module that drm depends on) requires devm_add_action_or_reset().
Implementation is verbatim from FreeBSD 14; builds on the existing
lkpi_devres_alloc()/devres_add() primitives already present in MidnightBSD.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: d6e929a27aa8c8773e36ebdad59ed1d8c7df4013
https://github.com/MidnightBSD/src/commit/d6e929a27aa8c8773e36ebdad59ed1d8c7df4013
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
A sys/compat/linuxkpi/common/include/asm/hypervisor.h
A sys/compat/linuxkpi/common/include/asm/memtype.h
A sys/compat/linuxkpi/common/include/asm/neon.h
A sys/compat/linuxkpi/common/include/kunit/static_stub.h
A sys/compat/linuxkpi/common/include/linux/agp_backend.h
A sys/compat/linuxkpi/common/include/linux/aperture.h
A sys/compat/linuxkpi/common/include/linux/apple-gmux.h
A sys/compat/linuxkpi/common/include/linux/build_bug.h
A sys/compat/linuxkpi/common/include/linux/cleanup.h
A sys/compat/linuxkpi/common/include/linux/container_of.h
A sys/compat/linuxkpi/common/include/linux/device/driver.h
A sys/compat/linuxkpi/common/include/linux/dynamic_debug.h
A sys/compat/linuxkpi/common/include/linux/fips.h
A sys/compat/linuxkpi/common/include/linux/gpf.h
A sys/compat/linuxkpi/common/include/linux/hdmi.h
A sys/compat/linuxkpi/common/include/linux/io-64-nonatomic-lo-hi.h
A sys/compat/linuxkpi/common/include/linux/iommu.h
A sys/compat/linuxkpi/common/include/linux/ioport.h
A sys/compat/linuxkpi/common/include/linux/iosys-map.h
A sys/compat/linuxkpi/common/include/linux/irqdomain.h
A sys/compat/linuxkpi/common/include/linux/kstrtox.h
A sys/compat/linuxkpi/common/include/linux/limits.h
A sys/compat/linuxkpi/common/include/linux/math.h
A sys/compat/linuxkpi/common/include/linux/minmax.h
A sys/compat/linuxkpi/common/include/linux/nodemask.h
A sys/compat/linuxkpi/common/include/linux/of.h
A sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h
A sys/compat/linuxkpi/common/include/linux/string_helpers.h
A sys/compat/linuxkpi/common/include/net/netmem.h
A sys/compat/linuxkpi/common/include/net/page_pool/helpers.h
A sys/compat/linuxkpi/common/include/net/page_pool/types.h
A sys/compat/linuxkpi/common/include/video/cmdline.h
A sys/compat/linuxkpi/common/include/video/vga.h
A sys/compat/linuxkpi/common/include/xen/xen.h
A sys/compat/linuxkpi/common/src/linux_aperture.c
A sys/compat/linuxkpi/common/src/linux_cmdline.c
A sys/compat/linuxkpi/common/src/linux_hdmi.c
A sys/compat/linuxkpi/common/src/linuxkpi_hdmikmod.c
A sys/compat/linuxkpi/common/src/linuxkpi_videokmod.c
A sys/compat/linuxkpi/dummy/include/linux/sysfb.h
M sys/modules/Makefile
A sys/modules/linuxkpi_hdmi/Makefile
A sys/modules/linuxkpi_video/Makefile
Log Message:
-----------
linuxkpi: import FreeBSD 14 additive headers and HDMI/video modules
Bring the LinuxKPI header tree up to FreeBSD 14-STABLE level by importing
the headers MidnightBSD was missing (aperture.h, iosys-map.h, hdmi.h,
iommu.h, irqdomain.h, ioport.h, io-64-nonatomic-lo-hi.h, cleanup.h,
container_of.h, build_bug.h, minmax.h, math.h, limits.h, kstrtox.h,
string_helpers.h, nodemask.h, of.h, agp_backend.h, apple-gmux.h, the
device/ subdir, video/{cmdline,vga}.h, and supporting trees), plus the
dummy linux/sysfb.h.
Add the linuxkpi_hdmi and linuxkpi_video modules (HDMI infoframe helpers,
ACPI-video/backlight, framebuffer aperture handling) that graphics/drm-kmod
links against, and register them in sys/modules/Makefile.
These are required by drm-515-kmod. Existing LinuxKPI files are intentionally
left at MidnightBSD's base-compatible versions: a wholesale FreeBSD 14 import
was evaluated and rejected because it drags base-kernel API changes (AST
framework, protosw refactor, file/fileops API) that would require a much
larger base-kernel uplift. See drm.md.
Both new modules build clean; the core linuxkpi.ko is unchanged and still
builds.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 9ba2bfe2ba6ce63e15efaf43a88f34984b690694
https://github.com/MidnightBSD/src/commit/9ba2bfe2ba6ce63e15efaf43a88f34984b690694
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M drm.md
Log Message:
-----------
drm.md: revise to hybrid approach after empirical wholesale-import test
Wholesale FreeBSD 14 LinuxKPI import was tested and rejected: it fails on
base-kernel API deltas (AST framework, protosw refactor, file/fileops API)
that would require a large base-kernel uplift. Document the hybrid approach
(additive import + targeted backports) and record progress.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: e237d841d29cef210d80f6a9c49fa1c15ede78da
https://github.com/MidnightBSD/src/commit/e237d841d29cef210d80f6a9c49fa1c15ede78da
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M drm.md
Log Message:
-----------
drm.md: correct Workstream B to target mports, not FreeBSD ports
/usr/ports is the upstream FreeBSD ports tree and is not operational under
MidnightBSD make. The drm-515-kmod port must be created in MidnightBSD's
mports (/usr/mports) by modeling the existing drm-510-kmod.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: e1b2571506c33ebc6cb74a25ace19375ee94ed5c
https://github.com/MidnightBSD/src/commit/e1b2571506c33ebc6cb74a25ace19375ee94ed5c
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/mm.h
M sys/compat/linuxkpi/common/src/linux_compat.c
Log Message:
-----------
linuxkpi: use single-argument vm_operations_struct.fault callback
drm 5.15 (ttm_bo_vm.c and others) installs fault handlers of type
vm_fault_t (*)(struct vm_fault *) — the modern Linux signature. Update
the LinuxKPI vm_operations_struct.fault prototype to match and drop the
redundant vm_area_struct argument at the two call sites in the cdev pager
fault path (the vma is already available via vmf->vma, set just above).
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: bbb1e80b2efef5b84a93797115d8c5fed5f8090b
https://github.com/MidnightBSD/src/commit/bbb1e80b2efef5b84a93797115d8c5fed5f8090b
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/kernel.h
Log Message:
-----------
linuxkpi: make linux/kernel.h pull in linux/math64.h
drm 5.15 sources (e.g. drm_mm.c) use div64_u64_rem() with only
<linux/kernel.h> in their include chain. FreeBSD 14 satisfies this via
kernel.h -> math.h; MidnightBSD's kernel.h did not reach the div64_*
helpers. Include <linux/math64.h> directly from kernel.h so the helpers
are visible wherever kernel.h is (transitively) included. No macro
overlap; linuxkpi.ko still builds clean.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: bfe10c2ccd7649e622f74fe55f62c9b5c3589af4
https://github.com/MidnightBSD/src/commit/bfe10c2ccd7649e622f74fe55f62c9b5c3589af4
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/asm/intel-family.h
M sys/compat/linuxkpi/common/include/linux/pci.h
Log Message:
-----------
linuxkpi: add pcie_aspm_enabled() and Alder Lake INTEL_FAM6 ids
amdgpu (amdgpu_device.c/amdgpu_drv.c) uses pcie_aspm_enabled() and the
INTEL_FAM6_ALDERLAKE* model ids. Add the pci.h stub (returns false, as in
FreeBSD 14) and sync asm/intel-family.h to FreeBSD 14.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: da672552dc0681ac346e7d3e566cbe43c88d53e8
https://github.com/MidnightBSD/src/commit/da672552dc0681ac346e7d3e566cbe43c88d53e8
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/compiler.h
Log Message:
-----------
linuxkpi: define noinline_for_stack
amdgpu's DML display code (display_mode_vba_30.c and others) uses the
noinline_for_stack attribute. Add it to linux/compiler.h as __noinline,
matching FreeBSD 14.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 5a9a21931cd3cb8d21a39a71f1bc838500c3f62c
https://github.com/MidnightBSD/src/commit/5a9a21931cd3cb8d21a39a71f1bc838500c3f62c
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/bitmap.h
Log Message:
-----------
linuxkpi: add bitmap_to_arr32()
amdgpu's SMU power-management code (smu_v11_0.c, smu_v13_0.c) uses
bitmap_to_arr32(). Add it to linux/bitmap.h, matching FreeBSD 14.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: ee8713fc09821fb5c1aeec1524de5496572bd178
https://github.com/MidnightBSD/src/commit/ee8713fc09821fb5c1aeec1524de5496572bd178
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/acpi/acpi.h
Log Message:
-----------
linuxkpi: add acpi_put_table()
radeon (radeon_bios.c) releases ACPI tables with acpi_put_table(), the
companion to the already-present acpi_get_table(). Add it mapping to
ACPICA's AcpiPutTable(), matching FreeBSD 14.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: cc8990a058e5c0c84aa41f9c52e07ff6af88f068
https://github.com/MidnightBSD/src/commit/cc8990a058e5c0c84aa41f9c52e07ff6af88f068
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/kernel.h
Log Message:
-----------
linuxkpi: move BUILD_BUG machinery to linux/build_bug.h
i915 includes <linux/build_bug.h> directly; the imported FreeBSD 14
build_bug.h and MidnightBSD's kernel.h both defined the _O___CTASSERT /
BUILD_BUG_ON machinery, causing -Werror=macro-redefined. Follow FreeBSD
14: keep the machinery in build_bug.h and include it from kernel.h
(BUG/BUG_ON/WARN_ON remain in kernel.h). linuxkpi.ko builds clean.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: ec134808be3e17b3f0f27612a0f5321da6c44706
https://github.com/MidnightBSD/src/commit/ec134808be3e17b3f0f27612a0f5321da6c44706
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/dmi.h
A sys/compat/linuxkpi/dummy/include/linux/util_macros.h
Log Message:
-----------
linuxkpi: self-contain dmi.h errno use; import dummy util_macros.h
- dmi.h: include <linux/errno.h> (uses ENXIO; was relying on include order
that drm's panel-orientation-quirks TU doesn't satisfy).
- import dummy linux/util_macros.h (i915 intel_snps_phy.c includes it).
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 29bf11a3cc1b74a6f6c2d563f7c961609e9106be
https://github.com/MidnightBSD/src/commit/29bf11a3cc1b74a6f6c2d563f7c961609e9106be
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/interrupt.h
M sys/compat/linuxkpi/common/include/linux/slab.h
M sys/compat/linuxkpi/common/src/linux_tasklet.c
Log Message:
-----------
linuxkpi: backport tasklet callback API and ZERO_SIZE_PTR
i915 (intel_engine_cs.c, intel_execlists_submission.c, gen6_ppgtt.c) uses
the newer Linux tasklet callback API and ZERO_SIZE_PTR:
- interrupt.h: add tasklet_callback_t, tasklet_struct.callback/use_callback,
from_tasklet(), and the tasklet_setup() prototype (with a forward decl of
struct tasklet_struct).
- linux_tasklet.c: dispatch via ->callback when use_callback is set;
initialise the new fields; add tasklet_setup().
- slab.h: define ZERO_SIZE_PTR and have ZERO_OR_NULL_PTR() test it.
All from FreeBSD 14. linuxkpi.ko builds clean.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 8d5afe962cb1a61a1847830ed052e6a1727c8c07
https://github.com/MidnightBSD/src/commit/8d5afe962cb1a61a1847830ed052e6a1727c8c07
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
A sys/compat/linuxkpi/dummy/include/linux/time64.h
Log Message:
-----------
linuxkpi: import linux/time64.h for i915 (intel_guc_ct.c)
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: c4efb84c0cefb2099c4e89e92a7c01370760a3eb
https://github.com/MidnightBSD/src/commit/c4efb84c0cefb2099c4e89e92a7c01370760a3eb
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/device.h
M sys/compat/linuxkpi/common/include/linux/pci.h
M sys/compat/linuxkpi/common/include/linux/pm.h
M sys/compat/linuxkpi/common/src/linux_pci.c
Log Message:
-----------
linuxkpi: add PCI/device power-state bits used by i915 debugfs
i915_debugfs.c reads dev->power.usage_count, pdev->current_state and
pci_power_name(). Backport from FreeBSD 14:
- pm.h: struct dev_pm_info { atomic_t usage_count; }
- device.h: struct device.power
- pci.h: struct pci_dev.current_state, extern pci_power_names[6],
pci_power_name()
- linux_pci.c: define pci_power_names[].
linuxkpi.ko builds clean.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 0268c4118f1396465639675d4bc11682ea1b4538
https://github.com/MidnightBSD/src/commit/0268c4118f1396465639675d4bc11682ea1b4538
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M sys/compat/linuxkpi/common/include/linux/kernel.h
Log Message:
-----------
linuxkpi: move U*_MAX/S*_MAX limit macros to linux/limits.h
i915 includes <linux/limits.h>; the imported FreeBSD 14 limits.h and
MidnightBSD's kernel.h both defined U8_MAX..S64_MIN, causing
-Werror=macro-redefined. Follow FreeBSD 14: keep them in limits.h and
include it from kernel.h (the U8_C/S8_C etc. helper macros stay in
kernel.h). linuxkpi.ko builds clean.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: b90d20c3514323d01a3f55daba2bbce1e513d028
https://github.com/MidnightBSD/src/commit/b90d20c3514323d01a3f55daba2bbce1e513d028
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M drm.md
Log Message:
-----------
drm.md: record successful build of all six drm-515 modules
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Compare: https://github.com/MidnightBSD/src/compare/595ed65268ba%5E...b90d20c35143
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list