Closed dumbbell closed 1 year ago
The backport is complete. It works fine so far with my Radeon RX 6700 XT. However, the i915 driver is broken. I need to bisect and locate the regression.
The backport is complete. It works fine so far with my Radeon RX 6700 XT. However, the i915 driver is broken. I need to bisect and locate the regression.
It works fine (so far) also with my AMD Radeon RX 6500 XT.
Thanks!
I pushed a bug fix to the freebsd-src branch which fixes the i915 driver.
I also pushed updated firmwares to drm-kmod-firmware. This includes the firmwares for Intel Alder Lake. The driver starts to attach to my 12th gen Intel GPU, but crashes in the way with a green screen with nothing on it. Anyway, Alder Lake support is still beta in Linux 5.15.
It doesn't seem to me that the i915 driver issue has been fixed. I checked out the latest linuxkpi-updates-for-drm sources, set SYSDIR to those sources, and compiled drm-kmod-5.15. But after loading sway, I experienced a flickering issue on my display. By the way, it wasn't even possible for me to compile the linuxkpi-updates-for-drm kernel because I got a compilation error. So, as I said, I simply compiled v5.15 drm-kmod using the linuxkpi-updates-for-drm sources and after installing it, I loaded i915kms under a kernel from the main branch. I didn't experience problems before loading sway, but as I said, after loading sway, I experienced the flickering issue.
Oh, never mind. I succeeded in compiling the linuxkpi-updates-for-drm kernel after dealing with that WERROR thing. Under this kernel, I no longer experience any flickering issues. Good work!
I'm unable to build with the following error:
/usr/home/orbitz/projects/drm-kmod/drivers/gpu/drm/drm_auth.c:66:2: error: implicit declaration of function 'lockdep_assert_once' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
lockdep_assert_once(lockdep_is_held(&fpriv->master_lookup_lock) ||
^
1 error generated.
*** Error code 1
I think I setup everything correctly...
I'm unable to build with the following error:
/usr/home/orbitz/projects/drm-kmod/drivers/gpu/drm/drm_auth.c:66:2: error: implicit declaration of function 'lockdep_assert_once' is invalid in C99 [-Werror,-Wimplicit-function-declaration] lockdep_assert_once(lockdep_is_held(&fpriv->master_lookup_lock) || ^ 1 error generated. *** Error code 1
I think I setup everything correctly...
Are you sure your SYSDIR points to the linuxkpi-updates-for-drm kernel sources?
This was my mistake. I missed a step, but I have corrected it. I'm at the point where it crashes and I get a green screen, like @dumbbell , so I'll take that as a positive step.
Works fine on my i7-8550U's UHD Graphics 620. Suspend/resume tested. Thanks!
I submitted a pull request for the firmwares update (freebsd/drm-kmod-firmware#26) as well as all freebsd-src patches to Phabricator. The description at the top is updated with this information.
This was my mistake. I missed a step, but I have corrected it. I'm at the point where it crashes and I get a green screen, like @dumbbell , so I'll take that as a positive step.
What do you mean? Dumbbell no longer gets a green or "nightclub" screen and neither do any of us because as he already mentioned, he corrected the issue.
This was my mistake. I missed a step, but I have corrected it. I'm at the point where it crashes and I get a green screen, like @dumbbell , so I'll take that as a positive step.
What do you mean? Dumbbell no longer gets a green or "nightclub" screen and neither do any of us because as he already mentioned, he corrected the issue.
There are/were two different problems:
I have two laptops to test: one with a 9th gen Intel CPU (the one where I experienced the flickering squares) and one with a 12th gen CPU (the one with the green screen). @orbitz must have a 12th gen too.
This was my mistake. I missed a step, but I have corrected it. I'm at the point where it crashes and I get a green screen, like @dumbbell , so I'll take that as a positive step.
What do you mean? Dumbbell no longer gets a green or "nightclub" screen and neither do any of us because as he already mentioned, he corrected the issue.
There are/were two different problems:
- The one you saw, meaning squares flickering all over the place instead of an application window. This was caused by a limitation in our implementation of Linux XArray in the kernel (linuxkpi). This one is fixed. You had to have a fully support GPU for this to happen.
- The green screen is another issue: this is beta support for newer 12th gen Intel GPU. In this Linux 5.15 backport, support for GPUs inside AlderLake-S and -P CPUs is still a work in progress. This was even turned off by default on Linux. The driver is marked as stable in Linux 5.16 for AlderLake-S, and in Linux 5.17 for AlderLake-P.
I have two laptops to test: one with a 9th gen Intel CPU (the one where I experienced the flickering squares) and one with a 12th gen CPU (the one with the green screen). @orbitz must have a 12th gen too.
Oh, I see.
@dumbbell Thank you for the great work. Looking forward to testing the next iteration!
On amdgpu based laptop I get black screen after resume. I can ssh to it, but Xorg can not be stopped, not even with killall -9 Xorg
. I'll try to bisect and report the offending commit.
I didn't bisect this time, as with previous two versions I learned that sometimes bug introduced in one version is fixed in the next, so this time I tested with 5.16 before bisect and my problems with suspend/resume are gone.
I didn't bisect this time, as with previous two versions I learned that sometimes bug introduced in one version is fixed in the next, so this time I tested with 5.16 before bisect and my problems with suspend/resume are gone.
@evadot saw the same regression and the same fix in 5.16. Thank you for taking the time to test!
This is the backport of the DRM drivers from Linux 5.15.
Progress:![](https://progress-bar.dev/100/)
Changes in Linux 5.15
You can read this Phoronix article to learn about the changes in the DRM drivers in Linux 5.15: https://www.phoronix.com/news/Linux-5.15-DRM-Pull
Patches to linuxkpi
This update depends on the following patches to linuxkpi in FreeBSD:
https://reviews.freebsd.org/D38530https://reviews.freebsd.org/D38531https://reviews.freebsd.org/D38532https://reviews.freebsd.org/D38533https://reviews.freebsd.org/D38534https://reviews.freebsd.org/D38535https://reviews.freebsd.org/D38536https://reviews.freebsd.org/D38537https://reviews.freebsd.org/D38538https://reviews.freebsd.org/D38539https://reviews.freebsd.org/D38540https://reviews.freebsd.org/D38541https://reviews.freebsd.org/D38542https://reviews.freebsd.org/D38543All patches are merged into
main
.How to test
You need to run a recent FreeBSD 14-CURRENT to test it.
Here are some instructions:
You need to checkout the FreeBSD
main
src branch, and compile a kernel from that branch:You need to checkout the branch referenced in this pull request and compile it:
This will need access to the FreeBSD src tree cloned above. I don't remember the name of the variable to point the build to it. You can link
/usr/src
to your clone and it will be enough.You will need GPU firmwares in the
kernel.drm
directory as well (drm-kmod-firmware#26). To compile and install them:Load the relevant driver(s) as you usually do.