Exemplo n.º 1
0
static void fbcon_sti_putc(struct vc_data *conp,
			   struct display *p, int c,
			   int yy, int xx)
{
	u8 *dest, *cdat;
	u_int rows, bold, revs, underl;
	u8 d;

	dest = p->screen_base+yy*fontheight(p)*p->next_line+xx;
	cdat = p->fontdata+(c&p->charmask)*fontheight(p);
	bold = attr_bold(p,c);
	revs = attr_reverse(p,c);
	underl = attr_underline(p,c);

	for (rows = fontheight(p); rows--; dest += p->next_line) {
		d = *cdat++;
		if (underl && !rows)
			d = 0xff;
		else if (bold)
			d |= d>>1;
		if (revs)
			d = ~d;
		writeb_hp (d, dest);
	}
}
Exemplo n.º 2
0
void fbcon_mfb_putcs(struct vc_data *conp, struct display *p, 
		     const unsigned short *s, int count, int yy, int xx)
{
    u8 *dest, *dest0, *cdat;
    u_int rows, bold, revs, underl;
    u8 d;
    u16 c;

    dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
    bold = attr_bold(p,scr_readw(s));
    revs = attr_reverse(p,scr_readw(s));
    underl = attr_underline(p,scr_readw(s));

    while (count--) {
	c = scr_readw(s++) & p->charmask;
	dest = dest0++;
	cdat = p->fontdata+c*fontheight(p);
	for (rows = fontheight(p); rows--; dest += p->next_line) {
	    d = *cdat++;
	    if (underl && !rows)
		d = 0xff;
	    else if (bold)
		d |= d>>1;
	    if (revs)
		d = ~d;
	    *dest = d;
	}
    }
}
Exemplo n.º 3
0
static void fbcon_sti_putcs(struct vc_data *conp,
			    struct display *p, 
			    const unsigned short *s,
			    int count, int yy, int xx)
{
	u8 *dest, *dest0, *cdat;
	u_int rows, bold, revs, underl;
	u8 d;
	u16 c;

	if(((unsigned)xx > 200) || ((unsigned) yy > 200)) {
		printk("refusing to putcs %p %p %p %d %d %d (%p)\n",
			conp, p, s, count, yy, xx, __builtin_return_address(0));
		return;
	}	


	dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx;
	if(((u32)dest0&0xf0000000)!=0xf0000000) {
		printk("refusing to putcs %p %p %p %d %d %d (%p) %p = %p + %d * %d * %ld + %d\n",
			conp, p, s, count, yy, xx, __builtin_return_address(0),
			dest0, p->screen_base, yy, fontheight(p), p->next_line,
			xx);
		return;
	}	

	c = scr_readw(s);
	bold = attr_bold(p, c);
	revs = attr_reverse(p, c);
	underl = attr_underline(p, c);

	while (count--) {
		c = scr_readw(s++) & p->charmask;
		dest = dest0++;
		cdat = p->fontdata+c*fontheight(p);
		for (rows = fontheight(p); rows--; dest += p->next_line) {
			d = *cdat++;
			if (0 && underl && !rows)
				d = 0xff;
			else if (0 && bold)
				d |= d>>1;
			if (revs)
				d = ~d;
			writeb_hp (d, dest);
		}
	}
}
Exemplo n.º 4
0
void fbcon_mfb_clear(struct vc_data *conp, struct display *p, int sy, int sx,
		     int height, int width)
{
    u8 *dest;
    u_int rows;
    int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0;

    dest = p->screen_base+sy*fontheight(p)*p->next_line+sx;

    if (sx == 0 && width == p->next_line) {
	if (inverse)
	    mymemset(dest, height*fontheight(p)*width);
	else
	    mymemclear(dest, height*fontheight(p)*width);
    } else
	for (rows = height*fontheight(p); rows--; dest += p->next_line)
	    if (inverse)
		mymemset(dest, width);
	    else
		mymemclear_small(dest, width);
}
Exemplo n.º 5
0
void fbcon_mfb_clear_margins(struct vc_data *conp, struct display *p,
			     int bottom_only)
{
    u8 *dest;
    int height, bottom;
    int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0;

    /* XXX Need to handle right margin? */

    height = p->var.yres - conp->vc_rows * fontheight(p);
    if (!height)
	return;
    bottom = conp->vc_rows + p->yscroll;
    if (bottom >= p->vrows)
	bottom -= p->vrows;
    dest = p->screen_base + bottom * fontheight(p) * p->next_line;
    if (inverse)
	mymemset(dest, height * p->next_line);
    else
	mymemclear(dest, height * p->next_line);
}
Exemplo n.º 6
0
static void
fbcon_sti_clear(struct vc_data *conp,
		struct display *p, int sy, int sx,
		int height, int width)
{
	u8 *dest;
	u_int rows;
	int inverse = conp ? attr_reverse(p,conp->vc_video_erase_char) : 0;

	dest = p->screen_base+sy*fontheight(p)*p->next_line+sx;

	if (sx == 0 && width == p->next_line) {
		if (inverse)
			memset_tohp(dest, ~0, height*fontheight(p)*width);
		else
			memset_tohp(dest,  0, height*fontheight(p)*width);
	} else
		for (rows = height*fontheight(p); rows--; dest += p->next_line)
			if (inverse)
				memset_tohp(dest, 0xffffffff, width);
			else
				memset_tohp(dest, 0x00000000, width);
}