Subject: xsrc/24013: i810 Cannot allocate memory
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 01/07/2004 08:45:56
>Number:         24013
>Category:       xsrc
>Synopsis:       i810 Cannot allocate memory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 07 16:46:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6.2_RC3
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
NetBSD bigfour.reedmedia.net 1.6.2_RC3 NetBSD 1.6.2_RC3 (GENERIC) #0: Fri Nov 28 12:06:50 UTC 2003     autobuild@tgm.netbsd.org:/autobuild/netbsd-1-6-PATCH002-RC3/i386/OBJ/autobuild/netbsd-1-6-PATCH002-RC3/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
XFree86 -configure detected i810. It started up fine a few times.
Then it failed with:

-=-=-=-
(II) I810(0): xf86BindGARTMemory: bind key 15 at 0x00000000 (pgoffset 0)
(WW) I810(0): xf86BindGARTMemory: binding of gart memory with key 15
        at offset 0x0 failed (Cannot allocate memory)

Fatal server error:
AddScreen/ScreenInit failed for driver 0
-=-=-=-

This is XFree86 Version 4.3.0 using
/usr/X11R6/lib/modules/drivers/i810_drv.o.
My X came from ftp://ftp.netbsd.org/pub/NetBSD/misc/jmc/X-1.6.2/

When it works successfully:
-=-=-=-
(II) I810(0): xf86BindGARTMemory: bind key 0 at 0x00000000 (pgoffset 0)
(II) I810(0): xf86BindGARTMemory: bind key 1 at 0x00800000 (pgoffset 2048)
(II) I810(0): xf86BindGARTMemory: bind key 2 at 0x00c00000 (pgoffset 3072)
(II) I810(0): Adding 512 scanlines for pixmap caching
(II) I810(0): Allocated Scratch Memory
(WW) I810(0): remove MTRR eff00000 - eff80000
(WW) I810(0): set MTRR e8000000 - ec000000
(II) I810(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(WW) I810(0): remove MTRR a0000 - b0000
...
-=-=-=-

Greg Troxel mentioned similar issues:

http://mail-index.netbsd.org/port-i386/2003/01/27/0013.html
http://mail-index.netbsd.org/port-i386/2003/01/29/0008.html 
He said "I edited sys/dev/pci/agp.c to put in more printfs at
failure points, rebooted, and now X works.  It may be that the
fresh boot allows memory allocation to succeed, or something more
complex."
http://mail-index.netbsd.org/port-i386/2003/07/07/0003.html
http://mail-index.netbsd.org/port-i386/2004/01/06/0017.html
>How-To-Repeat:
Start XFree86 a few times using i810.
>Fix:
Workarounds:  printf attempt at debugging and starting X right at
boot (and don't restart X later). 

Another workaround is to use "vga" driver instead (but lower
resolution).
	
>Release-Note:
>Audit-Trail:
>Unformatted: