diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/tcx.c | 21 | ||||
-rw-r--r-- | sys/arch/sparc/dev/tcxreg.h | 7 |
2 files changed, 22 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c index 95940b873b4..a4343fd118b 100644 --- a/sys/arch/sparc/dev/tcx.c +++ b/sys/arch/sparc/dev/tcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcx.c,v 1.11 2002/09/30 18:07:29 miod Exp $ */ +/* $OpenBSD: tcx.c,v 1.12 2002/10/01 20:55:14 miod Exp $ */ /* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */ /* @@ -63,6 +63,9 @@ /* * color display (TCX) driver. + * + * XXX Use of the vertical retrace interrupt to update the colormap is not + * enabled by default, as it hangs the system on some machines. */ #include <sys/param.h> @@ -279,9 +282,12 @@ tcxattach(parent, self, args) tcx_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols; tcx_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops; - sc->sc_ih.ih_fun = tcx_intr; - sc->sc_ih.ih_arg = sc; - intr_establish(ca->ca_ra.ra_intr[0].int_pri, &sc->sc_ih, IPL_FB); + if (ISSET(sc->sc_sunfb.sf_flags, TCX_INTR)) { + sc->sc_ih.ih_fun = tcx_intr; + sc->sc_ih.ih_arg = sc; + intr_establish(ca->ca_ra.ra_intr[0].int_pri, &sc->sc_ih, + IPL_FB); + } if (isconsole) { fbwscons_console_init(&sc->sc_sunfb, &tcx_stdscreen, -1, @@ -347,7 +353,12 @@ tcx_ioctl(dev, cmd, data, flags, p) error = bt_putcmap(&sc->sc_cmap, cm); if (error) return (error); - tcx_loadcmap_deferred(sc, cm->index, cm->count); + if (ISSET(sc->sc_sunfb.sf_flags, TCX_INTR)) { + tcx_loadcmap_deferred(sc, cm->index, cm->count); + } else { + bt_loadcmap(&sc->sc_cmap, sc->sc_bt, + cm->index, cm->count, 1); + } } break; diff --git a/sys/arch/sparc/dev/tcxreg.h b/sys/arch/sparc/dev/tcxreg.h index 0324d4c13de..40985634f61 100644 --- a/sys/arch/sparc/dev/tcxreg.h +++ b/sys/arch/sparc/dev/tcxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcxreg.h,v 1.2 2002/08/12 10:44:04 miod Exp $ */ +/* $OpenBSD: tcxreg.h,v 1.3 2002/10/01 20:55:14 miod Exp $ */ /* $NetBSD: tcxreg.h,v 1.1 1996/06/19 13:17:35 pk Exp $ */ /* @@ -38,6 +38,11 @@ */ /* + * User flags for tcx. + */ +#define TCX_INTR 0x00000002 /* use retrace interrupt */ + +/* * A TCX is composed of numerous groups of control registers, all with TLAs: * DHC - ??? * TEC - transform engine control? |