Author: emaste
Date: Thu Sep  4 19:13:07 2014
New Revision: 271120
URL: http://svnweb.freebsd.org/changeset/base/271120

Log:
  MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr.
  
    The same functionality can be obtained by testing for mask != NULL in
    vd_bitbltchr, which all implementations of vd_bitbltchr() were doing
    anyway.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/fb/creator_vt.c
  stable/10/sys/dev/vt/hw/efifb/efifb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.h
  stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
  stable/10/sys/dev/vt/hw/vga/vt_vga.c
  stable/10/sys/dev/vt/vt.h
  stable/10/sys/dev/vt/vt_core.c
  stable/10/sys/powerpc/ps3/ps3_syscons.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/fb/creator_vt.c
==============================================================================
--- stable/10/sys/dev/fb/creator_vt.c   Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/fb/creator_vt.c   Thu Sep  4 19:13:07 2014        
(r271120)
@@ -53,7 +53,6 @@ static const struct vt_driver vt_creator
        .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

Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c
==============================================================================
--- stable/10/sys/dev/vt/hw/efifb/efifb.c       Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/hw/efifb/efifb.c       Thu Sep  4 19:13:07 2014        
(r271120)
@@ -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. */

Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c
==============================================================================
--- stable/10/sys/dev/vt/hw/fb/vt_fb.c  Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/hw/fb/vt_fb.c  Thu Sep  4 19:13:07 2014        
(r271120)
@@ -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,
@@ -253,70 +252,6 @@ vt_fb_bitbltchr(struct vt_device *vd, co
        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;
-       int c, l, bpp;
-       u_long line;
        uint8_t b, m;
        const uint8_t *ch;
 

Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h
==============================================================================
--- stable/10/sys/dev/vt/hw/fb/vt_fb.h  Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/hw/fb/vt_fb.h  Thu Sep  4 19:13:07 2014        
(r271120)
@@ -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;

Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c
==============================================================================
--- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c       Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c       Thu Sep  4 19:13:07 2014        
(r271120)
@@ -66,7 +66,6 @@ static const struct vt_driver vt_ofwfb_d
        .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,

Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c
==============================================================================
--- stable/10/sys/dev/vt/hw/vga/vt_vga.c        Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/hw/vga/vt_vga.c        Thu Sep  4 19:13:07 2014        
(r271120)
@@ -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_dri
        .vd_init        = vga_init,
        .vd_blank       = vga_blank,
        .vd_bitbltchr   = vga_bitbltchr,
-       .vd_maskbitbltchr = vga_maskbitbltchr,
        .vd_drawrect    = vga_drawrect,
        .vd_setpixel    = vga_setpixel,
        .vd_putchar     = vga_putchar,

Modified: stable/10/sys/dev/vt/vt.h
==============================================================================
--- stable/10/sys/dev/vt/vt.h   Thu Sep  4 19:09:08 2014        (r271119)
+++ stable/10/sys/dev/vt/vt.h   Thu Sep  4 19:13:07 2014        (r271120)
@@ -286,9 +286,6 @@ typedef void vd_blank_t(struct vt_device
 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 
*);
@@ -307,7 +304,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;
 

Modified: stable/10/sys/dev/vt/vt_core.c
==============================================================================
--- stable/10/sys/dev/vt/vt_core.c      Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/dev/vt/vt_core.c      Thu Sep  4 19:13:07 2014        
(r271120)
@@ -946,7 +946,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);
@@ -2176,8 +2176,6 @@ vt_allocate(struct vt_driver *drv, void 
        }
        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. */

Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c
==============================================================================
--- stable/10/sys/powerpc/ps3/ps3_syscons.c     Thu Sep  4 19:09:08 2014        
(r271119)
+++ stable/10/sys/powerpc/ps3/ps3_syscons.c     Thu Sep  4 19:13:07 2014        
(r271120)
@@ -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. */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to