Subject: Re: Is agpart required for installing X on i810 board.
To: kurian kattukaren <kjk@localhost.localdomain>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-x11
Date: 07/25/2003 11:37:27
  [i810 and agpgart]

The agp kernel device has the functionality of this module.  But, it
may not quite work.

On 1.6.1, I found that the following patch helps.  Also, start X
before a lot of memory has been used.  This is bogus, but seems to
help.

Index: agp.c
===================================================================
RCS file: /QUIST-CVS/netbsd/src/sys/dev/pci/agp.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 agp.c
--- agp.c	2003/02/06 13:29:12	1.1.1.2
+++ agp.c	2003/03/05 14:33:29
@@ -515,6 +515,8 @@
 		nseg = (mem->am_size / (contigpages * PAGE_SIZE)) + 1;
 		segs = malloc(nseg * sizeof *segs, M_AGP, M_WAITOK);
 		if (segs == NULL) {
+			printf("%s: can't allocate %d bus_dma_segment_t (size 0x%x)\n",
+			       sc->as_dev.dv_xname, nseg, (int) mem->am_size);
 			lockmgr(&sc->as_lock, LK_RELEASE, 0);
 			return ENOMEM;
 		}
@@ -544,10 +546,13 @@
 	}
 
 	if (contigpages == 0) {
+		printf("%s: contigpages down to 0!\n",
+		       sc->as_dev.dv_xname);
 		lockmgr(&sc->as_lock, LK_RELEASE, 0);
 		return ENOMEM;
 	}
 
+	printf("%s: about to bind individual pages\n", sc->as_dev.dv_xname);
 
 	/*
 	 * Bind the individual pages and flush the chipset's
@@ -583,6 +588,8 @@
 				bus_dmamem_free(sc->as_dmat, mem->am_dmaseg,
 						mem->am_nseg);
 				free(mem->am_dmaseg, M_AGP);
+				printf("%s, error %d in AGP_BIND_PAGE\n",
+				       sc->as_dev.dv_xname, error);
 				lockmgr(&sc->as_lock, LK_RELEASE, 0);
 				return error;
 			}




-- 
        Greg Troxel <gdt@ir.bbn.com>