Пример #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);
	}
}
Пример #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;
	}
    }
}
Пример #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);
		}
	}
}