Lines Matching refs:vc
172 #define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row)
185 static void fbcon_init(struct vc_data *vc, int init);
186 static void fbcon_deinit(struct vc_data *vc);
187 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
189 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos);
190 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
192 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only);
193 static void fbcon_cursor(struct vc_data *vc, int mode);
194 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
196 static int fbcon_switch(struct vc_data *vc);
197 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch);
198 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table);
203 static __inline__ void ywrap_up(struct vc_data *vc, int count);
204 static __inline__ void ywrap_down(struct vc_data *vc, int count);
205 static __inline__ void ypan_up(struct vc_data *vc, int count);
206 static __inline__ void ypan_down(struct vc_data *vc, int count);
207 static void fbcon_bmove_rec(struct vc_data *vc, struct fbcon_display *p, int sy, int sx,
211 static void fbcon_redraw_move(struct vc_data *vc, struct fbcon_display *p,
256 struct vc_data *vc; in fbcon_rotate_all() local
264 vc = vc_cons[i].d; in fbcon_rotate_all()
265 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_rotate_all()
269 p = &fb_display[vc->vc_num]; in fbcon_rotate_all()
301 static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info) in fbcon_is_inactive() argument
306 vc->vc_mode != KD_TEXT || ops->graphics); in fbcon_is_inactive()
309 static int get_color(struct vc_data *vc, struct fb_info *info, in get_color() argument
316 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in get_color()
318 c = vc->vc_video_erase_char & charmask; in get_color()
322 color = (is_fg) ? attr_fgcol((vc->vc_hi_font_mask) ? 9 : 8, c) in get_color()
323 : attr_bgcol((vc->vc_hi_font_mask) ? 13 : 12, c); in get_color()
376 static void fbcon_update_softback(struct vc_data *vc) in fbcon_update_softback() argument
378 int l = fbcon_softback_size / vc->vc_size_row; in fbcon_update_softback()
381 softback_end = softback_buf + l * vc->vc_size_row; in fbcon_update_softback()
392 struct vc_data *vc = NULL; in fb_flashcursor() local
405 vc = vc_cons[ops->currcon].d; in fb_flashcursor()
407 if (!vc || !con_is_visible(vc) || in fb_flashcursor()
408 registered_fb[con2fb_map[vc->vc_num]] != info || in fb_flashcursor()
409 vc->vc_deccm != 1) { in fb_flashcursor()
414 c = scr_readw((u16 *) vc->vc_pos); in fb_flashcursor()
417 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), in fb_flashcursor()
418 get_color(vc, info, c, 0)); in fb_flashcursor()
596 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
602 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
607 int cnt, erase = vc->vc_video_erase_char, step; in fbcon_prepare_logo()
623 logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height); in fbcon_prepare_logo()
624 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
625 vc->vc_size_row * rows); in fbcon_prepare_logo()
628 if (scr_readw(r) != vc->vc_video_erase_char) in fbcon_prepare_logo()
646 scr_memcpyw(r + step, r, vc->vc_size_row); in fbcon_prepare_logo()
651 if (vc->vc_y + logo_lines >= rows) in fbcon_prepare_logo()
652 lines = rows - vc->vc_y - 1; in fbcon_prepare_logo()
655 vc->vc_y += lines; in fbcon_prepare_logo()
656 vc->vc_pos += lines * vc->vc_size_row; in fbcon_prepare_logo()
659 scr_memsetw((unsigned short *) vc->vc_origin, in fbcon_prepare_logo()
661 vc->vc_size_row * logo_lines); in fbcon_prepare_logo()
663 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_prepare_logo()
664 fbcon_clear_margins(vc, 0); in fbcon_prepare_logo()
665 update_screen(vc); in fbcon_prepare_logo()
669 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
670 vc->vc_size_row * in fbcon_prepare_logo()
673 vc->vc_y += logo_lines; in fbcon_prepare_logo()
674 vc->vc_pos += logo_lines * vc->vc_size_row; in fbcon_prepare_logo()
681 if (logo_lines > vc->vc_bottom) { in fbcon_prepare_logo()
687 vc->vc_top = logo_lines; in fbcon_prepare_logo()
693 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
697 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
700 fbcon_set_tileops(vc, info); in set_blitting_type()
718 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
723 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
736 static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, in con2fb_acquire_newinfo() argument
760 if (vc) in con2fb_acquire_newinfo()
761 set_blitting_type(vc, info); in con2fb_acquire_newinfo()
772 static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, in con2fb_release_oldinfo() argument
818 static void con2fb_init_display(struct vc_data *vc, struct fb_info *info, in con2fb_init_display() argument
865 struct vc_data *vc = vc_cons[unit].d; in set_con2fb_map() local
891 err = con2fb_acquire_newinfo(vc, info, unit, oldidx); in set_con2fb_map()
899 err = con2fb_release_oldinfo(vc, oldinfo, info, unit, oldidx, in set_con2fb_map()
909 con2fb_init_display(vc, info, unit, show_logo); in set_con2fb_map()
969 struct vc_data *vc = vc_cons[fg_console].d; in fbcon_startup() local
1017 set_blitting_type(vc, info); in fbcon_startup()
1045 if (!p->fontdata && !vc->vc_font.data) { in fbcon_startup()
1051 vc->vc_font.width = font->width; in fbcon_startup()
1052 vc->vc_font.height = font->height; in fbcon_startup()
1053 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_startup()
1054 vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ in fbcon_startup()
1056 p->fontdata = vc->vc_font.data; in fbcon_startup()
1061 cols /= vc->vc_font.width; in fbcon_startup()
1062 rows /= vc->vc_font.height; in fbcon_startup()
1063 vc_resize(vc, cols, rows); in fbcon_startup()
1075 static void fbcon_init(struct vc_data *vc, int init) in fbcon_init() argument
1079 struct vc_data **default_mode = vc->vc_display_fg; in fbcon_init()
1081 struct fbcon_display *t, *p = &fb_display[vc->vc_num]; in fbcon_init()
1088 if (con2fb_map[vc->vc_num] == -1) in fbcon_init()
1089 con2fb_map[vc->vc_num] = info_idx; in fbcon_init()
1091 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_init()
1097 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || in fbcon_init()
1105 con2fb_acquire_newinfo(vc, info, vc->vc_num, -1); in fbcon_init()
1114 vc->vc_font.data = (void *)(p->fontdata = in fbcon_init()
1116 vc->vc_font.width = fvc->vc_font.width; in fbcon_init()
1117 vc->vc_font.height = fvc->vc_font.height; in fbcon_init()
1130 vc->vc_font.width = font->width; in fbcon_init()
1131 vc->vc_font.height = font->height; in fbcon_init()
1132 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_init()
1133 vc->vc_font.charcount = 256; /* FIXME Need to in fbcon_init()
1141 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_init()
1142 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_init()
1144 vc->vc_hi_font_mask = 0; in fbcon_init()
1146 vc->vc_hi_font_mask = 0x100; in fbcon_init()
1147 if (vc->vc_can_do_color) in fbcon_init()
1148 vc->vc_complement_mask <<= 1; in fbcon_init()
1153 if (!*vc->vc_uni_pagedir_loc) in fbcon_init()
1154 con_copy_unimap(vc, svc); in fbcon_init()
1157 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_init()
1165 set_blitting_type(vc, info); in fbcon_init()
1167 cols = vc->vc_cols; in fbcon_init()
1168 rows = vc->vc_rows; in fbcon_init()
1171 new_cols /= vc->vc_font.width; in fbcon_init()
1172 new_rows /= vc->vc_font.height; in fbcon_init()
1181 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_init()
1209 vc->vc_cols = new_cols; in fbcon_init()
1210 vc->vc_rows = new_rows; in fbcon_init()
1212 vc_resize(vc, new_cols, new_rows); in fbcon_init()
1215 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); in fbcon_init()
1217 if (vc == svc && softback_buf) in fbcon_init()
1218 fbcon_update_softback(vc); in fbcon_init()
1220 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_init()
1222 set_blitting_type(vc, info); in fbcon_init()
1236 static void set_vc_hi_font(struct vc_data *vc, bool set);
1238 static void fbcon_deinit(struct vc_data *vc) in fbcon_deinit() argument
1240 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_deinit()
1246 idx = con2fb_map[vc->vc_num]; in fbcon_deinit()
1263 if (con_is_visible(vc)) in fbcon_deinit()
1271 vc->vc_font.data = NULL; in fbcon_deinit()
1273 if (vc->vc_hi_font_mask && vc->vc_screenbuf) in fbcon_deinit()
1274 set_vc_hi_font(vc, false); in fbcon_deinit()
1307 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, in fbcon_clear() argument
1310 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear()
1313 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_clear()
1316 if (fbcon_is_inactive(vc, info)) in fbcon_clear()
1322 if (sy < vc->vc_top && vc->vc_top == logo_lines) { in fbcon_clear()
1323 vc->vc_top = 0; in fbcon_clear()
1330 fbcon_clear_margins(vc, 0); in fbcon_clear()
1338 ops->clear(vc, info, real_y(p, sy), sx, b, width); in fbcon_clear()
1339 ops->clear(vc, info, real_y(p, sy + b), sx, height - b, in fbcon_clear()
1342 ops->clear(vc, info, real_y(p, sy), sx, height, width); in fbcon_clear()
1345 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, in fbcon_putcs() argument
1348 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_putcs()
1349 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_putcs()
1352 if (!fbcon_is_inactive(vc, info)) in fbcon_putcs()
1353 ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, in fbcon_putcs()
1354 get_color(vc, info, scr_readw(s), 1), in fbcon_putcs()
1355 get_color(vc, info, scr_readw(s), 0)); in fbcon_putcs()
1358 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) in fbcon_putc() argument
1363 fbcon_putcs(vc, &chr, 1, ypos, xpos); in fbcon_putc()
1366 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) in fbcon_clear_margins() argument
1368 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear_margins()
1371 if (!fbcon_is_inactive(vc, info)) in fbcon_clear_margins()
1372 ops->clear_margins(vc, info, margin_color, bottom_only); in fbcon_clear_margins()
1375 static void fbcon_cursor(struct vc_data *vc, int mode) in fbcon_cursor() argument
1377 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_cursor()
1380 int c = scr_readw((u16 *) vc->vc_pos); in fbcon_cursor()
1382 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_cursor()
1384 if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) in fbcon_cursor()
1387 if (vc->vc_cursor_type & 0x10) in fbcon_cursor()
1398 fbcon_set_origin(vc); in fbcon_cursor()
1402 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), in fbcon_cursor()
1403 get_color(vc, info, c, 0)); in fbcon_cursor()
1414 struct vc_data **default_mode, *vc; in fbcon_set_disp() local
1424 vc = vc_cons[unit].d; in fbcon_set_disp()
1426 if (!vc) in fbcon_set_disp()
1429 default_mode = vc->vc_display_fg; in fbcon_set_disp()
1433 if (!vc->vc_font.data) { in fbcon_set_disp()
1434 vc->vc_font.data = (void *)(p->fontdata = t->fontdata); in fbcon_set_disp()
1435 vc->vc_font.width = (*default_mode)->vc_font.width; in fbcon_set_disp()
1436 vc->vc_font.height = (*default_mode)->vc_font.height; in fbcon_set_disp()
1450 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_set_disp()
1451 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_set_disp()
1453 vc->vc_hi_font_mask = 0; in fbcon_set_disp()
1455 vc->vc_hi_font_mask = 0x100; in fbcon_set_disp()
1456 if (vc->vc_can_do_color) in fbcon_set_disp()
1457 vc->vc_complement_mask <<= 1; in fbcon_set_disp()
1462 if (!*vc->vc_uni_pagedir_loc) in fbcon_set_disp()
1463 con_copy_unimap(vc, svc); in fbcon_set_disp()
1467 cols /= vc->vc_font.width; in fbcon_set_disp()
1468 rows /= vc->vc_font.height; in fbcon_set_disp()
1469 vc_resize(vc, cols, rows); in fbcon_set_disp()
1471 if (con_is_visible(vc)) { in fbcon_set_disp()
1472 update_screen(vc); in fbcon_set_disp()
1474 fbcon_update_softback(vc); in fbcon_set_disp()
1478 static __inline__ void ywrap_up(struct vc_data *vc, int count) in ywrap_up() argument
1480 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_up()
1482 struct fbcon_display *p = &fb_display[vc->vc_num]; in ywrap_up()
1488 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_up()
1497 static __inline__ void ywrap_down(struct vc_data *vc, int count) in ywrap_down() argument
1499 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_down()
1501 struct fbcon_display *p = &fb_display[vc->vc_num]; in ywrap_down()
1507 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_down()
1516 static __inline__ void ypan_up(struct vc_data *vc, int count) in ypan_up() argument
1518 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up()
1519 struct fbcon_display *p = &fb_display[vc->vc_num]; in ypan_up()
1523 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up()
1524 ops->bmove(vc, info, p->vrows - vc->vc_rows, in ypan_up()
1525 0, 0, 0, vc->vc_rows, vc->vc_cols); in ypan_up()
1526 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up()
1530 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up()
1533 fbcon_clear_margins(vc, 1); in ypan_up()
1540 static __inline__ void ypan_up_redraw(struct vc_data *vc, int t, int count) in ypan_up_redraw() argument
1542 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up_redraw()
1544 struct fbcon_display *p = &fb_display[vc->vc_num]; in ypan_up_redraw()
1548 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up_redraw()
1549 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up_redraw()
1550 fbcon_redraw_move(vc, p, t + count, vc->vc_rows - count, t); in ypan_up_redraw()
1554 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up_redraw()
1557 fbcon_clear_margins(vc, 1); in ypan_up_redraw()
1564 static __inline__ void ypan_down(struct vc_data *vc, int count) in ypan_down() argument
1566 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down()
1567 struct fbcon_display *p = &fb_display[vc->vc_num]; in ypan_down()
1572 ops->bmove(vc, info, 0, 0, p->vrows - vc->vc_rows, in ypan_down()
1573 0, vc->vc_rows, vc->vc_cols); in ypan_down()
1574 p->yscroll += p->vrows - vc->vc_rows; in ypan_down()
1578 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down()
1581 fbcon_clear_margins(vc, 1); in ypan_down()
1588 static __inline__ void ypan_down_redraw(struct vc_data *vc, int t, int count) in ypan_down_redraw() argument
1590 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down_redraw()
1592 struct fbcon_display *p = &fb_display[vc->vc_num]; in ypan_down_redraw()
1597 p->yscroll += p->vrows - vc->vc_rows; in ypan_down_redraw()
1598 fbcon_redraw_move(vc, p, t, vc->vc_rows - count, t + count); in ypan_down_redraw()
1602 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down_redraw()
1605 fbcon_clear_margins(vc, 1); in ypan_down_redraw()
1612 static void fbcon_redraw_softback(struct vc_data *vc, struct fbcon_display *p, in fbcon_redraw_softback() argument
1615 int count = vc->vc_rows; in fbcon_redraw_softback()
1622 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1623 n = softback_curr + delta * vc->vc_size_row; in fbcon_redraw_softback()
1630 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1636 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1656 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1671 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1679 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1692 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw_softback()
1697 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1701 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1705 static void fbcon_redraw_move(struct vc_data *vc, struct fbcon_display *p, in fbcon_redraw_move() argument
1709 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_move()
1723 fbcon_putcs(vc, start, s - start, in fbcon_redraw_move()
1733 fbcon_putcs(vc, start, s - start, dy, x); in fbcon_redraw_move()
1739 static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info, in fbcon_redraw_blit() argument
1742 int offset = ycount * vc->vc_cols; in fbcon_redraw_blit()
1744 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_blit()
1759 ops->bmove(vc, info, line + ycount, x, in fbcon_redraw_blit()
1775 ops->bmove(vc, info, line + ycount, x, line, x, 1, in fbcon_redraw_blit()
1783 s -= vc->vc_size_row; in fbcon_redraw_blit()
1784 d -= vc->vc_size_row; in fbcon_redraw_blit()
1789 static void fbcon_redraw(struct vc_data *vc, struct fbcon_display *p, in fbcon_redraw() argument
1793 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw()
1808 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1816 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1831 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw()
1838 s -= vc->vc_size_row; in fbcon_redraw()
1839 d -= vc->vc_size_row; in fbcon_redraw()
1844 static inline void fbcon_softback_note(struct vc_data *vc, int t, in fbcon_softback_note() argument
1849 if (vc->vc_num != fg_console) in fbcon_softback_note()
1851 p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); in fbcon_softback_note()
1854 scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); in fbcon_softback_note()
1857 softback_in += vc->vc_size_row; in fbcon_softback_note()
1861 softback_top += vc->vc_size_row; in fbcon_softback_note()
1869 static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, in fbcon_scroll() argument
1872 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_scroll()
1873 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_scroll()
1876 if (fbcon_is_inactive(vc, info)) in fbcon_scroll()
1879 fbcon_cursor(vc, CM_ERASE); in fbcon_scroll()
1889 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1890 count = vc->vc_rows; in fbcon_scroll()
1892 fbcon_softback_note(vc, t, count); in fbcon_scroll()
1897 fbcon_redraw_blit(vc, info, p, t, b - t - count, in fbcon_scroll()
1899 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1900 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1901 vc->vc_size_row * in fbcon_scroll()
1903 vc->vc_video_erase_char, in fbcon_scroll()
1904 vc->vc_size_row * count); in fbcon_scroll()
1909 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1911 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1912 vc->vc_cols); in fbcon_scroll()
1913 ywrap_up(vc, count); in fbcon_scroll()
1914 if (vc->vc_rows - b > 0) in fbcon_scroll()
1915 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1916 vc->vc_rows - b, in fbcon_scroll()
1917 vc->vc_cols); in fbcon_scroll()
1919 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1920 b - t - count, vc->vc_cols); in fbcon_scroll()
1923 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1928 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1929 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1932 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1934 fbcon_redraw_move(vc, p, 0, t, count); in fbcon_scroll()
1935 ypan_up_redraw(vc, t, count); in fbcon_scroll()
1936 if (vc->vc_rows - b > 0) in fbcon_scroll()
1937 fbcon_redraw_move(vc, p, b, in fbcon_scroll()
1938 vc->vc_rows - b, b); in fbcon_scroll()
1940 fbcon_redraw_move(vc, p, t + count, b - t - count, t); in fbcon_scroll()
1941 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1946 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1947 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1950 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1952 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1953 vc->vc_cols); in fbcon_scroll()
1954 ypan_up(vc, count); in fbcon_scroll()
1955 if (vc->vc_rows - b > 0) in fbcon_scroll()
1956 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1957 vc->vc_rows - b, in fbcon_scroll()
1958 vc->vc_cols); in fbcon_scroll()
1960 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1961 b - t - count, vc->vc_cols); in fbcon_scroll()
1964 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1969 fbcon_redraw(vc, p, t, b - t - count, in fbcon_scroll()
1970 count * vc->vc_cols); in fbcon_scroll()
1971 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1972 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1973 vc->vc_size_row * in fbcon_scroll()
1975 vc->vc_video_erase_char, in fbcon_scroll()
1976 vc->vc_size_row * count); in fbcon_scroll()
1982 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1983 count = vc->vc_rows; in fbcon_scroll()
1988 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, in fbcon_scroll()
1990 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1991 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1992 vc->vc_size_row * in fbcon_scroll()
1994 vc->vc_video_erase_char, in fbcon_scroll()
1995 vc->vc_size_row * count); in fbcon_scroll()
2000 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
2001 if (vc->vc_rows - b > 0) in fbcon_scroll()
2002 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
2003 vc->vc_rows - b, in fbcon_scroll()
2004 vc->vc_cols); in fbcon_scroll()
2005 ywrap_down(vc, count); in fbcon_scroll()
2007 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
2008 vc->vc_cols); in fbcon_scroll()
2010 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
2011 b - t - count, vc->vc_cols); in fbcon_scroll()
2014 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2018 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
2019 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
2022 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
2023 if (vc->vc_rows - b > 0) in fbcon_scroll()
2024 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
2025 vc->vc_rows - b, in fbcon_scroll()
2026 vc->vc_cols); in fbcon_scroll()
2027 ypan_down(vc, count); in fbcon_scroll()
2029 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
2030 vc->vc_cols); in fbcon_scroll()
2032 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
2033 b - t - count, vc->vc_cols); in fbcon_scroll()
2036 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2040 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
2041 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
2044 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
2045 if (vc->vc_rows - b > 0) in fbcon_scroll()
2046 fbcon_redraw_move(vc, p, b, vc->vc_rows - b, in fbcon_scroll()
2048 ypan_down_redraw(vc, t, count); in fbcon_scroll()
2050 fbcon_redraw_move(vc, p, count, t, 0); in fbcon_scroll()
2052 fbcon_redraw_move(vc, p, t, b - t - count, t + count); in fbcon_scroll()
2053 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2058 fbcon_redraw(vc, p, b - 1, b - t - count, in fbcon_scroll()
2059 -count * vc->vc_cols); in fbcon_scroll()
2060 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2061 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
2062 vc->vc_size_row * in fbcon_scroll()
2064 vc->vc_video_erase_char, in fbcon_scroll()
2065 vc->vc_size_row * count); in fbcon_scroll()
2073 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, in fbcon_bmove() argument
2076 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove()
2077 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_bmove()
2079 if (fbcon_is_inactive(vc, info)) in fbcon_bmove()
2092 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, height, width, in fbcon_bmove()
2096 static void fbcon_bmove_rec(struct vc_data *vc, struct fbcon_display *p, int sy, int sx, in fbcon_bmove_rec() argument
2099 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove_rec()
2106 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2108 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2111 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2113 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2122 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2124 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2127 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2129 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2134 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, in fbcon_bmove_rec()
2140 struct vc_data *vc) in updatescrollmode() argument
2143 int fh = vc->vc_font.height; in updatescrollmode()
2153 divides(ypan, vc->vc_font.height) && vyres > yres; in updatescrollmode()
2155 divides(ywrap, vc->vc_font.height) && in updatescrollmode()
2156 divides(vc->vc_font.height, vyres) && in updatescrollmode()
2157 divides(vc->vc_font.height, yres); in updatescrollmode()
2165 if (yres > (fh * (vc->vc_rows + 1))) in updatescrollmode()
2166 p->vrows -= (yres - (fh * vc->vc_rows)) / fh; in updatescrollmode()
2185 static int fbcon_resize(struct vc_data *vc, unsigned int width, in fbcon_resize() argument
2188 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_resize()
2190 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_resize()
2196 virt_fw = FBCON_SWAP(ops->rotate, vc->vc_font.width, in fbcon_resize()
2197 vc->vc_font.height); in fbcon_resize()
2198 virt_fh = FBCON_SWAP(ops->rotate, vc->vc_font.height, in fbcon_resize()
2199 vc->vc_font.width); in fbcon_resize()
2219 if (con_is_visible(vc)) { in fbcon_resize()
2227 updatescrollmode(p, info, vc); in fbcon_resize()
2231 static int fbcon_switch(struct vc_data *vc) in fbcon_switch() argument
2235 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_switch()
2239 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_switch()
2244 fbcon_set_origin(vc); in fbcon_switch()
2247 fbcon_update_softback(vc); in fbcon_switch()
2274 o->currcon = vc->vc_num; in fbcon_switch()
2305 if (fbcon_is_inactive(vc, info) || in fbcon_switch()
2311 set_blitting_type(vc, info); in fbcon_switch()
2314 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_switch()
2316 set_blitting_type(vc, info); in fbcon_switch()
2319 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_switch()
2320 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_switch()
2323 charcnt = FNTCHARCNT(vc->vc_font.data); in fbcon_switch()
2326 vc->vc_complement_mask <<= 1; in fbcon_switch()
2328 updatescrollmode(p, info, vc); in fbcon_switch()
2332 scrollback_phys_max = p->vrows - vc->vc_rows; in fbcon_switch()
2336 scrollback_phys_max = p->vrows - 2 * vc->vc_rows; in fbcon_switch()
2348 if (!fbcon_is_inactive(vc, info)) { in fbcon_switch()
2353 fbcon_set_palette(vc, color_table); in fbcon_switch()
2354 fbcon_clear_margins(vc, 0); in fbcon_switch()
2361 update_region(vc, in fbcon_switch()
2362 vc->vc_origin + vc->vc_size_row * vc->vc_top, in fbcon_switch()
2363 vc->vc_size_row * (vc->vc_bottom - in fbcon_switch()
2364 vc->vc_top) / 2); in fbcon_switch()
2370 static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, in fbcon_generic_blank() argument
2374 unsigned short charmask = vc->vc_hi_font_mask ? in fbcon_generic_blank()
2378 oldc = vc->vc_video_erase_char; in fbcon_generic_blank()
2379 vc->vc_video_erase_char &= charmask; in fbcon_generic_blank()
2380 fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); in fbcon_generic_blank()
2381 vc->vc_video_erase_char = oldc; in fbcon_generic_blank()
2385 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) in fbcon_blank() argument
2387 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_blank()
2403 if (!fbcon_is_inactive(vc, info)) { in fbcon_blank()
2406 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); in fbcon_blank()
2410 fbcon_generic_blank(vc, info, blank); in fbcon_blank()
2414 update_screen(vc); in fbcon_blank()
2417 if (mode_switch || fbcon_is_inactive(vc, info) || in fbcon_blank()
2426 static int fbcon_debug_enter(struct vc_data *vc) in fbcon_debug_enter() argument
2428 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_enter()
2435 fbcon_set_palette(vc, color_table); in fbcon_debug_enter()
2439 static int fbcon_debug_leave(struct vc_data *vc) in fbcon_debug_leave() argument
2441 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_leave()
2450 static int fbcon_get_font(struct vc_data *vc, struct console_font *font) in fbcon_get_font() argument
2452 u8 *fontdata = vc->vc_font.data; in fbcon_get_font()
2456 font->width = vc->vc_font.width; in fbcon_get_font()
2457 font->height = vc->vc_font.height; in fbcon_get_font()
2458 font->charcount = vc->vc_hi_font_mask ? 512 : 256; in fbcon_get_font()
2463 j = vc->vc_font.height; in fbcon_get_font()
2471 j = vc->vc_font.height * 2; in fbcon_get_font()
2480 for (j = 0; j < vc->vc_font.height; j++) { in fbcon_get_font()
2490 j = vc->vc_font.height * 4; in fbcon_get_font()
2502 static void set_vc_hi_font(struct vc_data *vc, bool set) in set_vc_hi_font() argument
2505 vc->vc_hi_font_mask = 0; in set_vc_hi_font()
2506 if (vc->vc_can_do_color) { in set_vc_hi_font()
2507 vc->vc_complement_mask >>= 1; in set_vc_hi_font()
2508 vc->vc_s_complement_mask >>= 1; in set_vc_hi_font()
2512 if (vc->vc_can_do_color) { in set_vc_hi_font()
2514 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2515 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2522 c = vc->vc_video_erase_char; in set_vc_hi_font()
2523 vc->vc_video_erase_char = in set_vc_hi_font()
2525 vc->vc_attr >>= 1; in set_vc_hi_font()
2528 vc->vc_hi_font_mask = 0x100; in set_vc_hi_font()
2529 if (vc->vc_can_do_color) { in set_vc_hi_font()
2530 vc->vc_complement_mask <<= 1; in set_vc_hi_font()
2531 vc->vc_s_complement_mask <<= 1; in set_vc_hi_font()
2537 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2538 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2543 if (vc->vc_can_do_color) in set_vc_hi_font()
2551 c = vc->vc_video_erase_char; in set_vc_hi_font()
2552 if (vc->vc_can_do_color) { in set_vc_hi_font()
2553 vc->vc_video_erase_char = in set_vc_hi_font()
2555 vc->vc_attr <<= 1; in set_vc_hi_font()
2557 vc->vc_video_erase_char = c & ~0x100; in set_vc_hi_font()
2562 static int fbcon_do_set_font(struct vc_data *vc, int w, int h, in fbcon_do_set_font() argument
2565 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_do_set_font()
2567 struct fbcon_display *p = &fb_display[vc->vc_num]; in fbcon_do_set_font()
2572 if (con_is_visible(vc) && softback_lines) in fbcon_do_set_font()
2573 fbcon_set_origin(vc); in fbcon_do_set_font()
2575 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); in fbcon_do_set_font()
2577 old_data = vc->vc_font.data; in fbcon_do_set_font()
2582 vc->vc_font.data = (void *)(p->fontdata = data); in fbcon_do_set_font()
2585 vc->vc_font.width = w; in fbcon_do_set_font()
2586 vc->vc_font.height = h; in fbcon_do_set_font()
2587 if (vc->vc_hi_font_mask && cnt == 256) in fbcon_do_set_font()
2588 set_vc_hi_font(vc, false); in fbcon_do_set_font()
2589 else if (!vc->vc_hi_font_mask && cnt == 512) in fbcon_do_set_font()
2590 set_vc_hi_font(vc, true); in fbcon_do_set_font()
2599 vc_resize(vc, cols, rows); in fbcon_do_set_font()
2600 if (con_is_visible(vc) && softback_buf) in fbcon_do_set_font()
2601 fbcon_update_softback(vc); in fbcon_do_set_font()
2602 } else if (con_is_visible(vc) in fbcon_do_set_font()
2603 && vc->vc_mode == KD_TEXT) { in fbcon_do_set_font()
2604 fbcon_clear_margins(vc, 0); in fbcon_do_set_font()
2605 update_screen(vc); in fbcon_do_set_font()
2613 static int fbcon_copy_font(struct vc_data *vc, int con) in fbcon_copy_font() argument
2616 struct console_font *f = &vc->vc_font; in fbcon_copy_font()
2620 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); in fbcon_copy_font()
2635 static int fbcon_set_font(struct vc_data *vc, struct console_font *font, in fbcon_set_font() argument
2638 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_font()
2696 return fbcon_do_set_font(vc, font->width, font->height, new_data, 1); in fbcon_set_font()
2699 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name) in fbcon_set_def_font() argument
2701 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_def_font()
2712 return fbcon_do_set_font(vc, f->width, f->height, f->data, 0); in fbcon_set_def_font()
2723 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table) in fbcon_set_palette() argument
2725 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_palette()
2729 if (fbcon_is_inactive(vc, info)) in fbcon_set_palette()
2732 if (!con_is_visible(vc)) in fbcon_set_palette()
2739 val = vc->vc_palette[j++]; in fbcon_set_palette()
2741 val = vc->vc_palette[j++]; in fbcon_set_palette()
2743 val = vc->vc_palette[j++]; in fbcon_set_palette()
2758 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) in fbcon_screen_pos() argument
2763 if (vc->vc_num != fg_console || !softback_lines) in fbcon_screen_pos()
2764 return (u16 *) (vc->vc_origin + offset); in fbcon_screen_pos()
2765 line = offset / vc->vc_size_row; in fbcon_screen_pos()
2767 return (u16 *) (vc->vc_origin + offset - in fbcon_screen_pos()
2768 softback_lines * vc->vc_size_row); in fbcon_screen_pos()
2775 static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, in fbcon_getxy() argument
2781 if (pos >= vc->vc_origin && pos < vc->vc_scr_end) { in fbcon_getxy()
2782 unsigned long offset = (pos - vc->vc_origin) / 2; in fbcon_getxy()
2784 x = offset % vc->vc_cols; in fbcon_getxy()
2785 y = offset / vc->vc_cols; in fbcon_getxy()
2786 if (vc->vc_num == fg_console) in fbcon_getxy()
2788 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2789 } else if (vc->vc_num == fg_console && softback_lines) { in fbcon_getxy()
2795 x = offset % vc->vc_cols; in fbcon_getxy()
2796 y = offset / vc->vc_cols; in fbcon_getxy()
2797 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2801 ret = vc->vc_origin; in fbcon_getxy()
2805 ret = vc->vc_origin; in fbcon_getxy()
2816 static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt) in fbcon_invert_region() argument
2820 if (!vc->vc_can_do_color) in fbcon_invert_region()
2822 else if (vc->vc_hi_font_mask == 0x100) in fbcon_invert_region()
2832 p = (u16 *) vc->vc_origin; in fbcon_invert_region()
2836 static void fbcon_scrolldelta(struct vc_data *vc, int lines) in fbcon_scrolldelta() argument
2844 if (vc->vc_num != fg_console) in fbcon_scrolldelta()
2846 if (vc->vc_mode != KD_TEXT || !lines) in fbcon_scrolldelta()
2854 if (logo_shown == vc->vc_num) { in fbcon_scrolldelta()
2859 q = vc->vc_origin + in fbcon_scrolldelta()
2860 logo_lines * vc->vc_size_row; in fbcon_scrolldelta()
2866 p -= vc->vc_size_row; in fbcon_scrolldelta()
2867 q -= vc->vc_size_row; in fbcon_scrolldelta()
2869 vc->vc_size_row); in fbcon_scrolldelta()
2872 update_region(vc, vc->vc_origin, in fbcon_scrolldelta()
2873 logo_lines * vc->vc_cols); in fbcon_scrolldelta()
2877 fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); in fbcon_scrolldelta()
2878 fbcon_redraw_softback(vc, disp, lines); in fbcon_scrolldelta()
2879 fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); in fbcon_scrolldelta()
2895 if (fbcon_is_inactive(vc, info)) in fbcon_scrolldelta()
2898 fbcon_cursor(vc, CM_ERASE); in fbcon_scrolldelta()
2908 limit -= vc->vc_rows; in fbcon_scrolldelta()
2918 ops->var.yoffset = offset * vc->vc_font.height; in fbcon_scrolldelta()
2922 fbcon_cursor(vc, CM_DRAW); in fbcon_scrolldelta()
2925 static int fbcon_set_origin(struct vc_data *vc) in fbcon_set_origin() argument
2928 fbcon_scrolldelta(vc, softback_lines); in fbcon_set_origin()
2934 struct vc_data *vc = NULL; in fbcon_suspended() local
2939 vc = vc_cons[ops->currcon].d; in fbcon_suspended()
2942 fbcon_cursor(vc, CM_ERASE); in fbcon_suspended()
2947 struct vc_data *vc; in fbcon_resumed() local
2952 vc = vc_cons[ops->currcon].d; in fbcon_resumed()
2954 update_screen(vc); in fbcon_resumed()
2960 struct vc_data *vc; in fbcon_modechanged() local
2966 vc = vc_cons[ops->currcon].d; in fbcon_modechanged()
2967 if (vc->vc_mode != KD_TEXT || in fbcon_modechanged()
2971 p = &fb_display[vc->vc_num]; in fbcon_modechanged()
2972 set_blitting_type(vc, info); in fbcon_modechanged()
2974 if (con_is_visible(vc)) { in fbcon_modechanged()
2978 cols /= vc->vc_font.width; in fbcon_modechanged()
2979 rows /= vc->vc_font.height; in fbcon_modechanged()
2980 vc_resize(vc, cols, rows); in fbcon_modechanged()
2981 updatescrollmode(p, info, vc); in fbcon_modechanged()
2985 if (!fbcon_is_inactive(vc, info)) { in fbcon_modechanged()
2990 fbcon_set_palette(vc, color_table); in fbcon_modechanged()
2991 update_screen(vc); in fbcon_modechanged()
2993 fbcon_update_softback(vc); in fbcon_modechanged()
3000 struct vc_data *vc; in fbcon_set_all_vcs() local
3008 vc = vc_cons[i].d; in fbcon_set_all_vcs()
3009 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_set_all_vcs()
3013 if (con_is_visible(vc)) { in fbcon_set_all_vcs()
3018 p = &fb_display[vc->vc_num]; in fbcon_set_all_vcs()
3019 set_blitting_type(vc, info); in fbcon_set_all_vcs()
3023 cols /= vc->vc_font.width; in fbcon_set_all_vcs()
3024 rows /= vc->vc_font.height; in fbcon_set_all_vcs()
3025 vc_resize(vc, cols, rows); in fbcon_set_all_vcs()
3266 struct vc_data *vc; in fbcon_fb_blanked() local
3271 vc = vc_cons[ops->currcon].d; in fbcon_fb_blanked()
3272 if (vc->vc_mode != KD_TEXT || in fbcon_fb_blanked()
3276 if (con_is_visible(vc)) { in fbcon_fb_blanked()
3288 struct vc_data *vc; in fbcon_new_modelist() local
3297 vc = vc_cons[i].d; in fbcon_new_modelist()
3302 fbcon_set_disp(info, &var, vc->vc_num); in fbcon_new_modelist()
3309 struct vc_data *vc; in fbcon_get_requirement() local
3316 vc = vc_cons[i].d; in fbcon_get_requirement()
3317 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3320 caps->x |= 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3321 caps->y |= 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()
3329 vc = vc_cons[fg_console].d; in fbcon_get_requirement()
3331 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3334 caps->x = 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3335 caps->y = 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()