Lines Matching refs:vc
153 #define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row)
166 static void fbcon_init(struct vc_data *vc, int init);
167 static void fbcon_deinit(struct vc_data *vc);
168 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
170 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos);
171 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
173 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only);
174 static void fbcon_cursor(struct vc_data *vc, int mode);
175 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
177 static int fbcon_switch(struct vc_data *vc);
178 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch);
179 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table);
184 static __inline__ void ywrap_up(struct vc_data *vc, int count);
185 static __inline__ void ywrap_down(struct vc_data *vc, int count);
186 static __inline__ void ypan_up(struct vc_data *vc, int count);
187 static __inline__ void ypan_down(struct vc_data *vc, int count);
188 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx,
192 static void fbcon_redraw_move(struct vc_data *vc, struct display *p,
237 struct vc_data *vc; in fbcon_rotate_all() local
245 vc = vc_cons[i].d; in fbcon_rotate_all()
246 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_rotate_all()
250 p = &fb_display[vc->vc_num]; in fbcon_rotate_all()
282 static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info) in fbcon_is_inactive() argument
287 vc->vc_mode != KD_TEXT || ops->graphics) && in fbcon_is_inactive()
288 !vt_force_oops_output(vc); in fbcon_is_inactive()
291 static int get_color(struct vc_data *vc, struct fb_info *info, in get_color() argument
298 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in get_color()
300 c = vc->vc_video_erase_char & charmask; in get_color()
304 color = (is_fg) ? attr_fgcol((vc->vc_hi_font_mask) ? 9 : 8, c) in get_color()
305 : attr_bgcol((vc->vc_hi_font_mask) ? 13 : 12, c); in get_color()
358 static void fbcon_update_softback(struct vc_data *vc) in fbcon_update_softback() argument
360 int l = fbcon_softback_size / vc->vc_size_row; in fbcon_update_softback()
363 softback_end = softback_buf + l * vc->vc_size_row; in fbcon_update_softback()
374 struct vc_data *vc = NULL; in fb_flashcursor() local
387 vc = vc_cons[ops->currcon].d; in fb_flashcursor()
389 if (!vc || !con_is_visible(vc) || in fb_flashcursor()
390 registered_fb[con2fb_map[vc->vc_num]] != info || in fb_flashcursor()
391 vc->vc_deccm != 1) { in fb_flashcursor()
396 c = scr_readw((u16 *) vc->vc_pos); in fb_flashcursor()
399 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), in fb_flashcursor()
400 get_color(vc, info, c, 0)); in fb_flashcursor()
571 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
577 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
582 int cnt, erase = vc->vc_video_erase_char, step; in fbcon_prepare_logo()
598 logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height); in fbcon_prepare_logo()
599 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
600 vc->vc_size_row * rows); in fbcon_prepare_logo()
603 if (scr_readw(r) != vc->vc_video_erase_char) in fbcon_prepare_logo()
621 scr_memcpyw(r + step, r, vc->vc_size_row); in fbcon_prepare_logo()
626 if (vc->vc_y + logo_lines >= rows) in fbcon_prepare_logo()
627 lines = rows - vc->vc_y - 1; in fbcon_prepare_logo()
630 vc->vc_y += lines; in fbcon_prepare_logo()
631 vc->vc_pos += lines * vc->vc_size_row; in fbcon_prepare_logo()
634 scr_memsetw((unsigned short *) vc->vc_origin, in fbcon_prepare_logo()
636 vc->vc_size_row * logo_lines); in fbcon_prepare_logo()
638 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_prepare_logo()
639 fbcon_clear_margins(vc, 0); in fbcon_prepare_logo()
640 update_screen(vc); in fbcon_prepare_logo()
644 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
645 vc->vc_size_row * in fbcon_prepare_logo()
648 vc->vc_y += logo_lines; in fbcon_prepare_logo()
649 vc->vc_pos += logo_lines * vc->vc_size_row; in fbcon_prepare_logo()
653 if (logo_lines > vc->vc_bottom) { in fbcon_prepare_logo()
659 vc->vc_top = logo_lines; in fbcon_prepare_logo()
665 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
669 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
672 fbcon_set_tileops(vc, info); in set_blitting_type()
690 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
695 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
708 static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, in con2fb_acquire_newinfo() argument
732 if (vc) in con2fb_acquire_newinfo()
733 set_blitting_type(vc, info); in con2fb_acquire_newinfo()
744 static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, in con2fb_release_oldinfo() argument
790 static void con2fb_init_display(struct vc_data *vc, struct fb_info *info, in con2fb_init_display() argument
837 struct vc_data *vc = vc_cons[unit].d; in set_con2fb_map() local
863 err = con2fb_acquire_newinfo(vc, info, unit, oldidx); in set_con2fb_map()
871 err = con2fb_release_oldinfo(vc, oldinfo, info, unit, oldidx, in set_con2fb_map()
881 con2fb_init_display(vc, info, unit, show_logo); in set_con2fb_map()
941 struct vc_data *vc = vc_cons[fg_console].d; in fbcon_startup() local
989 set_blitting_type(vc, info); in fbcon_startup()
1017 if (!p->fontdata && !vc->vc_font.data) { in fbcon_startup()
1023 vc->vc_font.width = font->width; in fbcon_startup()
1024 vc->vc_font.height = font->height; in fbcon_startup()
1025 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_startup()
1026 vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ in fbcon_startup()
1028 p->fontdata = vc->vc_font.data; in fbcon_startup()
1033 cols /= vc->vc_font.width; in fbcon_startup()
1034 rows /= vc->vc_font.height; in fbcon_startup()
1035 vc_resize(vc, cols, rows); in fbcon_startup()
1048 static void fbcon_init(struct vc_data *vc, int init) in fbcon_init() argument
1050 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_init()
1052 struct vc_data **default_mode = vc->vc_display_fg; in fbcon_init()
1054 struct display *t, *p = &fb_display[vc->vc_num]; in fbcon_init()
1063 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || in fbcon_init()
1071 con2fb_acquire_newinfo(vc, info, vc->vc_num, -1); in fbcon_init()
1080 vc->vc_font.data = (void *)(p->fontdata = in fbcon_init()
1082 vc->vc_font.width = fvc->vc_font.width; in fbcon_init()
1083 vc->vc_font.height = fvc->vc_font.height; in fbcon_init()
1096 vc->vc_font.width = font->width; in fbcon_init()
1097 vc->vc_font.height = font->height; in fbcon_init()
1098 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_init()
1099 vc->vc_font.charcount = 256; /* FIXME Need to in fbcon_init()
1107 vc->vc_panic_force_write = !!(info->flags & FBINFO_CAN_FORCE_OUTPUT); in fbcon_init()
1108 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_init()
1109 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_init()
1111 vc->vc_hi_font_mask = 0; in fbcon_init()
1113 vc->vc_hi_font_mask = 0x100; in fbcon_init()
1114 if (vc->vc_can_do_color) in fbcon_init()
1115 vc->vc_complement_mask <<= 1; in fbcon_init()
1120 if (!*vc->vc_uni_pagedir_loc) in fbcon_init()
1121 con_copy_unimap(vc, svc); in fbcon_init()
1124 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_init()
1132 set_blitting_type(vc, info); in fbcon_init()
1134 cols = vc->vc_cols; in fbcon_init()
1135 rows = vc->vc_rows; in fbcon_init()
1138 new_cols /= vc->vc_font.width; in fbcon_init()
1139 new_rows /= vc->vc_font.height; in fbcon_init()
1148 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_init()
1176 vc->vc_cols = new_cols; in fbcon_init()
1177 vc->vc_rows = new_rows; in fbcon_init()
1179 vc_resize(vc, new_cols, new_rows); in fbcon_init()
1182 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); in fbcon_init()
1184 if (vc == svc && softback_buf) in fbcon_init()
1185 fbcon_update_softback(vc); in fbcon_init()
1187 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_init()
1189 set_blitting_type(vc, info); in fbcon_init()
1203 static void set_vc_hi_font(struct vc_data *vc, bool set);
1205 static void fbcon_deinit(struct vc_data *vc) in fbcon_deinit() argument
1207 struct display *p = &fb_display[vc->vc_num]; in fbcon_deinit()
1213 idx = con2fb_map[vc->vc_num]; in fbcon_deinit()
1230 if (con_is_visible(vc)) in fbcon_deinit()
1238 vc->vc_font.data = NULL; in fbcon_deinit()
1240 if (vc->vc_hi_font_mask) in fbcon_deinit()
1241 set_vc_hi_font(vc, false); in fbcon_deinit()
1274 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, in fbcon_clear() argument
1277 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear()
1280 struct display *p = &fb_display[vc->vc_num]; in fbcon_clear()
1283 if (fbcon_is_inactive(vc, info)) in fbcon_clear()
1289 if (sy < vc->vc_top && vc->vc_top == logo_lines) { in fbcon_clear()
1290 vc->vc_top = 0; in fbcon_clear()
1297 fbcon_clear_margins(vc, 0); in fbcon_clear()
1305 ops->clear(vc, info, real_y(p, sy), sx, b, width); in fbcon_clear()
1306 ops->clear(vc, info, real_y(p, sy + b), sx, height - b, in fbcon_clear()
1309 ops->clear(vc, info, real_y(p, sy), sx, height, width); in fbcon_clear()
1312 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, in fbcon_putcs() argument
1315 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_putcs()
1316 struct display *p = &fb_display[vc->vc_num]; in fbcon_putcs()
1319 if (!fbcon_is_inactive(vc, info)) in fbcon_putcs()
1320 ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, in fbcon_putcs()
1321 get_color(vc, info, scr_readw(s), 1), in fbcon_putcs()
1322 get_color(vc, info, scr_readw(s), 0)); in fbcon_putcs()
1325 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) in fbcon_putc() argument
1330 fbcon_putcs(vc, &chr, 1, ypos, xpos); in fbcon_putc()
1333 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) in fbcon_clear_margins() argument
1335 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear_margins()
1338 if (!fbcon_is_inactive(vc, info)) in fbcon_clear_margins()
1339 ops->clear_margins(vc, info, margin_color, bottom_only); in fbcon_clear_margins()
1342 static void fbcon_cursor(struct vc_data *vc, int mode) in fbcon_cursor() argument
1344 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_cursor()
1347 int c = scr_readw((u16 *) vc->vc_pos); in fbcon_cursor()
1349 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_cursor()
1351 if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) in fbcon_cursor()
1354 if (vc->vc_cursor_type & 0x10) in fbcon_cursor()
1365 fbcon_set_origin(vc); in fbcon_cursor()
1369 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), in fbcon_cursor()
1370 get_color(vc, info, c, 0)); in fbcon_cursor()
1381 struct vc_data **default_mode, *vc; in fbcon_set_disp() local
1391 vc = vc_cons[unit].d; in fbcon_set_disp()
1393 if (!vc) in fbcon_set_disp()
1396 default_mode = vc->vc_display_fg; in fbcon_set_disp()
1400 if (!vc->vc_font.data) { in fbcon_set_disp()
1401 vc->vc_font.data = (void *)(p->fontdata = t->fontdata); in fbcon_set_disp()
1402 vc->vc_font.width = (*default_mode)->vc_font.width; in fbcon_set_disp()
1403 vc->vc_font.height = (*default_mode)->vc_font.height; in fbcon_set_disp()
1417 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_set_disp()
1418 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_set_disp()
1420 vc->vc_hi_font_mask = 0; in fbcon_set_disp()
1422 vc->vc_hi_font_mask = 0x100; in fbcon_set_disp()
1423 if (vc->vc_can_do_color) in fbcon_set_disp()
1424 vc->vc_complement_mask <<= 1; in fbcon_set_disp()
1429 if (!*vc->vc_uni_pagedir_loc) in fbcon_set_disp()
1430 con_copy_unimap(vc, svc); in fbcon_set_disp()
1434 cols /= vc->vc_font.width; in fbcon_set_disp()
1435 rows /= vc->vc_font.height; in fbcon_set_disp()
1436 vc_resize(vc, cols, rows); in fbcon_set_disp()
1438 if (con_is_visible(vc)) { in fbcon_set_disp()
1439 update_screen(vc); in fbcon_set_disp()
1441 fbcon_update_softback(vc); in fbcon_set_disp()
1445 static __inline__ void ywrap_up(struct vc_data *vc, int count) in ywrap_up() argument
1447 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_up()
1449 struct display *p = &fb_display[vc->vc_num]; in ywrap_up()
1455 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_up()
1464 static __inline__ void ywrap_down(struct vc_data *vc, int count) in ywrap_down() argument
1466 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_down()
1468 struct display *p = &fb_display[vc->vc_num]; in ywrap_down()
1474 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_down()
1483 static __inline__ void ypan_up(struct vc_data *vc, int count) in ypan_up() argument
1485 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up()
1486 struct display *p = &fb_display[vc->vc_num]; in ypan_up()
1490 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up()
1491 ops->bmove(vc, info, p->vrows - vc->vc_rows, in ypan_up()
1492 0, 0, 0, vc->vc_rows, vc->vc_cols); in ypan_up()
1493 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up()
1497 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up()
1500 fbcon_clear_margins(vc, 1); in ypan_up()
1507 static __inline__ void ypan_up_redraw(struct vc_data *vc, int t, int count) in ypan_up_redraw() argument
1509 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up_redraw()
1511 struct display *p = &fb_display[vc->vc_num]; in ypan_up_redraw()
1515 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up_redraw()
1516 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up_redraw()
1517 fbcon_redraw_move(vc, p, t + count, vc->vc_rows - count, t); in ypan_up_redraw()
1521 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up_redraw()
1524 fbcon_clear_margins(vc, 1); in ypan_up_redraw()
1531 static __inline__ void ypan_down(struct vc_data *vc, int count) in ypan_down() argument
1533 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down()
1534 struct display *p = &fb_display[vc->vc_num]; in ypan_down()
1539 ops->bmove(vc, info, 0, 0, p->vrows - vc->vc_rows, in ypan_down()
1540 0, vc->vc_rows, vc->vc_cols); in ypan_down()
1541 p->yscroll += p->vrows - vc->vc_rows; in ypan_down()
1545 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down()
1548 fbcon_clear_margins(vc, 1); in ypan_down()
1555 static __inline__ void ypan_down_redraw(struct vc_data *vc, int t, int count) in ypan_down_redraw() argument
1557 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down_redraw()
1559 struct display *p = &fb_display[vc->vc_num]; in ypan_down_redraw()
1564 p->yscroll += p->vrows - vc->vc_rows; in ypan_down_redraw()
1565 fbcon_redraw_move(vc, p, t, vc->vc_rows - count, t + count); in ypan_down_redraw()
1569 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down_redraw()
1572 fbcon_clear_margins(vc, 1); in ypan_down_redraw()
1579 static void fbcon_redraw_softback(struct vc_data *vc, struct display *p, in fbcon_redraw_softback() argument
1582 int count = vc->vc_rows; in fbcon_redraw_softback()
1589 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1590 n = softback_curr + delta * vc->vc_size_row; in fbcon_redraw_softback()
1597 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1603 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1623 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1638 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1646 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1659 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw_softback()
1664 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1668 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1672 static void fbcon_redraw_move(struct vc_data *vc, struct display *p, in fbcon_redraw_move() argument
1676 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_move()
1690 fbcon_putcs(vc, start, s - start, in fbcon_redraw_move()
1700 fbcon_putcs(vc, start, s - start, dy, x); in fbcon_redraw_move()
1706 static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info, in fbcon_redraw_blit() argument
1709 int offset = ycount * vc->vc_cols; in fbcon_redraw_blit()
1711 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_blit()
1726 ops->bmove(vc, info, line + ycount, x, in fbcon_redraw_blit()
1742 ops->bmove(vc, info, line + ycount, x, line, x, 1, in fbcon_redraw_blit()
1750 s -= vc->vc_size_row; in fbcon_redraw_blit()
1751 d -= vc->vc_size_row; in fbcon_redraw_blit()
1756 static void fbcon_redraw(struct vc_data *vc, struct display *p, in fbcon_redraw() argument
1760 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw()
1775 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1783 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1798 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw()
1805 s -= vc->vc_size_row; in fbcon_redraw()
1806 d -= vc->vc_size_row; in fbcon_redraw()
1811 static inline void fbcon_softback_note(struct vc_data *vc, int t, in fbcon_softback_note() argument
1816 if (vc->vc_num != fg_console) in fbcon_softback_note()
1818 p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); in fbcon_softback_note()
1821 scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); in fbcon_softback_note()
1824 softback_in += vc->vc_size_row; in fbcon_softback_note()
1828 softback_top += vc->vc_size_row; in fbcon_softback_note()
1836 static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, in fbcon_scroll() argument
1839 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_scroll()
1840 struct display *p = &fb_display[vc->vc_num]; in fbcon_scroll()
1843 if (fbcon_is_inactive(vc, info)) in fbcon_scroll()
1846 fbcon_cursor(vc, CM_ERASE); in fbcon_scroll()
1856 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1857 count = vc->vc_rows; in fbcon_scroll()
1859 fbcon_softback_note(vc, t, count); in fbcon_scroll()
1864 fbcon_redraw_blit(vc, info, p, t, b - t - count, in fbcon_scroll()
1866 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1867 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1868 vc->vc_size_row * in fbcon_scroll()
1870 vc->vc_video_erase_char, in fbcon_scroll()
1871 vc->vc_size_row * count); in fbcon_scroll()
1876 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1878 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1879 vc->vc_cols); in fbcon_scroll()
1880 ywrap_up(vc, count); in fbcon_scroll()
1881 if (vc->vc_rows - b > 0) in fbcon_scroll()
1882 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1883 vc->vc_rows - b, in fbcon_scroll()
1884 vc->vc_cols); in fbcon_scroll()
1886 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1887 b - t - count, vc->vc_cols); in fbcon_scroll()
1890 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1895 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1896 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1899 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1901 fbcon_redraw_move(vc, p, 0, t, count); in fbcon_scroll()
1902 ypan_up_redraw(vc, t, count); in fbcon_scroll()
1903 if (vc->vc_rows - b > 0) in fbcon_scroll()
1904 fbcon_redraw_move(vc, p, b, in fbcon_scroll()
1905 vc->vc_rows - b, b); in fbcon_scroll()
1907 fbcon_redraw_move(vc, p, t + count, b - t - count, t); in fbcon_scroll()
1908 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1913 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1914 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1917 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1919 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1920 vc->vc_cols); in fbcon_scroll()
1921 ypan_up(vc, count); in fbcon_scroll()
1922 if (vc->vc_rows - b > 0) in fbcon_scroll()
1923 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1924 vc->vc_rows - b, in fbcon_scroll()
1925 vc->vc_cols); in fbcon_scroll()
1927 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1928 b - t - count, vc->vc_cols); in fbcon_scroll()
1931 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1936 fbcon_redraw(vc, p, t, b - t - count, in fbcon_scroll()
1937 count * vc->vc_cols); in fbcon_scroll()
1938 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1939 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1940 vc->vc_size_row * in fbcon_scroll()
1942 vc->vc_video_erase_char, in fbcon_scroll()
1943 vc->vc_size_row * count); in fbcon_scroll()
1949 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1950 count = vc->vc_rows; in fbcon_scroll()
1955 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, in fbcon_scroll()
1957 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1958 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1959 vc->vc_size_row * in fbcon_scroll()
1961 vc->vc_video_erase_char, in fbcon_scroll()
1962 vc->vc_size_row * count); in fbcon_scroll()
1967 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1968 if (vc->vc_rows - b > 0) in fbcon_scroll()
1969 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1970 vc->vc_rows - b, in fbcon_scroll()
1971 vc->vc_cols); in fbcon_scroll()
1972 ywrap_down(vc, count); in fbcon_scroll()
1974 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1975 vc->vc_cols); in fbcon_scroll()
1977 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1978 b - t - count, vc->vc_cols); in fbcon_scroll()
1981 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1985 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1986 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1989 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1990 if (vc->vc_rows - b > 0) in fbcon_scroll()
1991 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1992 vc->vc_rows - b, in fbcon_scroll()
1993 vc->vc_cols); in fbcon_scroll()
1994 ypan_down(vc, count); in fbcon_scroll()
1996 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1997 vc->vc_cols); in fbcon_scroll()
1999 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
2000 b - t - count, vc->vc_cols); in fbcon_scroll()
2003 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2007 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
2008 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
2011 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
2012 if (vc->vc_rows - b > 0) in fbcon_scroll()
2013 fbcon_redraw_move(vc, p, b, vc->vc_rows - b, in fbcon_scroll()
2015 ypan_down_redraw(vc, t, count); in fbcon_scroll()
2017 fbcon_redraw_move(vc, p, count, t, 0); in fbcon_scroll()
2019 fbcon_redraw_move(vc, p, t, b - t - count, t + count); in fbcon_scroll()
2020 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2025 fbcon_redraw(vc, p, b - 1, b - t - count, in fbcon_scroll()
2026 -count * vc->vc_cols); in fbcon_scroll()
2027 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
2028 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
2029 vc->vc_size_row * in fbcon_scroll()
2031 vc->vc_video_erase_char, in fbcon_scroll()
2032 vc->vc_size_row * count); in fbcon_scroll()
2040 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, in fbcon_bmove() argument
2043 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove()
2044 struct display *p = &fb_display[vc->vc_num]; in fbcon_bmove()
2046 if (fbcon_is_inactive(vc, info)) in fbcon_bmove()
2059 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, height, width, in fbcon_bmove()
2063 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx, in fbcon_bmove_rec() argument
2066 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove_rec()
2073 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2075 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2078 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2080 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2089 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2091 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2094 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2096 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2101 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, in fbcon_bmove_rec()
2107 struct vc_data *vc) in updatescrollmode() argument
2110 int fh = vc->vc_font.height; in updatescrollmode()
2120 divides(ypan, vc->vc_font.height) && vyres > yres; in updatescrollmode()
2122 divides(ywrap, vc->vc_font.height) && in updatescrollmode()
2123 divides(vc->vc_font.height, vyres) && in updatescrollmode()
2124 divides(vc->vc_font.height, yres); in updatescrollmode()
2132 if (yres > (fh * (vc->vc_rows + 1))) in updatescrollmode()
2133 p->vrows -= (yres - (fh * vc->vc_rows)) / fh; in updatescrollmode()
2152 static int fbcon_resize(struct vc_data *vc, unsigned int width, in fbcon_resize() argument
2155 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_resize()
2157 struct display *p = &fb_display[vc->vc_num]; in fbcon_resize()
2163 virt_fw = FBCON_SWAP(ops->rotate, vc->vc_font.width, in fbcon_resize()
2164 vc->vc_font.height); in fbcon_resize()
2165 virt_fh = FBCON_SWAP(ops->rotate, vc->vc_font.height, in fbcon_resize()
2166 vc->vc_font.width); in fbcon_resize()
2186 if (con_is_visible(vc)) { in fbcon_resize()
2194 updatescrollmode(p, info, vc); in fbcon_resize()
2198 static int fbcon_switch(struct vc_data *vc) in fbcon_switch() argument
2202 struct display *p = &fb_display[vc->vc_num]; in fbcon_switch()
2206 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_switch()
2211 fbcon_set_origin(vc); in fbcon_switch()
2214 fbcon_update_softback(vc); in fbcon_switch()
2241 o->currcon = vc->vc_num; in fbcon_switch()
2272 if (fbcon_is_inactive(vc, info) || in fbcon_switch()
2278 set_blitting_type(vc, info); in fbcon_switch()
2281 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_switch()
2283 set_blitting_type(vc, info); in fbcon_switch()
2286 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_switch()
2287 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_switch()
2290 charcnt = FNTCHARCNT(vc->vc_font.data); in fbcon_switch()
2293 vc->vc_complement_mask <<= 1; in fbcon_switch()
2295 updatescrollmode(p, info, vc); in fbcon_switch()
2299 scrollback_phys_max = p->vrows - vc->vc_rows; in fbcon_switch()
2303 scrollback_phys_max = p->vrows - 2 * vc->vc_rows; in fbcon_switch()
2315 if (!fbcon_is_inactive(vc, info)) { in fbcon_switch()
2320 fbcon_set_palette(vc, color_table); in fbcon_switch()
2321 fbcon_clear_margins(vc, 0); in fbcon_switch()
2328 update_region(vc, in fbcon_switch()
2329 vc->vc_origin + vc->vc_size_row * vc->vc_top, in fbcon_switch()
2330 vc->vc_size_row * (vc->vc_bottom - in fbcon_switch()
2331 vc->vc_top) / 2); in fbcon_switch()
2337 static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, in fbcon_generic_blank() argument
2343 unsigned short charmask = vc->vc_hi_font_mask ? in fbcon_generic_blank()
2347 oldc = vc->vc_video_erase_char; in fbcon_generic_blank()
2348 vc->vc_video_erase_char &= charmask; in fbcon_generic_blank()
2349 fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); in fbcon_generic_blank()
2350 vc->vc_video_erase_char = oldc; in fbcon_generic_blank()
2362 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) in fbcon_blank() argument
2364 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_blank()
2380 if (!fbcon_is_inactive(vc, info)) { in fbcon_blank()
2383 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); in fbcon_blank()
2388 fbcon_generic_blank(vc, info, blank); in fbcon_blank()
2392 update_screen(vc); in fbcon_blank()
2395 if (mode_switch || fbcon_is_inactive(vc, info) || in fbcon_blank()
2404 static int fbcon_debug_enter(struct vc_data *vc) in fbcon_debug_enter() argument
2406 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_enter()
2413 fbcon_set_palette(vc, color_table); in fbcon_debug_enter()
2417 static int fbcon_debug_leave(struct vc_data *vc) in fbcon_debug_leave() argument
2419 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_leave()
2428 static int fbcon_get_font(struct vc_data *vc, struct console_font *font) in fbcon_get_font() argument
2430 u8 *fontdata = vc->vc_font.data; in fbcon_get_font()
2434 font->width = vc->vc_font.width; in fbcon_get_font()
2435 font->height = vc->vc_font.height; in fbcon_get_font()
2436 font->charcount = vc->vc_hi_font_mask ? 512 : 256; in fbcon_get_font()
2441 j = vc->vc_font.height; in fbcon_get_font()
2449 j = vc->vc_font.height * 2; in fbcon_get_font()
2458 for (j = 0; j < vc->vc_font.height; j++) { in fbcon_get_font()
2468 j = vc->vc_font.height * 4; in fbcon_get_font()
2480 static void set_vc_hi_font(struct vc_data *vc, bool set) in set_vc_hi_font() argument
2483 vc->vc_hi_font_mask = 0; in set_vc_hi_font()
2484 if (vc->vc_can_do_color) { in set_vc_hi_font()
2485 vc->vc_complement_mask >>= 1; in set_vc_hi_font()
2486 vc->vc_s_complement_mask >>= 1; in set_vc_hi_font()
2490 if (vc->vc_can_do_color) { in set_vc_hi_font()
2492 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2493 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2500 c = vc->vc_video_erase_char; in set_vc_hi_font()
2501 vc->vc_video_erase_char = in set_vc_hi_font()
2503 vc->vc_attr >>= 1; in set_vc_hi_font()
2506 vc->vc_hi_font_mask = 0x100; in set_vc_hi_font()
2507 if (vc->vc_can_do_color) { in set_vc_hi_font()
2508 vc->vc_complement_mask <<= 1; in set_vc_hi_font()
2509 vc->vc_s_complement_mask <<= 1; in set_vc_hi_font()
2515 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2516 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2521 if (vc->vc_can_do_color) in set_vc_hi_font()
2529 c = vc->vc_video_erase_char; in set_vc_hi_font()
2530 if (vc->vc_can_do_color) { in set_vc_hi_font()
2531 vc->vc_video_erase_char = in set_vc_hi_font()
2533 vc->vc_attr <<= 1; in set_vc_hi_font()
2535 vc->vc_video_erase_char = c & ~0x100; in set_vc_hi_font()
2540 static int fbcon_do_set_font(struct vc_data *vc, int w, int h, in fbcon_do_set_font() argument
2543 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_do_set_font()
2545 struct display *p = &fb_display[vc->vc_num]; in fbcon_do_set_font()
2550 if (con_is_visible(vc) && softback_lines) in fbcon_do_set_font()
2551 fbcon_set_origin(vc); in fbcon_do_set_font()
2553 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); in fbcon_do_set_font()
2555 old_data = vc->vc_font.data; in fbcon_do_set_font()
2560 vc->vc_font.data = (void *)(p->fontdata = data); in fbcon_do_set_font()
2563 vc->vc_font.width = w; in fbcon_do_set_font()
2564 vc->vc_font.height = h; in fbcon_do_set_font()
2565 if (vc->vc_hi_font_mask && cnt == 256) in fbcon_do_set_font()
2566 set_vc_hi_font(vc, false); in fbcon_do_set_font()
2567 else if (!vc->vc_hi_font_mask && cnt == 512) in fbcon_do_set_font()
2568 set_vc_hi_font(vc, true); in fbcon_do_set_font()
2577 vc_resize(vc, cols, rows); in fbcon_do_set_font()
2578 if (con_is_visible(vc) && softback_buf) in fbcon_do_set_font()
2579 fbcon_update_softback(vc); in fbcon_do_set_font()
2580 } else if (con_is_visible(vc) in fbcon_do_set_font()
2581 && vc->vc_mode == KD_TEXT) { in fbcon_do_set_font()
2582 fbcon_clear_margins(vc, 0); in fbcon_do_set_font()
2583 update_screen(vc); in fbcon_do_set_font()
2591 static int fbcon_copy_font(struct vc_data *vc, int con) in fbcon_copy_font() argument
2594 struct console_font *f = &vc->vc_font; in fbcon_copy_font()
2598 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); in fbcon_copy_font()
2613 static int fbcon_set_font(struct vc_data *vc, struct console_font *font, in fbcon_set_font() argument
2616 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_font()
2674 return fbcon_do_set_font(vc, font->width, font->height, new_data, 1); in fbcon_set_font()
2677 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name) in fbcon_set_def_font() argument
2679 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_def_font()
2690 return fbcon_do_set_font(vc, f->width, f->height, f->data, 0); in fbcon_set_def_font()
2701 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table) in fbcon_set_palette() argument
2703 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_palette()
2707 if (fbcon_is_inactive(vc, info)) in fbcon_set_palette()
2710 if (!con_is_visible(vc)) in fbcon_set_palette()
2717 val = vc->vc_palette[j++]; in fbcon_set_palette()
2719 val = vc->vc_palette[j++]; in fbcon_set_palette()
2721 val = vc->vc_palette[j++]; in fbcon_set_palette()
2736 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) in fbcon_screen_pos() argument
2741 if (vc->vc_num != fg_console || !softback_lines) in fbcon_screen_pos()
2742 return (u16 *) (vc->vc_origin + offset); in fbcon_screen_pos()
2743 line = offset / vc->vc_size_row; in fbcon_screen_pos()
2745 return (u16 *) (vc->vc_origin + offset - in fbcon_screen_pos()
2746 softback_lines * vc->vc_size_row); in fbcon_screen_pos()
2753 static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, in fbcon_getxy() argument
2759 if (pos >= vc->vc_origin && pos < vc->vc_scr_end) { in fbcon_getxy()
2760 unsigned long offset = (pos - vc->vc_origin) / 2; in fbcon_getxy()
2762 x = offset % vc->vc_cols; in fbcon_getxy()
2763 y = offset / vc->vc_cols; in fbcon_getxy()
2764 if (vc->vc_num == fg_console) in fbcon_getxy()
2766 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2767 } else if (vc->vc_num == fg_console && softback_lines) { in fbcon_getxy()
2773 x = offset % vc->vc_cols; in fbcon_getxy()
2774 y = offset / vc->vc_cols; in fbcon_getxy()
2775 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2779 ret = vc->vc_origin; in fbcon_getxy()
2783 ret = vc->vc_origin; in fbcon_getxy()
2794 static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt) in fbcon_invert_region() argument
2798 if (!vc->vc_can_do_color) in fbcon_invert_region()
2800 else if (vc->vc_hi_font_mask == 0x100) in fbcon_invert_region()
2810 p = (u16 *) vc->vc_origin; in fbcon_invert_region()
2814 static void fbcon_scrolldelta(struct vc_data *vc, int lines) in fbcon_scrolldelta() argument
2822 if (vc->vc_num != fg_console) in fbcon_scrolldelta()
2824 if (vc->vc_mode != KD_TEXT || !lines) in fbcon_scrolldelta()
2832 if (logo_shown == vc->vc_num) { in fbcon_scrolldelta()
2837 q = vc->vc_origin + in fbcon_scrolldelta()
2838 logo_lines * vc->vc_size_row; in fbcon_scrolldelta()
2844 p -= vc->vc_size_row; in fbcon_scrolldelta()
2845 q -= vc->vc_size_row; in fbcon_scrolldelta()
2847 vc->vc_size_row); in fbcon_scrolldelta()
2850 update_region(vc, vc->vc_origin, in fbcon_scrolldelta()
2851 logo_lines * vc->vc_cols); in fbcon_scrolldelta()
2855 fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); in fbcon_scrolldelta()
2856 fbcon_redraw_softback(vc, disp, lines); in fbcon_scrolldelta()
2857 fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); in fbcon_scrolldelta()
2873 if (fbcon_is_inactive(vc, info)) in fbcon_scrolldelta()
2876 fbcon_cursor(vc, CM_ERASE); in fbcon_scrolldelta()
2886 limit -= vc->vc_rows; in fbcon_scrolldelta()
2896 ops->var.yoffset = offset * vc->vc_font.height; in fbcon_scrolldelta()
2900 fbcon_cursor(vc, CM_DRAW); in fbcon_scrolldelta()
2903 static int fbcon_set_origin(struct vc_data *vc) in fbcon_set_origin() argument
2906 fbcon_scrolldelta(vc, softback_lines); in fbcon_set_origin()
2912 struct vc_data *vc = NULL; in fbcon_suspended() local
2917 vc = vc_cons[ops->currcon].d; in fbcon_suspended()
2920 fbcon_cursor(vc, CM_ERASE); in fbcon_suspended()
2925 struct vc_data *vc; in fbcon_resumed() local
2930 vc = vc_cons[ops->currcon].d; in fbcon_resumed()
2932 update_screen(vc); in fbcon_resumed()
2938 struct vc_data *vc; in fbcon_modechanged() local
2944 vc = vc_cons[ops->currcon].d; in fbcon_modechanged()
2945 if (vc->vc_mode != KD_TEXT || in fbcon_modechanged()
2949 p = &fb_display[vc->vc_num]; in fbcon_modechanged()
2950 set_blitting_type(vc, info); in fbcon_modechanged()
2952 if (con_is_visible(vc)) { in fbcon_modechanged()
2956 cols /= vc->vc_font.width; in fbcon_modechanged()
2957 rows /= vc->vc_font.height; in fbcon_modechanged()
2958 vc_resize(vc, cols, rows); in fbcon_modechanged()
2959 updatescrollmode(p, info, vc); in fbcon_modechanged()
2963 if (!fbcon_is_inactive(vc, info)) { in fbcon_modechanged()
2968 fbcon_set_palette(vc, color_table); in fbcon_modechanged()
2969 update_screen(vc); in fbcon_modechanged()
2971 fbcon_update_softback(vc); in fbcon_modechanged()
2978 struct vc_data *vc; in fbcon_set_all_vcs() local
2986 vc = vc_cons[i].d; in fbcon_set_all_vcs()
2987 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_set_all_vcs()
2991 if (con_is_visible(vc)) { in fbcon_set_all_vcs()
2996 p = &fb_display[vc->vc_num]; in fbcon_set_all_vcs()
2997 set_blitting_type(vc, info); in fbcon_set_all_vcs()
3001 cols /= vc->vc_font.width; in fbcon_set_all_vcs()
3002 rows /= vc->vc_font.height; in fbcon_set_all_vcs()
3003 vc_resize(vc, cols, rows); in fbcon_set_all_vcs()
3242 struct vc_data *vc; in fbcon_fb_blanked() local
3247 vc = vc_cons[ops->currcon].d; in fbcon_fb_blanked()
3248 if (vc->vc_mode != KD_TEXT || in fbcon_fb_blanked()
3252 if (con_is_visible(vc)) { in fbcon_fb_blanked()
3264 struct vc_data *vc; in fbcon_new_modelist() local
3273 vc = vc_cons[i].d; in fbcon_new_modelist()
3278 fbcon_set_disp(info, &var, vc->vc_num); in fbcon_new_modelist()
3285 struct vc_data *vc; in fbcon_get_requirement() local
3292 vc = vc_cons[i].d; in fbcon_get_requirement()
3293 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3296 caps->x |= 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3297 caps->y |= 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()
3305 vc = vc_cons[fg_console].d; in fbcon_get_requirement()
3307 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3310 caps->x = 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3311 caps->y = 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()