-static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
-{
- struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
- unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
- unsigned int scan_align = info->pixmap.scan_align - 1;
- unsigned int buf_align = info->pixmap.buf_align - 1;
- unsigned int width = (vc->vc_font.width + 7) >> 3;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
- int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
- struct display *p = &fb_display[vc->vc_num];
- unsigned int size, pitch;
- struct fb_image image;
- u8 *src, *dst;
-
- if (!info->fbops->fb_blank && console_blanked)
- return;
- if (info->state != FBINFO_STATE_RUNNING)
- return;
-
- if (vt_cons[vc->vc_num]->vc_mode != KD_TEXT)
- return;
-
- image.dx = xpos * vc->vc_font.width;
- image.dy = real_y(p, ypos) * vc->vc_font.height;
- image.width = vc->vc_font.width;
- image.height = vc->vc_font.height;
- image.fg_color = attr_fgcol(fgshift, c);
- image.bg_color = attr_bgcol(bgshift, c);
- image.depth = 1;
-
- src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * width;
-
- pitch = width + scan_align;
- pitch &= ~scan_align;
- size = pitch * vc->vc_font.height;
- size += buf_align;
- size &= ~buf_align;
-
- dst = fb_get_buffer_offset(info, &info->pixmap, size);
- image.data = dst;
-
- if (info->pixmap.outbuf)
- fb_iomove_buf_aligned(info, &info->pixmap, dst, pitch, src, width, image.height);
- else
- fb_sysmove_buf_aligned(info, &info->pixmap, dst, pitch, src, width, image.height);
-
- info->fbops->fb_imageblit(info, &image);
-}
-