Open fullermd opened 4 years ago
This needs to be properly tested on 11.3, 12.0 and 12.1 before it can land.
@zeising : These changes look good to me. Can we merge them?
I have merged this and #226 on top of drm-v4.11-fbsd11.2 and testing this on my 11.3-STABLE laptop with Intel GM45. So far, so good, at least it builds, runs and even OpenGL is available.
How can I test if MSI work properly?
Any reason why you're not using the 4.16 branch ?
Any reason why you're not using the 4.16 branch ?
No reason, I am new to this project and I was installing graphics/drm-fbsd11.2-kmod
port since I am running 11.3
drm-v4.16 as of e0ca91267 fails on 11.3-STABLE #0 r356413 with
radziecki> git log -1 --oneline
e0ca91267 (HEAD -> drm-v4.16, origin/drm-v4.16, origin/HEAD) Remove VM_WAIT
radziecki> script /tmp/build.log make
Script started, output file is /tmp/build.log
===> linuxkpi (all)
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_iov_if.m -h
Warning: Object directory not changed from original /usr/home/saper/sw/kms-drm/linuxkpi
cc -O2 -pipe -include /usr/home/saper/sw/kms-drm/drivers/gpu/drm/drm_os_config.h '-DKBUILD_MODNAME="linuxkpi_gplv2"' -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/home/saper/sw/kms-drm/include -I/usr/home/saper/sw/kms-drm/linuxkpi/dummy/include -I/usr/home/saper/sw/kms-drm/linuxkpi/gplv2/include -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.linux_anon_inodefs.o -MTlinux_anon_inodefs.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 -Winline -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-error-address-of-packed-member -Wno-pointer-arith -mno-aes -mno-avx -std=iso9899:1999 -c /usr/home/saper/sw/kms-drm/linuxkpi/gplv2/src/linux_anon_inodefs.c -o linux_anon_inodefs.o
In file included from /usr/home/saper/sw/kms-drm/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
/usr/home/saper/sw/kms-drm/linuxkpi/gplv2/include/linux/debugfs.h:19:10: fatal error: 'linux/seq_file.h' file not found
#include <linux/seq_file.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make[1]: stopped in /usr/home/saper/sw/kms-drm/linuxkpi
*** Error code 1
Stop.
make: stopped in /usr/home/saper/sw/kms-drm
Script done, output file is /tmp/build.log
Same for
2ccbcda53 (HEAD -> drm-v5.0, origin/drm-v5.0) Remove VM_WAIT
Sorry @evadot this comment was really to my backport to 11.3 which is https://github.com/FreeBSDDesktop/kms-drm/pull/226
These changes allow running the 4.11 kmod on recentish stable/12, by cherrypicking back several recent changes from the 4.16 branch. I've now had several weeks on a radeonkms and an amdgpu system, without obvious incident.
This compiles against a stable/11 sys/ tree, but I don't have any 11.2 systems around to try running it on. I wouldn't naively expect issues from the sort of changes involved; if there were, I'd expect the MSI changes would be the likely cause.
In a minimalistic mold, the header added in linuxkpi/gplv2/src/linux_compat.c may be the only bit strictly necessary to get it to build and run on 12.