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); }
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); }
void fbcon_ilbm_clear(struct vc_data *conp, struct display *p, int sy, int sx, int height, int width) { u8 *dest; u_int i, rows; int bg, bg0; dest = p->screen_base+sy*fontheight(p)*p->next_line+sx; bg0 = attr_bgcol_ec(p,conp); for (rows = height*fontheight(p); rows--;) { bg = bg0; for (i = p->var.bits_per_pixel; i--; dest += p->next_plane) { if (bg & 1) mymemset(dest, width); else mymemclear(dest, width); bg >>= 1; } } }