summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-15 13:23:49 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-15 13:23:49 +0000
commit1d46f2640a734b8385548724292e25bc017da429 (patch)
tree0025a9f39462150f89d4505d2a95e1c38070171c /sys
parentf254aaa4ac1cea16b9e67a8842e30cdc2b573098 (diff)
remove a bunch of debugging printfs and disable agp_debug; prompted by millert@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/agp_i810.c6
-rw-r--r--sys/dev/pci/agpvar.h24
-rw-r--r--sys/dev/pci/vga_pci.c5
3 files changed, 14 insertions, 21 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index db623c5f6fb..60f14d5c6a9 100644
--- a/sys/dev/pci/agp_i810.c
+++ b/sys/dev/pci/agp_i810.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_i810.c,v 1.1 2002/07/12 20:17:03 mickey Exp $ */
+/* $OpenBSD: agp_i810.c,v 1.2 2002/07/15 13:23:48 mickey Exp $ */
/* $NetBSD: agp_i810.c,v 1.8 2001/09/20 20:00:16 fvdl Exp $ */
/*-
@@ -244,17 +244,13 @@ agp_i810_alloc_memory(struct vga_pci_softc *sc, int type, vsize_t size)
* Mapping local DRAM into GATT.
*/
if (size != isc->dcache_size)
-{ printf("agp: size(%d) != isc->dcache_size(%d)\n", size, isc->dcache_size);
return NULL;
-}
} else if (type == 2) {
/*
* Bogus mapping of a single page for the hardware cursor.
*/
if (size != AGP_PAGE_SIZE)
-{ printf("agp: size(%d) != AGP_PAGE_SIZE(%d)\n", size, AGP_PAGE_SIZE);
return NULL;
-}
}
if ((mem = malloc(sizeof *mem, M_DEVBUF, M_WAITOK)) == NULL)
diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h
index 4bad2ff97da..38629c3f113 100644
--- a/sys/dev/pci/agpvar.h
+++ b/sys/dev/pci/agpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: agpvar.h,v 1.1 2002/07/12 20:17:03 mickey Exp $ */
+/* $OpenBSD: agpvar.h,v 1.2 2002/07/15 13:23:48 mickey Exp $ */
/* $NetBSD: agpvar.h,v 1.4 2001/10/01 21:54:48 fvdl Exp $ */
/*-
@@ -39,22 +39,22 @@
* This structure is used to query the state of the AGP system.
*/
struct agp_info {
- u_int32_t ai_mode;
- bus_addr_t ai_aperture_base;
- bus_size_t ai_aperture_size;
- vsize_t ai_memory_allowed;
- vsize_t ai_memory_used;
- u_int32_t ai_devid;
+ u_int32_t ai_mode;
+ bus_addr_t ai_aperture_base;
+ bus_size_t ai_aperture_size;
+ vsize_t ai_memory_allowed;
+ vsize_t ai_memory_used;
+ u_int32_t ai_devid;
};
struct agp_memory_info {
- vsize_t ami_size; /* size in bytes */
- bus_addr_t ami_physical; /* bogus hack for i810 */
- off_t ami_offset; /* page offset if bound */
- int ami_is_bound; /* non-zero if bound */
+ vsize_t ami_size; /* size in bytes */
+ bus_addr_t ami_physical; /* bogus hack for i810 */
+ off_t ami_offset; /* page offset if bound */
+ int ami_is_bound; /* non-zero if bound */
};
-#define AGP_DEBUG
+/* #define AGP_DEBUG */
#ifdef AGP_DEBUG
#define AGP_DPF(x...) do { \
printf("agp: "); \
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 88bdb845398..5e37a8ad7b1 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.13 2002/07/13 20:33:47 mickey Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.14 2002/07/15 13:23:48 mickey Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*-
@@ -688,12 +688,9 @@ agp_generic_bind_memory(struct vga_pci_softc *sc, struct agp_memory *mem,
for (contigpages = 32; contigpages > 0; contigpages >>= 1) {
nseg = (mem->am_size / (contigpages * PAGE_SIZE)) + 1;
-printf("nsegs=%d\n", nseg);
segs = malloc(nseg * sizeof *segs, M_DEVBUF, M_WAITOK);
if (segs == NULL)
-{ printf("malloc(%d) failed\n", nseg * sizeof *segs);
return ENOMEM;
-}
if ((error = bus_dmamem_alloc(sc->sc_dmat, mem->am_size, PAGE_SIZE, 0,
segs, nseg, &mem->am_nseg, BUS_DMA_WAITOK)) != 0) {
free(segs, M_DEVBUF);