Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 21:00:16 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269685 - in head/sys: dev/fb dev/vt dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3
Message-ID:  <53e3e8e0.2359.16c134a3@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Thu Aug  7 21:00:16 2014
New Revision: 269685
URL: http://svnweb.freebsd.org/changeset/base/269685

Log:
  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.

Modified:
  head/sys/dev/fb/creator_vt.c
  head/sys/dev/vt/hw/efifb/efifb.c
  head/sys/dev/vt/hw/fb/vt_fb.c
  head/sys/dev/vt/hw/fb/vt_fb.h
  head/sys/dev/vt/hw/ofwfb/ofwfb.c
  head/sys/dev/vt/hw/vga/vt_vga.c
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c
  head/sys/powerpc/ps3/ps3_syscons.c

Modified: head/sys/dev/fb/creator_vt.c
==============================================================================
--- head/sys/dev/fb/creator_vt.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/fb/creator_vt.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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: head/sys/dev/vt/hw/efifb/efifb.c
==============================================================================
--- head/sys/dev/vt/hw/efifb/efifb.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/hw/efifb/efifb.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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: head/sys/dev/vt/hw/fb/vt_fb.c
==============================================================================
--- head/sys/dev/vt/hw/fb/vt_fb.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/hw/fb/vt_fb.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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: head/sys/dev/vt/hw/fb/vt_fb.h
==============================================================================
--- head/sys/dev/vt/hw/fb/vt_fb.h	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/hw/fb/vt_fb.h	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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: head/sys/dev/vt/hw/ofwfb/ofwfb.c
==============================================================================
--- head/sys/dev/vt/hw/ofwfb/ofwfb.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/hw/ofwfb/ofwfb.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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: head/sys/dev/vt/hw/vga/vt_vga.c
==============================================================================
--- head/sys/dev/vt/hw/vga/vt_vga.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/hw/vga/vt_vga.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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_bitbltchr,
 	.vd_drawrect	= vga_drawrect,
 	.vd_setpixel	= vga_setpixel,
 	.vd_putchar	= vga_putchar,

Modified: head/sys/dev/vt/vt.h
==============================================================================
--- head/sys/dev/vt/vt.h	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/vt.h	Thu Aug  7 21:00:16 2014	(r269685)
@@ -290,9 +290,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 *);
@@ -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;
 

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/dev/vt/vt_core.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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 
 	}
 	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: head/sys/powerpc/ps3/ps3_syscons.c
==============================================================================
--- head/sys/powerpc/ps3/ps3_syscons.c	Thu Aug  7 20:05:50 2014	(r269684)
+++ head/sys/powerpc/ps3/ps3_syscons.c	Thu Aug  7 21:00:16 2014	(r269685)
@@ -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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e3e8e0.2359.16c134a3>