Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/sparc/dev Pull up revision 1.5 of sys/dev/sun/...
details: https://anonhg.NetBSD.org/src/rev/73f0bad09344
branches: netbsd-1-5
changeset: 490552:73f0bad09344
user: jhawk <jhawk%NetBSD.org@localhost>
date: Sat Jan 27 06:52:52 2001 +0000
description:
Pull up revision 1.5 of sys/dev/sun/cgsix.c via patch (requested by tsutsui):
Initialize cgsix registers for machines that do not do so by themselves.
Fixes PR port-sparc/11944.
diffstat:
sys/arch/sparc/dev/cgsix.c | 40 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 1 deletions(-)
diffs (68 lines):
diff -r 1adb1ce993f4 -r 73f0bad09344 sys/arch/sparc/dev/cgsix.c
--- a/sys/arch/sparc/dev/cgsix.c Sat Jan 27 06:44:11 2001 +0000
+++ b/sys/arch/sparc/dev/cgsix.c Sat Jan 27 06:52:52 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgsix.c,v 1.50.4.1 2000/06/30 16:27:38 simonb Exp $ */
+/* $NetBSD: cgsix.c,v 1.50.4.2 2001/01/27 06:52:52 jhawk Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -162,6 +162,26 @@
* Magic values for blitter
*/
+/* Values for the mode register */
+#define CG6_MODE ( \
+ 0x00200000 /* GX_BLIT_SRC */ \
+ | 0x00020000 /* GX_MODE_COLOR8 */ \
+ | 0x00008000 /* GX_DRAW_RENDER */ \
+ | 0x00002000 /* GX_BWRITE0_ENABLE */ \
+ | 0x00001000 /* GX_BWRITE1_DISABLE */ \
+ | 0x00000200 /* GX_BREAD_0 */ \
+ | 0x00000080 /* GX_BDISP_0 */ \
+)
+#define CG6_MODE_MASK ( \
+ 0x00300000 /* GX_BLIT_ALL */ \
+ | 0x00060000 /* GX_MODE_ALL */ \
+ | 0x00018000 /* GX_DRAW_ALL */ \
+ | 0x00006000 /* GX_BWRITE0_ALL */ \
+ | 0x00001800 /* GX_BWRITE1_ALL */ \
+ | 0x00000600 /* GX_BREAD_ALL */ \
+ | 0x00000180 /* GX_BDISP_ALL */ \
+)
+
/* Value for the alu register for screen-to-screen copies */
#define CG6_ALU_COPY ( \
0x80000000 /* GX_PLANE_ONES (ignore planemask register) */ \
@@ -227,6 +247,23 @@
/*EMPTY*/; \
} while (0)
+static void cg6_ras_init(struct cgsix_softc *);
+static void cg6_ras_copyrows(void *, int, int, int);
+static void cg6_ras_copycols(void *, int, int, int, int);
+static void cg6_ras_erasecols(void *, int, int, int, long int);
+static void cg6_ras_eraserows(void *, int, int, long int);
+static void cg6_ras_do_cursor(struct rasops_info *);
+
+static void
+cg6_ras_init(struct cgsix_softc *sc)
+{
+ volatile struct cg6_fbc *fbc = sc->sc_fbc;
+
+ CG6_DRAIN(fbc);
+ fbc->fbc_mode &= ~CG6_MODE_MASK;
+ fbc->fbc_mode |= CG6_MODE;
+}
+
static void
cg6_ras_copyrows(void *cookie, int src, int dst, int n)
{
@@ -481,6 +518,7 @@
sc->sc_fb.fb_rinfo.ri_ops.erasecols = cg6_ras_erasecols;
sc->sc_fb.fb_rinfo.ri_ops.eraserows = cg6_ras_eraserows;
sc->sc_fb.fb_rinfo.ri_do_cursor = cg6_ras_do_cursor;
+ cg6_ras_init(sc);
}
#endif
}
Home |
Main Index |
Thread Index |
Old Index