Module Name: src Committed By: macallan Date: Thu Apr 21 18:10:57 UTC 2016
Modified Files: src/sys/dev/sbus: cgthree_sbus.c p9100.c zx.c Log Message: more RASTERCONSOLE purging To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/sbus/cgthree_sbus.c cvs rdiff -u -r1.62 -r1.63 src/sys/dev/sbus/p9100.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/sbus/zx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/sbus/cgthree_sbus.c diff -u src/sys/dev/sbus/cgthree_sbus.c:1.30 src/sys/dev/sbus/cgthree_sbus.c:1.31 --- src/sys/dev/sbus/cgthree_sbus.c:1.30 Tue Sep 14 18:28:18 2010 +++ src/sys/dev/sbus/cgthree_sbus.c Thu Apr 21 18:10:57 2016 @@ -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 @@ cgthreeattach_sbus(device_t parent, devi 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) { Index: src/sys/dev/sbus/p9100.c diff -u src/sys/dev/sbus/p9100.c:1.62 src/sys/dev/sbus/p9100.c:1.63 --- src/sys/dev/sbus/p9100.c:1.62 Fri Jul 25 08:10:38 2014 +++ src/sys/dev/sbus/p9100.c Thu Apr 21 18:10:57 2016 @@ -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_ramdac_write_ctl(struc 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 paddr_t p9100_mmap(void *, void * 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 bool p9100_resume(device_t, const static void p9100_set_extvga(void *, int); #endif -#if NWSDISPLAY > 0 struct wsdisplay_accessops p9100_accessops = { p9100_ioctl, p9100_mmap, @@ -267,7 +264,6 @@ struct wsdisplay_accessops p9100_accesso 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 @@ p9100_sbus_attach(device_t parent, devic 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_sbus_attach(device_t parent, devic * 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 @@ p9100_sbus_attach(device_t parent, devic 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 @@ p9100_sbus_attach(device_t parent, devic 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 @@ p9100_sbus_attach(device_t parent, devic 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 @@ p9100_sbus_attach(device_t parent, devic #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 @@ p9100close(dev_t dev, int flags, int mod { 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 @@ p9100_init_engine(struct p9100_softc *sc } -/* 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_clearscreen(struct p9100_softc *sc 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 @@ p9100mmap(dev_t dev, off_t off, int prot } /* wscons stuff */ -#if NWSDISPLAY > 0 static void p9100_cursor(void *cookie, int on, int row, int col) @@ -1541,8 +1530,6 @@ p9100_load_font(void *v, void *cookie, s } #endif -#endif /* NWSDISPLAY > 0 */ - #if 0 static int p9100_intr(void *arg) Index: src/sys/dev/sbus/zx.c diff -u src/sys/dev/sbus/zx.c:1.40 src/sys/dev/sbus/zx.c:1.41 --- src/sys/dev/sbus/zx.c:1.40 Fri Nov 20 19:09:23 2015 +++ src/sys/dev/sbus/zx.c Thu Apr 21 18:10:57 2016 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.40 #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 @@ __KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.40 #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 @@ static struct fbdriver zx_fbdriver = { 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 @@ struct wsscreen_list zx_screenlist = { 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 @@ zx_attach(device_t parent, device_t self 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 @@ zx_attach(device_t parent, device_t self 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 @@ zx_attach(device_t parent, device_t self * 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 @@ zx_attach(device_t parent, device_t self aa.accessops = &zx_accessops; aa.accesscookie = &sc->vd; config_found(sc->sc_dv, &aa, wsemuldisplaydevprint); -#endif fb_attach(&sc->sc_fb, isconsole); } @@ -1055,7 +1035,6 @@ zx_putchar(void *cookie, int row, int co } } -#if NWSDISPLAY > 0 static int zx_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) @@ -1064,8 +1043,8 @@ zx_ioctl(void *v, void *vs, u_long cmd, struct vcons_data *vd = v; struct zx_softc *sc = vd->cookie; struct wsdisplay_fbinfo *wdf; - struct rasops_info *ri = &sc->sc_fb.fb_rinfo; struct vcons_screen *ms = sc->vd.active; + struct rasops_info *ri = &ms->scr_ri; switch (cmd) { case WSDISPLAYIO_GTYPE: *(u_int *)data = WSDISPLAY_TYPE_SUNTCX; @@ -1098,6 +1077,7 @@ zx_ioctl(void *v, void *vs, u_long cmd, } } } + return 0; } return EPASSTHROUGH; } @@ -1196,5 +1176,3 @@ zx_init_screen(void *cookie, struct vcon ri->ri_ops.eraserows = zx_eraserows; ri->ri_ops.putchar = zx_putchar; } - -#endif /* NWSDISPLAY > 0 */