diff --git a/sys/dev/fb/creator_vt.c b/sys/dev/fb/creator_vt.c index 569ad9dd230e..e98f79f8f51c 100644 --- a/sys/dev/fb/creator_vt.c +++ b/sys/dev/fb/creator_vt.c @@ -53,7 +53,6 @@ static const struct vt_driver vt_creatorfb_driver = { .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, .vd_bitbltchr = creatorfb_bitbltchr, - .vd_maskbitbltchr = creatorfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c index 2234f76937ed..4b1cd45952e7 100644 --- a/sys/dev/vt/hw/efifb/efifb.c +++ b/sys/dev/vt/hw/efifb/efifb.c @@ -61,7 +61,6 @@ static struct vt_driver vt_efifb_driver = { .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ diff --git a/sys/dev/vt/hw/fb/vt_fb.c b/sys/dev/vt/hw/fb/vt_fb.c index d647d99d6893..5040ff7ad812 100644 --- a/sys/dev/vt/hw/fb/vt_fb.c +++ b/sys/dev/vt/hw/fb/vt_fb.c @@ -50,7 +50,6 @@ static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -248,70 +247,6 @@ void vt_fb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) -{ - struct fb_info *info; - uint32_t fgc, bgc, cc, o; - int c, l, bpp; - u_long line; - uint8_t b; - const uint8_t *ch; - - info = vd->vd_softc; - bpp = FBTYPE_GET_BYTESPP(info); - fgc = info->fb_cmap[fg]; - bgc = info->fb_cmap[bg]; - b = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ - - /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > - info->fb_height)) - return; - - KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - - line = (info->fb_stride * top) + (left * bpp); - for (l = 0; l < height; l++) { - ch = src; - for (c = 0; c < width; c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; - - switch(bpp) { - case 1: - vt_fb_mem_wr1(info, o, cc); - break; - case 2: - vt_fb_mem_wr2(info, o, cc); - break; - case 3: - /* Packed mode, so unaligned. Byte access. */ - vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); - vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); - vt_fb_mem_wr1(info, o + 2, cc & 0xff); - break; - case 4: - vt_fb_mem_wr4(info, o, cc); - break; - default: - /* panic? */ - break; - } - } - line += info->fb_stride; - src += bpl; - } -} - -void -vt_fb_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) { struct fb_info *info; uint32_t fgc, bgc, cc, o; diff --git a/sys/dev/vt/hw/fb/vt_fb.h b/sys/dev/vt/hw/fb/vt_fb.h index 9b1d56bf7d84..2cbe8d5ab171 100644 --- a/sys/dev/vt/hw/fb/vt_fb.h +++ b/sys/dev/vt/hw/fb/vt_fb.h @@ -39,7 +39,6 @@ void vt_fb_suspend(void); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; -vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; vd_fb_ioctl_t vt_fb_ioctl; vd_fb_mmap_t vt_fb_mmap; diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index e1d0c9fea835..bb7defc48ccf 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -66,7 +66,6 @@ static const struct vt_driver vt_ofwfb_driver = { .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, - .vd_maskbitbltchr = ofwfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index 94cc9bbbbbc1..5dbf5bd4f53e 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -75,7 +75,6 @@ static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; -static vd_maskbitbltchr_t vga_maskbitbltchr; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_putchar_t vga_putchar; @@ -87,7 +86,6 @@ static const struct vt_driver vt_vga_driver = { .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, - .vd_maskbitbltchr = vga_bitbltchr, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_putchar = vga_putchar, diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h index 14cf650700a3..7dc90e6b0df2 100644 --- a/sys/dev/vt/vt.h +++ b/sys/dev/vt/vt.h @@ -290,9 +290,6 @@ typedef void vd_blank_t(struct vt_device *vd, term_color_t color); typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); -typedef void vd_maskbitbltchr_t(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); @@ -311,7 +308,6 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; vd_bitbltchr_t *vd_bitbltchr; - vd_maskbitbltchr_t *vd_maskbitbltchr; vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index cfe36bb3ca67..fbffa9c33f3e 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -887,7 +887,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_maskbitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); @@ -2103,8 +2103,6 @@ vt_allocate(struct vt_driver *drv, void *softc) } vd = main_vd; VT_LOCK(vd); - if (drv->vd_maskbitbltchr == NULL) - drv->vd_maskbitbltchr = drv->vd_bitbltchr; if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ diff --git a/sys/powerpc/ps3/ps3_syscons.c b/sys/powerpc/ps3/ps3_syscons.c index d62cdaee1fe2..9cd9068e3f11 100644 --- a/sys/powerpc/ps3/ps3_syscons.c +++ b/sys/powerpc/ps3/ps3_syscons.c @@ -77,7 +77,6 @@ static struct vt_driver vt_ps3fb_driver = { .vd_init = ps3fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */