NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: X on 10.0 RC1 is unusable on my laptop





On 18/11/2023 11:34, tlaronde%kergis.com@localhost wrote:
On Sat, Nov 18, 2023 at 11:14:12AM +0000, Mike Pumford wrote:
Yes, there has been a major refactoring in the Linux code regarding
headers for example. The whole Linux drm-kms is a (fast) moving
target...
I found a better source for patch inspiration :). The FreeBSD drm_kmod repositories. I've had some success by looking at the 5.6 branch there which is a nice close match to what NetBSD 10 has.

Found this change:

https://github.com/freebsd/drm-kmod/commit/1e9cdf6cddb369f7f5ad14203c4bb487520369f7

And translated it into the patch attached to this message. A kernel with this patch boots and runs X successfully Still see a little bit of cache tearing but its better than it was on 9.x (and there are some other patches I've found that might address those).

So this fixes kern/57268 (which I raised). I'll send the patch to that later but I thought I'd share as I know a couple of you are also suffering with similar issues that this might fix



Snippet from Xorg.0.log
[    30.585]    ABI class: X.Org ANSI C Emulation, version 0.4
[ 30.623] (II) modeset(0): glamor X acceleration enabled on Mesa DRI Intel(R) Haswell Desktop
[    30.623] (II) modeset(0): glamor initialized

Tested both firefox and thunderbird including video playback in firefox with no issues.

Mike
? sys/external/bsd/drm2/dist/drm/i915/gt/intel_workarounds-mp.c
? sys/external/bsd/drm2/dist/drm/i915/gt/intel_workarounds_linux.c
Index: sys/external/bsd/drm2/dist/drm/i915/i915_pci.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/i915_pci.c,v
retrieving revision 1.4
diff -u -r1.4 i915_pci.c
--- sys/external/bsd/drm2/dist/drm/i915/i915_pci.c	19 Dec 2021 01:44:49 -0000	1.4
+++ sys/external/bsd/drm2/dist/drm/i915/i915_pci.c	22 Nov 2023 20:32:34 -0000
@@ -442,7 +442,7 @@
 	.has_rc6 = 1, \
 	.has_rc6p = 1, \
 	.has_rps = true, \
-	.ppgtt_type = INTEL_PPGTT_FULL, \
+	.ppgtt_type = INTEL_PPGTT_ALIASING, \
 	.ppgtt_size = 31, \
 	IVB_PIPE_OFFSETS, \
 	IVB_CURSOR_OFFSETS, \
@@ -499,7 +499,7 @@
 	.has_rps = true,
 	.display.has_gmch = 1,
 	.display.has_hotplug = 1,
-	.ppgtt_type = INTEL_PPGTT_FULL,
+	.ppgtt_type = INTEL_PPGTT_ALIASING,
 	.ppgtt_size = 31,
 	.has_snoop = true,
 	.has_coherent_ggtt = false,


Home | Main Index | Thread Index | Old Index