Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drm-v4.11 on 12.x #193

Open
wants to merge 3 commits into
base: drm-v4.11-fbsd11.2
Choose a base branch
from

Conversation

fullermd
Copy link

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.

    DRM_SYSCTL_PRINT fails without the lock (FreeBSDDesktop#170)
Include header to allow building.
  Enable Message Signaled Interrupts (MSI) (FreeBSDDesktop#163)
@zeising
Copy link
Member

zeising commented Dec 4, 2019

This needs to be properly tested on 11.3, 12.0 and 12.1 before it can land.

@hselasky
Copy link
Contributor

hselasky commented Feb 6, 2020

@zeising : These changes look good to me. Can we merge them?

@saper
Copy link

saper commented Mar 12, 2020

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?

@evadot
Copy link
Contributor

evadot commented Mar 20, 2020

Any reason why you're not using the 4.16 branch ?

@saper
Copy link

saper commented Mar 20, 2020

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

@saper
Copy link

saper commented Mar 20, 2020

drm-v4.16 as of e0ca912 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

@saper
Copy link

saper commented Mar 20, 2020

Sorry @evadot this comment was really to my backport to 11.3 which is #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants