Current-Users archive

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

Re: DRMKMS problem on i386 i915 chipset



Martin Neitzel wrote:

Having a problem getting a 7-BETA KMS kernel to work on my now quite old
Sony VAIO laptop.

Hey, at least you can **see** some dmesg output :-)

For me (attempting my very first -current installation), the kernel
from seven or ten days ago fails with blanking the screen.

Just prior to that, it manages to dump some registers/memory/device
table to the screen.  The blanking (perhaps even panicing?) happens
too fast to let me read anything, though.

This is the i386 port on an ASUS EeePc 1000H, Atom N270 with Intel
945GME graphics.  (Works just fine with Netbsd-5.x and -6.x, incl. drm)

is very helpful to me because it provides a few suggestions for disabling
drivers at userconf stage.

That worked for me. I did:
disable i915drmkms

Which got me a kernel that booted in textmode.

However I've now done some further debugging and I now have a working system with DRMKMS enabled including 3D accelleration in X.

The critical failure in my system was the fact that the DRM driver couldn't map the VGA BIOS to get parameters from it. The reason for this failure turned out to be a piece of memory called the flush page allocated in the i810 AGP driver. The kernel was creating the mapping for this at 0xc0000->0xc0fff which is the first page of the VGA BIOS. Whether this page needs to be allocated or not depends on the system BIOS so it explains why DRMKMS would work for some people on i915 systems and not others.

To fix this I made the mod described in the attached patch to the AGP driver so that it won't accept an allocation for this page in the first 1MB of memory to avoid the BIOS pages. No idea if this patch will fix it for others but perhaps it will. :)

Mike


Index: agp_i810.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/agp_i810.c,v
retrieving revision 1.112.2.2
diff -u -r1.112.2.2 agp_i810.c
--- agp_i810.c	17 Mar 2015 17:52:49 -0000	1.112.2.2
+++ agp_i810.c	3 Apr 2015 20:53:41 -0000
@@ -646,7 +646,7 @@
 		minaddr = PAGE_SIZE;	/* XXX PCIBIOS_MIN_MEM?  */
 		maxaddr = MIN(UINT64_MAX, ~(bus_addr_t)0);
 	}
-
+	minaddr = 0x100000; /* Stay out of ISA mem/BIOS area */
 	/* Allocate or map a pre-allocated a page for it.  */
 	if (ISSET(addr, 1)) {
 		/* BIOS allocated it for us.  Use that.  */


Home | Main Index | Thread Index | Old Index