Petr, for some reason I can't get this to work right. Does it look right
to you?
static void vga16fb_fillrect(struct fb_info *info, int x1, int y1,
unsigned int width, unsigned int height,
unsigned long color, int rop)
{
int line_ofs = info->fix.line_length - width;
char *where;
int x;
vga_io_wgfx(VGA_GFX_MODE, 0);
vga_io_wgfx(VGA_GFX_DATA_ROTATE, 0);
vga_io_wgfx(VGA_GFX_SR_ENABLE, 0xf);
vga_io_wgfx(VGA_GFX_SR_VALUE, color);
vga_io_wgfx(VGA_GFX_BIT_MASK, 0xff);
where = info->screen_base + x1 + y1 * info->fix.line_length;
while (height--) {
for (x = 0; x < width; x++) {
fb_writeb(0, where);
where++;
}
where += line_ofs;
}
return;
}
|