Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/dev remove some old debug code
details: https://anonhg.NetBSD.org/src/rev/a7c5962b56dc
branches: trunk
changeset: 763833:a7c5962b56dc
user: macallan <macallan%NetBSD.org@localhost>
date: Mon Apr 04 22:50:36 2011 +0000
description:
remove some old debug code
diffstat:
sys/arch/sgimips/dev/crmfb.c | 125 +------------------------------------------
1 files changed, 2 insertions(+), 123 deletions(-)
diffs (160 lines):
diff -r 075b2128f7f3 -r a7c5962b56dc sys/arch/sgimips/dev/crmfb.c
--- a/sys/arch/sgimips/dev/crmfb.c Mon Apr 04 22:48:15 2011 +0000
+++ b/sys/arch/sgimips/dev/crmfb.c Mon Apr 04 22:50:36 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $ */
+/* $NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -174,10 +174,6 @@
static int crmfb_setup_video(struct crmfb_softc *, int);
static void crmfb_setup_palette(struct crmfb_softc *);
-#ifdef CRMFB_DEBUG
-void crmfb_test_mte(struct crmfb_softc *);
-#endif
-
static void crmfb_fill_rect(struct crmfb_softc *, int, int, int, int, uint32_t);
static void crmfb_bitblt(struct crmfb_softc *, int, int, int, int, int, int,
uint32_t);
@@ -385,9 +381,6 @@
sc->sc_hot_x = 0;
sc->sc_hot_y = 0;
-#ifdef CRMFB_DEBUG
- crmfb_test_mte(sc);
-#endif
crmfb_setup_ddc(sc);
return;
}
@@ -1183,120 +1176,6 @@
(rxde << 16) | ryde);
}
-#ifdef CRMFB_DEBUG
-void
-crmfb_test_mte(struct crmfb_softc *sc)
-{
- uint64_t addr, reg;
- uint32_t addrs[256];
- int i, j, boo;
-
- crmfb_wait_idle(sc);
- addr = (uint64_t)(DMAADDR(sc->sc_dma) + sc->sc_fbsize);
- addr = addr >> 12;
- for (i = 0; i < 64; i += 8) {
-#if 1
- reg = (addr << 32) | (addr + 1) | 0x8000000080000000LL;
- bus_space_write_8(sc->sc_iot, sc->sc_reh,
- CRIME_RE_LINEAR_A + i, reg);
- printf(" %08x", (uint32_t)(addr & 0xffffffff));
-#endif
- addr += 2;
- }
- printf("\n");
- memset(sc->sc_scratch, 4, 0x10000);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC,
- DE_MODE_LIN_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI |
- DE_MODE_PIXDEPTH_8);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_STRD_SRC, 1);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_DRAWMODE,
- DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP |
- DE_DRAWMODE_XFER_EN);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_ROP, 3);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_PRIMITIVE,
- DE_PRIM_RECTANGLE | DE_PRIM_TB);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_ADDR_SRC, 0);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_X_VERTEX_0,
- 0x02000000);
- bus_space_write_4(sc->sc_iot, sc->sc_reh,
- CRIME_DE_X_VERTEX_1 | CRIME_DE_START,
- 0x04000100);
-
- crmfb_wait_idle(sc);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC,
- DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI |
- DE_MODE_PIXDEPTH_8);
-
-#if 1
- delay(4000000);
-
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_BG, 0x15151515);
- crmfb_wait_idle(sc);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_MODE,
- MTE_MODE_DST_ECC |
- (MTE_TLB_LIN_A << MTE_DST_TLB_SHIFT) |
- (MTE_TLB_A << MTE_SRC_TLB_SHIFT) |
- (MTE_DEPTH_8 << MTE_DEPTH_SHIFT) |
- 0/*MTE_MODE_COPY*/);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST_STRIDE, 1);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC_STRIDE, 1);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC0, 0x00000000);
- //bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC1, 0x01000100);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST0, 0x00000000);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST1 |
- CRIME_DE_START, 0x00010000);
- //status[9] = bus_space_read_4(sc->sc_iot, sc->sc_reh, CRIME_DE_STATUS);
- crmfb_wait_idle(sc);
- /* now look for 0x05050505 in RAM */
-
- boo = 0;
- for (i = 0xA0000000; i < 0xB0000000; i += 0x1000)
- if (*((uint32_t *)i) == 0x15151515) {
- /* see if there's more */
- j = 4;
- while ((j < 0x100) && (*((uint32_t *)(i + j)) ==
- 0x15151515))
- j += 4;
- if (j > 0x20) {
- addrs[boo] = i;
- boo++;
- }
- }
- printf("...");
- for (i = 0; i < boo; i++)
- printf(" %08x", addrs[i]);
- printf("\n");
-#endif
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC,
- DE_MODE_LIN_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI |
- DE_MODE_PIXDEPTH_8);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_STRD_SRC, 1);
- crmfb_bitblt(sc, 0, 0, 400, 0, 512, 64, 3);
- crmfb_wait_idle(sc);
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC,
- DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI |
- DE_MODE_PIXDEPTH_8);
-#if 0
- bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_MODE,
- MTE_MODE_DST_ECC |
- (MTE_TLB_A << MTE_DST_TLB_SHIFT) |
- (MTE_TLB_A << MTE_SRC_TLB_SHIFT) |
- (MTE_DEPTH_8 << MTE_DEPTH_SHIFT) |
- 0/*MTE_MODE_COPY*/);
-#endif
- delay(4000000);
-#if 0
- for (i = 0; i < 128; i+=8)
- printf("%016llx\n", bus_space_read_8(sc->sc_iot, sc->sc_reh,
- CRIME_RE_LINEAR_B + i));
-#endif
-#if 0
- printf("flush: %08x\n",
- bus_space_read_4(sc->sc_iot, sc->sc_reh, CRIME_DE_FLUSH));
-#endif
-}
-#endif /* CRMFB_DEBUG */
-
static void
crmfb_copycols(void *cookie, int row, int srccol, int dstcol, int ncols)
{
Home |
Main Index |
Thread Index |
Old Index