Subject: Re: losing with i815, NetBSD 1.6-stable, current xsrc
To: None <>
From: Greg Troxel <>
List: port-i386
Date: 01/29/2003 15:29:49
   (WW) I810(0): xf86BindGARTMemory: binding of gart memory with key 15
	   at offset 0x0 failed (Cannot allocate memory)

I downgraded to 4.2.0 (via the 1.6 release tag in xsrc), but that
didn't help.  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.
I am still getting the PGTBL_CTL fixup messages.  I'll try -current
xsrc again some time, and see if restarting X next Monday is

On another note, 24 bpp/1280x1024/75Hz looks horrible with lots of
flicker/artifacts.  24 bpp at 1024x768 looks fine, as does 16 bpp
1280x1024.  I'm quite sure the monitor was fine; it worked on the
previous box and 75 Hz is well within spec (~= 21" Dell trinitron).

I commented earlier about a 'return ENOMEM':

   I don't understand why the return ENOMEM here isn't 'continue;'; it
   seems the idea is to try to allocate smaller chunks if 8 pages doesn't work.

	   for (contigpages = 8; contigpages > 0; contigpages >>= 1) {
		   nseg = (mem->am_size / (contigpages * PAGE_SIZE)) + 1;
		   segs = malloc(nseg * sizeof *segs, M_AGP, M_WAITOK);
		   if (segs == NULL)
			   return ENOMEM;

Now I see why this is so: this is merely the malloc of the bus_dma
structs, not the actual pages.

        Greg Troxel <>