--- src/sys/dev/video/fb/Attic/tga.c 2003/11/09 02:22:35 1.4 +++ src/sys/dev/video/fb/Attic/tga.c 2005/06/10 23:25:06 1.5 @@ -65,6 +65,7 @@ #include #include #include +#include #include #include "vgareg.h" @@ -2229,11 +2230,11 @@ static int bt485_read_hw_cursor(video_adapter_t *adp, int *col, int *row) { struct gfb_softc *sc; - int error, s; + int error; error = 0; sc = gfb_device_softcs[adp->va_model][adp->va_unit]; - s = spltty(); + crit_enter(); *col = (sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_X_HIGH) & 0x0f) << 8; *col |= sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_X_LOW) & 0xff; *col /= adp->va_info.vi_cwidth; @@ -2242,7 +2243,7 @@ bt485_read_hw_cursor(video_adapter_t *ad *row |= sc->gfbc->ramdac_rd(sc, BT485_REG_CURSOR_Y_LOW) & 0xff; *row /= adp->va_info.vi_cheight; *row -= 4; - splx(s); + crit_exit(); return(error); } @@ -2269,7 +2270,7 @@ bt485_set_hw_cursor(video_adapter_t *adp } else { /* Otherwise, just move the cursor as requested... */ sc = gfb_device_softcs[adp->va_model][adp->va_unit]; - s = spltty(); + crit_enter(); sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_X_LOW, ((col + 8) * adp->va_info.vi_cwidth) & 0xff); sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_X_HIGH, @@ -2278,7 +2279,7 @@ bt485_set_hw_cursor(video_adapter_t *adp ((row + 4) * adp->va_info.vi_cheight) & 0xff); sc->gfbc->ramdac_wr(sc, BT485_REG_CURSOR_Y_HIGH, (((row + 4) * adp->va_info.vi_cheight) >> 8) & 0x0f); - splx(s); + crit_exit(); } return(error); }