freebsd / drm-kmod

drm driver for FreeBSD
155 stars 69 forks source link

Missing file "linux/dma-buf-map.h"? #220

Closed christian-moerz closed 1 year ago

christian-moerz commented 1 year ago

Attempting to compile master branch leads to:

===> dmabuf (all)
Warning: Object directory not changed from original /usr/home/user/workspace/graphics/drm-kmod/dmabuf
cc  -O2 -pipe '-DKBUILD_MODNAME="dmabuf"' -DLINUXKPI_VERSION=50000 -DCONFIG_DRM_AMDGPU_CIK -DCONFIG_DRM_AMDGPU_SI -DCONFIG_DRM_AMD_DC -DCONFIG_DRM_AMD_DC_SI -DCONFIG_AMD_PMC -DCONFIG_DRM_I915_FORCE_PROBE='"*"' -DCONFIG_DRM_I915_CAPTURE_ERROR -DCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 -DCONFIG_DRM_I915_STOP_TIMEOUT=100 -DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640 -DCONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 -DCONFIG_DRM_I915_TIMESLICE_DURATION=1 -DCONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000 -DCONFIG_DRM_I915_FENCE_TIMEOUT=10000 -DCONFIG_DRM_MIPI_DSI -DCONFIG_DRM_PANEL_ORIENTATION_QUIRKS -DCONFIG_DRM_FBDEV_EMULATION -DCONFIG_DRM_FBDEV_OVERALLOC=100 -DCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG -DCONFIG_BACKLIGHT_CLASS_DEVICE -DCONFIG_DEBUG_FS -DCONFIG_DMI -DCONFIG_FB -DCONFIG_MTRR -DCONFIG_PCI -DCONFIG_PM -DCONFIG_SMP -DCONFIG_ACPI -DCONFIG_ACPI_SLEEP -DCONFIG_X86 -DCONFIG_X86_PAT -DCONFIG_64BIT -DCONFIG_AS_MOVNTDQA -DCONFIG_COMPAT -DCONFIG_X86_64 -DCONFIG_DRM_AMD_DC_DCN -DCONFIG_DRM_AMD_DC_DCN3_0 -DCONFIG_DRM_AMD_DC_DCN3_01 -DCONFIG_DRM_AMD_DC_DCN3_02  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/home/user/workspace/graphics/drm-kmod/linuxkpi/gplv2/include -I/usr/home/user/workspace/graphics/drm-kmod/linuxkpi/bsd/include -I/usr/src/sys/compat/linuxkpi/common/include -I/usr/home/user/workspace/graphics/drm-kmod/linuxkpi/dummy/include -include /usr/home/user/workspace/graphics/drm-kmod/dmabuf/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include     -MD  -MF.depend.dma-buf.o -MTdma-buf.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-error=unused-but-set-variable -Wno-format-zero-length -Wno-pointer-arith  -mno-aes -mno-avx  -std=iso9899:1999 -c /usr/home/user/workspace/graphics/drm-kmod/drivers/dma-buf/dma-buf.c -o dma-buf.o
In file included from /usr/home/user/workspace/graphics/drm-kmod/drivers/dma-buf/dma-buf.c:53:
/usr/home/user/workspace/graphics/drm-kmod/linuxkpi/gplv2/include/linux/dma-buf.h:28:10: fatal error: 'linux/dma-buf-map.h' file not found
#include <linux/dma-buf-map.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/home/user/workspace/graphics/drm-kmod/dmabuf
*** Error code 1

Stop.
make: stopped in /usr/home/user/workspace/graphics/drm-kmod

Could this file be missing or am I doing something wrong?

evadot commented 1 year ago

You need to update your source tree, this file was added in https://cgit.freebsd.org/src/commit/sys/compat/linuxkpi/common/include/linux/dma-buf-map.h?id=0e5569a08cf02e036774235e54e1008a26167b36 One note, master branch isn't supported on 13.X, it's only supported for CURRENT.