summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/creator.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-08-19 20:16:05 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-08-19 20:16:05 +0000
commitb4d83f1109d682e5a806289bc2878a2fc4571bc9 (patch)
tree88f28c34026dd47224761af55f44bf93d193d787 /sys/arch/sparc64/dev/creator.c
parenta8f1e875558246527f7225e86ea65d9c3f076807 (diff)
Take advantage of rasops.updatecursor to keep the prom cursor up to date
Diffstat (limited to 'sys/arch/sparc64/dev/creator.c')
-rw-r--r--sys/arch/sparc64/dev/creator.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c
index 6b912fe8528..993938b4019 100644
--- a/sys/arch/sparc64/dev/creator.c
+++ b/sys/arch/sparc64/dev/creator.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */
+/* $OpenBSD: creator.c,v 1.21 2002/08/19 20:16:04 jason Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -83,9 +83,10 @@ void creator_ras_init(struct creator_softc *);
void creator_ras_copyrows(void *, int, int, int);
void creator_ras_erasecols(void *, int, int, int, long int);
void creator_ras_eraserows(void *, int, int, long int);
-void creator_ras_do_cursor(struct rasops_info *);
+void creator_ras_updatecursor(struct rasops_info *);
void creator_ras_fill(struct creator_softc *);
void creator_ras_setfg(struct creator_softc *, int32_t);
+void creator_ras_updatecursor(struct rasops_info *);
struct wsdisplay_accessops creator_accessops = {
creator_ioctl,
@@ -159,15 +160,14 @@ creator_attach(struct creator_softc *sc)
creator_stdscreen.textops = &sc->sc_rasops.ri_ops;
if (sc->sc_console) {
- int *ccolp, *crowp;
long defattr;
- if (romgetcursoraddr(&crowp, &ccolp))
- ccolp = crowp = NULL;
- if (ccolp != NULL)
- sc->sc_rasops.ri_ccol = *ccolp;
- if (crowp != NULL)
- sc->sc_rasops.ri_crow = *crowp;
+ if (romgetcursoraddr(&sc->sc_crowp, &sc->sc_ccolp))
+ sc->sc_ccolp = sc->sc_crowp = NULL;
+ if (sc->sc_ccolp != NULL)
+ sc->sc_rasops.ri_ccol = *sc->sc_ccolp;
+ if (sc->sc_crowp != NULL)
+ sc->sc_rasops.ri_crow = *sc->sc_crowp;
/* fix color choice */
wscol_white = 0;
@@ -177,6 +177,8 @@ creator_attach(struct creator_softc *sc)
sc->sc_rasops.ri_ops.alloc_attr(&sc->sc_rasops,
0, 0, 0, &defattr);
+ sc->sc_rasops.ri_updatecursor = creator_ras_updatecursor;
+
wsdisplay_cnattach(&creator_stdscreen, &sc->sc_rasops,
sc->sc_rasops.ri_ccol, sc->sc_rasops.ri_crow, defattr);
}
@@ -510,3 +512,15 @@ creator_ras_setfg(sc, fg)
FBC_WRITE(sc, FFB_FBC_FG, fg);
creator_ras_wait(sc);
}
+
+void
+creator_ras_updatecursor(ri)
+ struct rasops_info *ri;
+{
+ struct creator_softc *sc = ri->ri_hw;
+
+ if (sc->sc_crowp != NULL)
+ *sc->sc_crowp = ri->ri_crow;
+ if (sc->sc_ccolp != NULL)
+ *sc->sc_ccolp = ri->ri_ccol;
+}