Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-10]: src/sys/arch/vax Pull up following revision(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/5c148c31f84d
branches: netbsd-10
changeset: 373480:5c148c31f84d
user: martin <martin%NetBSD.org@localhost>
date: Sun Feb 12 12:27:26 2023 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #79):
sys/arch/vax/conf/GENERIC: revision 1.217
sys/arch/vax/conf/VAX780: revision 1.34
sys/arch/vax/conf/files.vax: revision 1.126
sys/arch/vax/vsa/smg.c: revision 1.63
sys/arch/vax/include/qdreg.h: revision 1.7
sys/arch/vax/vax/conf.c: revision 1.69
sys/arch/vax/conf/INSTALL: revision 1.76
sys/arch/vax/vsa/gpx.c: revision 1.1
Add a support for gpx(4) color framebuffer found on VAXstation 3100.
Ported from OpenBSD/vax. Note smg(4) monochrome onboard framebuffer
driver is also changed attached only if gpx(4) is not installed
or flags 1 is specified in config files, as OpenBSD did.
Tested on my VAXstation 3100/m30 with and without 8bpp gpx(4).
Revied on port-vax@ and "Please go ahead!" from ragge@.
https://mail-index.netbsd.org/port-vax/2023/01/thread1.html#004147
diffstat:
sys/arch/vax/conf/GENERIC | 6 +-
sys/arch/vax/conf/INSTALL | 4 +-
sys/arch/vax/conf/VAX780 | 4 +-
sys/arch/vax/conf/files.vax | 9 +-
sys/arch/vax/include/qdreg.h | 10 +-
sys/arch/vax/vax/conf.c | 24 +-
sys/arch/vax/vsa/gpx.c | 1361 ++++++++++++++++++++++++++++++++++++++++++
sys/arch/vax/vsa/smg.c | 109 ++-
8 files changed, 1482 insertions(+), 45 deletions(-)
diffs (truncated from 1752 to 300 lines):
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/conf/GENERIC
--- a/sys/arch/vax/conf/GENERIC Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/conf/GENERIC Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.216 2022/09/29 10:10:10 riastradh Exp $
+# $NetBSD: GENERIC,v 1.216.4.1 2023/02/12 12:27:26 martin Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.216 $"
+#ident "GENERIC-$Revision: 1.216.4.1 $"
# Here are all different supported CPU types listed.
#options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800
@@ -185,6 +185,7 @@
asc0 at vsbus0 csr 0x200c0080 # VS4000/60 (or VLC) SCSI-ctlr
asc0 at vsbus0 csr 0x26000080 # VS4000/90 and 4000/10x SCSI-ctlr
smg0 at vsbus0 csr 0x200f0000 # Small monochrome display ctlr.
+gpx0 at vsbus0 csr 0x3c000000 # VS3100 GPX display option
#clr0 at vsbus0 csr 0x30000000 # 4- or 8-bitplans color graphics
spx0 at vsbus0 csr 0x38000000 # Low Cost SPX on VS4000/90.
lcg0 at vsbus0 csr 0x21801000 # VS4000/60 (or VLC) graphics
@@ -271,6 +272,7 @@
# VAXstation graphics support
wsdisplay* at smg0
+wsdisplay* at gpx0
wsdisplay* at spx0
wsdisplay* at lcg0
#wsdisplay* at clr0
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/conf/INSTALL
--- a/sys/arch/vax/conf/INSTALL Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/conf/INSTALL Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.75 2020/01/20 18:38:21 thorpej Exp $
+# $NetBSD: INSTALL,v 1.75.24.1 2023/02/12 12:27:26 martin Exp $
#
# INSTALL kernel; all supported devices but nothing fancy.
#
@@ -139,6 +139,7 @@
asc0 at vsbus0 csr 0x200c0080 # VS4000/60 (or VLC) SCSI-ctlr
asc0 at vsbus0 csr 0x26000080 # VS4000/90 and 4000/10x SCSI-ctlr
smg0 at vsbus0 csr 0x200f0000 # Small monochrome display ctlr.
+gpx0 at vsbus0 csr 0x3c000000 # VS3100 GPX display option
#clr0 at vsbus0 csr 0x30000000 # 4- or 8-bitplans color graphics
spx0 at vsbus0 csr 0x38000000 # Low Cost SPX on VS4000/90.
#lcg0 at vsbus0 csr 0x21801000 # VS4000/60 (or VLC) graphics
@@ -217,6 +218,7 @@
# VAXstation graphics support
wsdisplay* at smg0
+wsdisplay* at gpx0
wsdisplay* at spx0
#wsdisplay* at lcg0
#wsdisplay* at clr0
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/conf/VAX780
--- a/sys/arch/vax/conf/VAX780 Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/conf/VAX780 Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: VAX780,v 1.33 2022/08/07 02:52:30 simonb Exp $
+# $NetBSD: VAX780,v 1.33.4.1 2023/02/12 12:27:26 martin Exp $
#
# 11/780,750,730 machine description file
#
@@ -171,6 +171,7 @@
#asc0 at vsbus0 csr 0x200c0080 # VS4000/60 (or VLC) SCSI-ctlr
#asc0 at vsbus0 csr 0x26000080 # VS4000/90 and 4000/10x SCSI-ctlr
#smg0 at vsbus0 csr 0x200f0000 # Small monochrome display ctlr.
+#gpx0 at vsbus0 csr 0x3c000000 # VS3100 GPX display option
#clr0 at vsbus0 csr 0x30000000 # 4- or 8-bitplans color graphics
#spx0 at vsbus0 csr 0x38000000 # Low Cost SPX on VS4000/90.
#lcg0 at vsbus0 csr 0x21801000 # VS4000/60 (or VLC) graphics
@@ -251,6 +252,7 @@
# VAXstation graphics support
#wsdisplay* at smg0
+#wsdisplay* at gpx0
#wsdisplay* at spx0
#wsdisplay* at lcg0
#wsdisplay* at clr0
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/conf/files.vax
--- a/sys/arch/vax/conf/files.vax Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/conf/files.vax Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.vax,v 1.125 2018/12/29 11:30:12 maxv Exp $
+# $NetBSD: files.vax,v 1.125.30.1 2023/02/12 12:27:26 martin Exp $
#
# new style config file for vax architecture
#
@@ -149,7 +149,7 @@
attach mem at xmi with mem_xmi
attach dz at vsbus with dz_vsbus
-file arch/vax/vsa/dz_vsbus.c dz_vsbus | smg
+file arch/vax/vsa/dz_vsbus.c dz_vsbus | smg | gpx
attach lkkbd at dz with dzkbd
file dev/dec/dzkbd.c dzkbd needs-flag
@@ -190,6 +190,11 @@
attach smg at vsbus
file arch/vax/vsa/smg.c smg needs-flag
+# GPX framebuffer on VS3100.
+device gpx: displaydev, wsemuldisplaydev, rasops8
+attach gpx at vsbus
+file arch/vax/vsa/gpx.c gpx needs-flag
+
# Monochrome QVSS framebuffer on qbus (VCB01)
device qv {}: displaydev, wsemuldisplaydev
attach qv at uba
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/include/qdreg.h
--- a/sys/arch/vax/include/qdreg.h Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/include/qdreg.h Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qdreg.h,v 1.6 2021/08/17 22:00:31 andvar Exp $ */
+/* $NetBSD: qdreg.h,v 1.6.4.1 2023/02/12 12:27:26 martin Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -172,10 +172,12 @@
/* VIPER logical function unit codes */
#define LF_ZEROS 0x0000
+#define LF_NOT_D 0x0003
#define LF_D_XOR_S 0x0006
-#define LF_SOURCE 0x000A
-#define LF_D_OR_S 0x000E
-#define LF_ONES 0x000F
+#define LF_SOURCE 0x000a
+#define LF_D 0x000c
+#define LF_D_OR_S 0x000d
+#define LF_ONES 0x000f
#define INV_M1_M2 0x0030
#define FULL_SRC_RESOLUTION 0X00C0 /* makes second pass like first pass */
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/vax/conf.c
--- a/sys/arch/vax/vax/conf.c Sun Feb 12 12:18:24 2023 +0000
+++ b/sys/arch/vax/vax/conf.c Sun Feb 12 12:27:26 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.68 2015/07/05 02:10:53 matt Exp $ */
+/* $NetBSD: conf.c,v 1.68.48.1 2023/02/12 12:27:26 martin Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.68 2015/07/05 02:10:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.68.48.1 2023/02/12 12:27:26 martin Exp $");
#include "opt_cputype.h"
@@ -45,12 +45,28 @@
*/
#include <dev/cons.h>
+#include "gpx.h"
#include "lcg.h"
#include "qv.h"
#include "smg.h"
#include "spx.h"
#include "wskbd.h"
+#if NGPX > 0
+#if NWSKBD > 0
+#define gpxcngetc wskbd_cngetc
+#else
+static int
+gpxcngetc(dev_t dev)
+{
+ return 0;
+}
+#endif
+
+#define gpxcnputc wsdisplay_cnputc
+#define gpxcnpollc nullcnpollc
+#endif /* NGPX > 0 */
+
#if NLCG > 0
#if NWSKBD > 0
#define lcgcngetc wskbd_cngetc
@@ -110,6 +126,7 @@
cons_decl(gen);
cons_decl(dz);
+cons_decl(gpx);
cons_decl(qd);
cons_decl(lcg);
cons_decl(qv);
@@ -133,6 +150,9 @@
cons_init(qd),
#endif
#endif
+#if NGPX
+ cons_init(gpx),
+#endif
#if NLCG
cons_init(lcg),
#endif
diff -r 1cce190fa483 -r 5c148c31f84d sys/arch/vax/vsa/gpx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/vax/vsa/gpx.c Sun Feb 12 12:27:26 2023 +0000
@@ -0,0 +1,1361 @@
+/* $NetBSD: gpx.c,v 1.1.2.2 2023/02/12 12:27:26 martin Exp $ */
+/* $OpenBSD: gpx.c,v 1.25 2014/12/23 21:39:12 miod Exp $ */
+/*
+ * Copyright (c) 2006 Miodrag Vallat.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice, this permission notice, and the disclaimer below
+ * appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*-
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)qd.c 7.1 (Berkeley) 6/28/91
+ */
+
+/************************************************************************
+* *
+* Copyright (c) 1985-1988 by *
+* Digital Equipment Corporation, Maynard, MA *
+* All rights reserved. *
+* *
+* This software is furnished under a license and may be used and *
+* copied only in accordance with the terms of such license and *
+* with the inclusion of the above copyright notice. This *
+* software or any other copies thereof may not be provided or *
+* otherwise made available to any other person. No title to and *
+* ownership of the software is hereby transferred. *
+* *
+* The information in this software is subject to change without *
+* notice and should not be construed as a commitment by Digital *
+* Equipment Corporation. *
+* *
+* Digital assumes no responsibility for the use or reliability *
+* of its software on equipment which is not supplied by Digital. *
+* *
+*************************************************************************/
+
+/*
+ * Driver for the GPX color option on VAXstation 3100, based on the
+ * MicroVAX II qdss driver.
+ *
+ * The frame buffer memory itself is not directly accessible (unlike
+ * the on-board monochrome smg frame buffer), and writes through the
+ * Dragon chip can only happen in multiples of 16 pixels, horizontally.
+ *
+ * Because of this limitation, the font image is copied to offscreen
+ * memory (which there is plenty of), and screen to screen blt operations
+ * are done for everything.
+ */
+
+#include "dzkbd.h"
+#include "wsdisplay.h"
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/systm.h>
+#include <sys/kmem.h>
+#include <sys/conf.h>
Home |
Main Index |
Thread Index |
Old Index