Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300/stand/common Move and renamve hyper_ite_fonti...
details: https://anonhg.NetBSD.org/src/rev/e7fea709b8e2
branches: trunk
changeset: 761890:e7fea709b8e2
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Feb 10 11:08:23 2011 +0000
description:
Move and renamve hyper_ite_fontinit() to ite_fontinit1bpp() to share it
among all monochrome framebuffers. Also rename ite_fontinit() to
ite_fontinit8bpp(). From OpenBSD.
diffstat:
sys/arch/hp300/stand/common/ite_dv.c | 4 ++--
sys/arch/hp300/stand/common/ite_gb.c | 4 ++--
sys/arch/hp300/stand/common/ite_hy.c | 33 ++-------------------------------
sys/arch/hp300/stand/common/ite_rb.c | 4 ++--
sys/arch/hp300/stand/common/ite_subr.c | 32 ++++++++++++++++++++++++++++++--
sys/arch/hp300/stand/common/ite_tc.c | 4 ++--
sys/arch/hp300/stand/common/itevar.h | 5 +++--
7 files changed, 43 insertions(+), 43 deletions(-)
diffs (198 lines):
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_dv.c
--- a/sys/arch/hp300/stand/common/ite_dv.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_dv.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_dv.c,v 1.8 2011/02/08 20:20:14 rmind Exp $ */
+/* $NetBSD: ite_dv.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -115,7 +115,7 @@
db_waitbusy(regbase);
ite_fontinfo(ip);
- ite_fontinit(ip);
+ ite_fontinit8bpp(ip);
/*
* Clear the (visible) framebuffer.
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_gb.c
--- a/sys/arch/hp300/stand/common/ite_gb.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_gb.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_gb.c,v 1.8 2011/02/08 20:20:14 rmind Exp $ */
+/* $NetBSD: ite_gb.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -91,7 +91,7 @@
gbcm_waitbusy(regbase);
ite_fontinfo(ip);
- ite_fontinit(ip);
+ ite_fontinit8bpp(ip);
/*
* Clear the display. This used to be before the font unpacking
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_hy.c
--- a/sys/arch/hp300/stand/common/ite_hy.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_hy.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_hy.c,v 1.10 2011/02/08 20:20:14 rmind Exp $ */
+/* $NetBSD: ite_hy.c,v 1.11 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -55,7 +55,6 @@
#define charX(ip,c) \
(((c) % (ip)->cpl) * ((((ip)->ftwidth + 7) / 8) * 8) + (ip)->fontx)
-void hyper_ite_fontinit(struct ite_data *);
void hyper_windowmove(struct ite_data *, int, int, int, int, int, int, int);
void
@@ -76,7 +75,7 @@
*/
hyper_windowmove(ip, 0, 0, 0, 0, ip->fbheight, ip->fbwidth, RR_CLEAR);
- hyper_ite_fontinit(ip);
+ ite_fontinit1bpp(ip);
/*
* Stash the inverted cursor.
@@ -87,34 +86,6 @@
}
void
-hyper_ite_fontinit(struct ite_data *ip)
-{
- u_char *fbmem, *dp;
- int c, l, b;
- int stride, width;
-
- dp = (u_char *)(getword(ip, getword(ip, FONTROM) + FONTADDR) +
- (char *)ip->regbase) + FONTDATA;
- stride = ip->fbwidth >> 3;
- width = (ip->ftwidth + 7) / 8;
-
- for (c = 0; c < 128; c++) {
- fbmem = (u_char *) FBBASE +
- (ip->fonty + (c / ip->cpl) * ip->ftheight) *
- stride;
- fbmem += (ip->fontx >> 3) + (c % ip->cpl) * width;
- for (l = 0; l < ip->ftheight; l++) {
- for (b = 0; b < width; b++) {
- *fbmem++ = *dp;
- dp += 2;
- }
- fbmem -= width;
- fbmem += stride;
- }
- }
-}
-
-void
hyper_putc(struct ite_data *ip, int c, int dy, int dx, int mode)
{
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_rb.c
--- a/sys/arch/hp300/stand/common/ite_rb.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_rb.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_rb.c,v 1.9 2011/02/08 20:20:14 rmind Exp $ */
+/* $NetBSD: ite_rb.c,v 1.10 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -113,7 +113,7 @@
regbase->write_enable = 0x01;
regbase->opwen = 0x00;
- ite_fontinit(ip);
+ ite_fontinit8bpp(ip);
/*
* Stash the inverted cursor.
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_subr.c
--- a/sys/arch/hp300/stand/common/ite_subr.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_subr.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_subr.c,v 1.8 2011/02/10 10:44:22 tsutsui Exp $ */
+/* $NetBSD: ite_subr.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -82,7 +82,35 @@
}
void
-ite_fontinit(struct ite_data *ip)
+ite_fontinit1bpp(struct ite_data *ip)
+{
+ u_char *fbmem, *dp;
+ int c, l, b;
+ int stride, width;
+
+ dp = (u_char *)(getword(ip, getword(ip, FONTROM) + FONTADDR) +
+ (char *)ip->regbase) + FONTDATA;
+ stride = ip->fbwidth >> 3;
+ width = (ip->ftwidth + 7) / 8;
+
+ for (c = 0; c < 128; c++) {
+ fbmem = (u_char *) FBBASE +
+ (ip->fonty + (c / ip->cpl) * ip->ftheight) *
+ stride;
+ fbmem += (ip->fontx >> 3) + (c % ip->cpl) * width;
+ for (l = 0; l < ip->ftheight; l++) {
+ for (b = 0; b < width; b++) {
+ *fbmem++ = *dp;
+ dp += 2;
+ }
+ fbmem -= width;
+ fbmem += stride;
+ }
+ }
+}
+
+void
+ite_fontinit8bpp(struct ite_data *ip)
{
int bytewidth = (((ip->ftwidth - 1) / 8) + 1);
int glyphsize = bytewidth * ip->ftheight;
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/ite_tc.c
--- a/sys/arch/hp300/stand/common/ite_tc.c Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/ite_tc.c Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_tc.c,v 1.8 2011/02/08 20:20:14 rmind Exp $ */
+/* $NetBSD: ite_tc.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -99,7 +99,7 @@
topcat_windowmove(ip, 0, 0, 0, 0, ip->fbheight, ip->fbwidth, RR_CLEAR);
tc_waitbusy(regbase, ip->planemask);
- ite_fontinit(ip);
+ ite_fontinit8bpp(ip);
/*
* Stash the inverted cursor.
diff -r 3a21a637ea2b -r e7fea709b8e2 sys/arch/hp300/stand/common/itevar.h
--- a/sys/arch/hp300/stand/common/itevar.h Thu Feb 10 11:01:31 2011 +0000
+++ b/sys/arch/hp300/stand/common/itevar.h Thu Feb 10 11:08:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itevar.h,v 1.10 2011/02/10 10:52:01 tsutsui Exp $ */
+/* $NetBSD: itevar.h,v 1.11 2011/02/10 11:08:23 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -186,7 +186,8 @@
* Prototypes.
*/
void ite_fontinfo(struct ite_data *);
-void ite_fontinit(struct ite_data *);
+void ite_fontinit1bpp(struct ite_data *);
+void ite_fontinit8bpp(struct ite_data *);
/*
* Framebuffer-specific ITE prototypes.
Home |
Main Index |
Thread Index |
Old Index