Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus more RASTERCONSOLE purging
details: https://anonhg.NetBSD.org/src/rev/df6b08a90df3
branches: trunk
changeset: 344804:df6b08a90df3
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Apr 21 18:10:57 2016 +0000
description:
more RASTERCONSOLE purging
diffstat:
sys/dev/sbus/cgthree_sbus.c | 5 +++--
sys/dev/sbus/p9100.c | 39 +++++++++++++--------------------------
sys/dev/sbus/zx.c | 30 ++++--------------------------
3 files changed, 20 insertions(+), 54 deletions(-)
diffs (truncated from 335 to 300 lines):
diff -r 2c37b1aad65c -r df6b08a90df3 sys/dev/sbus/cgthree_sbus.c
--- a/sys/dev/sbus/cgthree_sbus.c Thu Apr 21 18:06:06 2016 +0000
+++ b/sys/dev/sbus/cgthree_sbus.c Thu Apr 21 18:10:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgthree_sbus.c,v 1.30 2010/09/14 18:28:18 macallan Exp $ */
+/* $NetBSD: cgthree_sbus.c,v 1.31 2016/04/21 18:10:57 macallan Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.30 2010/09/14 18:28:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.31 2016/04/21 18:10:57 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -172,6 +172,7 @@
if (name == NULL)
name = "cgthree";
+ fb->fb_pixels = NULL;
if (sa->sa_npromvaddrs != 0)
fb->fb_pixels = (void *)(u_long)sa->sa_promvaddrs[0];
if (fb->fb_pixels == NULL) {
diff -r 2c37b1aad65c -r df6b08a90df3 sys/dev/sbus/p9100.c
--- a/sys/dev/sbus/p9100.c Thu Apr 21 18:06:06 2016 +0000
+++ b/sys/dev/sbus/p9100.c Thu Apr 21 18:10:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: p9100.c,v 1.62 2014/07/25 08:10:38 dholland Exp $ */
+/* $NetBSD: p9100.c,v 1.63 2016/04/21 18:10:57 macallan Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.62 2014/07/25 08:10:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.63 2016/04/21 18:10:57 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -207,7 +207,6 @@
static void p9100_init_engine(struct p9100_softc *);
static int p9100_set_depth(struct p9100_softc *, int);
-#if NWSDISPLAY > 0
static void p9100_sync(struct p9100_softc *);
static void p9100_bitblt(void *, int, int, int, int, int, int, int);
static void p9100_rectfill(void *, int, int, int, int, uint32_t);
@@ -236,7 +235,6 @@
static void p9100_init_screen(void *, struct vcons_screen *, int,
long *);
-#endif
static void p9100_init_cursor(struct p9100_softc *);
@@ -256,7 +254,6 @@
static void p9100_set_extvga(void *, int);
#endif
-#if NWSDISPLAY > 0
struct wsdisplay_accessops p9100_accessops = {
p9100_ioctl,
p9100_mmap,
@@ -267,7 +264,6 @@
NULL, /* polls */
NULL, /* scroll */
};
-#endif
#ifdef PNOZZ_USE_LATCH
#define PNOZZ_LATCH(sc, off) if(sc->sc_last_offset != (off & 0xffffff80)) { \
@@ -305,11 +301,9 @@
int i, j;
uint8_t ver, cmap[768];
-#if NWSDISPLAY > 0
struct wsemuldisplaydev_attach_args aa;
struct rasops_info *ri;
unsigned long defattr;
-#endif
sc->sc_last_offset = 0xffffffff;
sc->sc_dev = self;
@@ -354,7 +348,7 @@
* P9100 - all register accesses need to be 'latched in' whenever we
* go to another 0x80 aligned 'page' by reading the framebuffer at the
* same offset
- * XXX apparently the latter isn't true - my SP3GX works fine without
+ * XXX apparently the latter isn't true - my SB3GX works fine without
*/
#ifdef PNOZZ_USE_LATCH
if (fb->fb_pixels == NULL) {
@@ -424,8 +418,14 @@
printf(", %d entry colormap", fb->fb_type.fb_cmsize);
/* make sure we are not blanked */
- if (isconsole)
+ if (isconsole) {
p9100_set_video(sc, 1);
+ delay(1000);
+ /* hopefully make my oldish PLL lock */
+ p9100_set_video(sc, 0);
+ delay(1000000);
+ p9100_set_video(sc, 1);
+ }
/* register with power management */
sc->sc_video = 1;
@@ -437,14 +437,9 @@
if (isconsole) {
printf(" (console)\n");
-#ifdef RASTERCONSOLE
- /*p9100loadcmap(sc, 255, 1);*/
- fbrcons_init(fb);
-#endif
} else
printf("\n");
-#if NWSDISPLAY > 0
wsfont_init();
#ifdef PNOZZ_DEBUG
@@ -504,7 +499,7 @@
aa.accesscookie = &sc->vd;
config_found(self, &aa, wsemuldisplaydevprint);
-#endif
+
fb->fb_type.fb_size = fb->fb_type.fb_height * fb->fb_linebytes;
printf("%s: rev %d / %x, %dx%d, depth %d mem %x\n",
device_xname(self),
@@ -518,7 +513,7 @@
#if NTCTRL > 0
/* register callback for external monitor status change */
- tadpole_register_callback(p9100_set_extvga, sc);
+ if (0) tadpole_register_callback(p9100_set_extvga, sc);
#endif
}
@@ -537,14 +532,13 @@
{
struct p9100_softc *sc = device_lookup_private(&pnozz_cd, minor(dev));
-#if NWSDISPLAY > 0
p9100_init_engine(sc);
p9100_set_depth(sc, 8);
p9100loadcmap(sc, 0, 256);
p9100_clearscreen(sc);
glyphcache_wipe(&sc->sc_gc);
vcons_redraw_screen(sc->vd.active);
-#endif
+
return 0;
}
@@ -743,9 +737,6 @@
}
-/* we only need these in the wsdisplay case */
-#if NWSDISPLAY > 0
-
/* wait until the engine is idle */
static void
p9100_sync(struct p9100_softc *sc)
@@ -894,7 +885,6 @@
p9100_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, sc->sc_bg);
}
-#endif /* NWSDISPLAY > 0 */
static uint8_t
p9100_ramdac_read(struct p9100_softc *sc, bus_size_t off)
@@ -1089,7 +1079,6 @@
}
/* wscons stuff */
-#if NWSDISPLAY > 0
static void
p9100_cursor(void *cookie, int on, int row, int col)
@@ -1541,8 +1530,6 @@
}
#endif
-#endif /* NWSDISPLAY > 0 */
-
#if 0
static int
p9100_intr(void *arg)
diff -r 2c37b1aad65c -r df6b08a90df3 sys/dev/sbus/zx.c
--- a/sys/dev/sbus/zx.c Thu Apr 21 18:06:06 2016 +0000
+++ b/sys/dev/sbus/zx.c Thu Apr 21 18:10:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zx.c,v 1.40 2015/11/20 19:09:23 christos Exp $ */
+/* $NetBSD: zx.c,v 1.41 2016/04/21 18:10:57 macallan Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -39,13 +39,10 @@
*
* o There is lots of unnecessary mucking about rasops in here, primarily
* to appease the sparc fb code.
- *
- * o RASTERCONSOLE is required. X needs the board set up correctly, and
- * that's difficult to reconcile with using the PROM for output.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.40 2015/11/20 19:09:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.41 2016/04/21 18:10:57 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,14 +67,12 @@
#include <dev/sun/fbvar.h>
#include "wsdisplay.h"
-#if NWSDISPLAY > 0
#include <dev/wscons/wsconsio.h>
#include <dev/wsfont/wsfont.h>
#include <dev/rasops/rasops.h>
#include <dev/wscons/wsdisplay_vconsvar.h>
#include "opt_wsemul.h"
-#endif
#include <dev/sbus/zxreg.h>
#include <dev/sbus/zxvar.h>
@@ -87,14 +82,6 @@
#include "ioconf.h"
-#if (NWSDISPLAY == 0) && !defined(RASTERCONSOLE)
-#error Sorry, this driver needs WSCONS or RASTERCONSOLE
-#endif
-
-#if (NWSDISPLAY > 0) && defined(RASTERCONSOLE)
-#error Sorry, RASTERCONSOLE and WSCONS are mutually exclusive
-#endif
-
#define ZX_STD_ROP (ZX_ROP_NEW | ZX_ATTR_WE_ENABLE | \
ZX_ATTR_OE_ENABLE | ZX_ATTR_FORCE_WID)
@@ -154,7 +141,6 @@
zx_unblank, zxopen, zxclose, zxioctl, nopoll, zxmmap
};
-#if NWSDISPLAY > 0
struct wsscreen_descr zx_defaultscreen = {
"std",
0, 0, /* will be filled in -- XXX shouldn't, it's global */
@@ -196,7 +182,6 @@
extern const u_char rasops_cmap[768];
static struct vcons_screen zx_console_screen;
-#endif /* NWSDISPLAY > 0 */
static int
zx_match(device_t parent, cfdata_t cf, void *aux)
@@ -216,11 +201,9 @@
bus_space_handle_t bh;
bus_space_tag_t bt;
struct fbdevice *fb;
-#if NWSDISPLAY > 0
struct wsemuldisplaydev_attach_args aa;
struct rasops_info *ri = &zx_console_screen.scr_ri;
unsigned long defattr;
-#endif
int isconsole, width, height;
sc = device_private(self);
@@ -303,7 +286,6 @@
sc->sc_cmap = malloc(768, M_DEVBUF, M_NOWAIT);
zx_reset(sc);
-#if NWSDISPLAY > 0
sc->sc_width = fb->fb_type.fb_width;
sc->sc_stride = 8192; /* 32 bit */
sc->sc_height = fb->fb_type.fb_height;
@@ -343,7 +325,6 @@
* definition. In this case we fill it from fb to
* avoid problems in case no zx is the console
*/
- ri = &sc->sc_fb.fb_rinfo;
zx_defaultscreen.textops = &ri->ri_ops;
zx_defaultscreen.capabilities = ri->ri_caps;
zx_defaultscreen.nrows = ri->ri_rows;
@@ -356,7 +337,6 @@
aa.accessops = &zx_accessops;
aa.accesscookie = &sc->vd;
config_found(sc->sc_dv, &aa, wsemuldisplaydevprint);
-#endif
Home |
Main Index |
Thread Index |
Old Index