Lines Matching refs:vc
145 #define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row)
158 static void fbcon_init(struct vc_data *vc, int init);
159 static void fbcon_deinit(struct vc_data *vc);
160 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
162 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos);
163 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
165 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only);
166 static void fbcon_cursor(struct vc_data *vc, int mode);
167 static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
169 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
171 static int fbcon_switch(struct vc_data *vc);
172 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch);
173 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table);
178 static __inline__ void ywrap_up(struct vc_data *vc, int count);
179 static __inline__ void ywrap_down(struct vc_data *vc, int count);
180 static __inline__ void ypan_up(struct vc_data *vc, int count);
181 static __inline__ void ypan_down(struct vc_data *vc, int count);
182 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx,
186 static void fbcon_redraw_move(struct vc_data *vc, struct display *p,
231 struct vc_data *vc; in fbcon_rotate_all() local
239 vc = vc_cons[i].d; in fbcon_rotate_all()
240 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_rotate_all()
244 p = &fb_display[vc->vc_num]; in fbcon_rotate_all()
276 static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info) in fbcon_is_inactive() argument
281 vc->vc_mode != KD_TEXT || ops->graphics) && in fbcon_is_inactive()
282 !vt_force_oops_output(vc); in fbcon_is_inactive()
285 static int get_color(struct vc_data *vc, struct fb_info *info, in get_color() argument
292 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in get_color()
294 c = vc->vc_video_erase_char & charmask; in get_color()
298 color = (is_fg) ? attr_fgcol((vc->vc_hi_font_mask) ? 9 : 8, c) in get_color()
299 : attr_bgcol((vc->vc_hi_font_mask) ? 13 : 12, c); in get_color()
352 static void fbcon_update_softback(struct vc_data *vc) in fbcon_update_softback() argument
354 int l = fbcon_softback_size / vc->vc_size_row; in fbcon_update_softback()
357 softback_end = softback_buf + l * vc->vc_size_row; in fbcon_update_softback()
368 struct vc_data *vc = NULL; in fb_flashcursor() local
381 vc = vc_cons[ops->currcon].d; in fb_flashcursor()
383 if (!vc || !con_is_visible(vc) || in fb_flashcursor()
384 registered_fb[con2fb_map[vc->vc_num]] != info || in fb_flashcursor()
385 vc->vc_deccm != 1) { in fb_flashcursor()
390 c = scr_readw((u16 *) vc->vc_pos); in fb_flashcursor()
393 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), in fb_flashcursor()
394 get_color(vc, info, c, 0)); in fb_flashcursor()
555 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
561 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
566 int cnt, erase = vc->vc_video_erase_char, step; in fbcon_prepare_logo()
582 logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height); in fbcon_prepare_logo()
583 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
584 vc->vc_size_row * rows); in fbcon_prepare_logo()
587 if (scr_readw(r) != vc->vc_video_erase_char) in fbcon_prepare_logo()
604 scr_memcpyw(r + step, r, vc->vc_size_row); in fbcon_prepare_logo()
609 if (vc->vc_y + logo_lines >= rows) in fbcon_prepare_logo()
610 lines = rows - vc->vc_y - 1; in fbcon_prepare_logo()
613 vc->vc_y += lines; in fbcon_prepare_logo()
614 vc->vc_pos += lines * vc->vc_size_row; in fbcon_prepare_logo()
617 scr_memsetw((unsigned short *) vc->vc_origin, in fbcon_prepare_logo()
619 vc->vc_size_row * logo_lines); in fbcon_prepare_logo()
621 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_prepare_logo()
622 fbcon_clear_margins(vc, 0); in fbcon_prepare_logo()
623 update_screen(vc); in fbcon_prepare_logo()
627 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
628 vc->vc_size_row * in fbcon_prepare_logo()
631 vc->vc_y += logo_lines; in fbcon_prepare_logo()
632 vc->vc_pos += logo_lines * vc->vc_size_row; in fbcon_prepare_logo()
636 if (logo_lines > vc->vc_bottom) { in fbcon_prepare_logo()
642 vc->vc_top = logo_lines; in fbcon_prepare_logo()
648 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
652 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
655 fbcon_set_tileops(vc, info); in set_blitting_type()
673 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
678 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
691 static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, in con2fb_acquire_newinfo() argument
714 if (vc) in con2fb_acquire_newinfo()
715 set_blitting_type(vc, info); in con2fb_acquire_newinfo()
726 static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, in con2fb_release_oldinfo() argument
772 static void con2fb_init_display(struct vc_data *vc, struct fb_info *info, in con2fb_init_display() argument
819 struct vc_data *vc = vc_cons[unit].d; in set_con2fb_map() local
843 err = con2fb_acquire_newinfo(vc, info, unit, oldidx); in set_con2fb_map()
851 err = con2fb_release_oldinfo(vc, oldinfo, info, unit, oldidx, in set_con2fb_map()
861 con2fb_init_display(vc, info, unit, show_logo); in set_con2fb_map()
921 struct vc_data *vc = vc_cons[fg_console].d; in fbcon_startup() local
962 set_blitting_type(vc, info); in fbcon_startup()
990 if (!p->fontdata && !vc->vc_font.data) { in fbcon_startup()
996 vc->vc_font.width = font->width; in fbcon_startup()
997 vc->vc_font.height = font->height; in fbcon_startup()
998 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_startup()
999 vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ in fbcon_startup()
1001 p->fontdata = vc->vc_font.data; in fbcon_startup()
1006 cols /= vc->vc_font.width; in fbcon_startup()
1007 rows /= vc->vc_font.height; in fbcon_startup()
1008 vc_resize(vc, cols, rows); in fbcon_startup()
1021 static void fbcon_init(struct vc_data *vc, int init) in fbcon_init() argument
1023 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_init()
1025 struct vc_data **default_mode = vc->vc_display_fg; in fbcon_init()
1027 struct display *t, *p = &fb_display[vc->vc_num]; in fbcon_init()
1036 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || in fbcon_init()
1044 con2fb_acquire_newinfo(vc, info, vc->vc_num, -1); in fbcon_init()
1053 vc->vc_font.data = (void *)(p->fontdata = in fbcon_init()
1055 vc->vc_font.width = fvc->vc_font.width; in fbcon_init()
1056 vc->vc_font.height = fvc->vc_font.height; in fbcon_init()
1069 vc->vc_font.width = font->width; in fbcon_init()
1070 vc->vc_font.height = font->height; in fbcon_init()
1071 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_init()
1072 vc->vc_font.charcount = 256; /* FIXME Need to in fbcon_init()
1080 vc->vc_panic_force_write = !!(info->flags & FBINFO_CAN_FORCE_OUTPUT); in fbcon_init()
1081 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_init()
1082 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_init()
1084 vc->vc_hi_font_mask = 0; in fbcon_init()
1086 vc->vc_hi_font_mask = 0x100; in fbcon_init()
1087 if (vc->vc_can_do_color) in fbcon_init()
1088 vc->vc_complement_mask <<= 1; in fbcon_init()
1093 if (!*vc->vc_uni_pagedir_loc) in fbcon_init()
1094 con_copy_unimap(vc, svc); in fbcon_init()
1097 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_init()
1099 set_blitting_type(vc, info); in fbcon_init()
1101 cols = vc->vc_cols; in fbcon_init()
1102 rows = vc->vc_rows; in fbcon_init()
1105 new_cols /= vc->vc_font.width; in fbcon_init()
1106 new_rows /= vc->vc_font.height; in fbcon_init()
1115 if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { in fbcon_init()
1143 vc->vc_cols = new_cols; in fbcon_init()
1144 vc->vc_rows = new_rows; in fbcon_init()
1146 vc_resize(vc, new_cols, new_rows); in fbcon_init()
1149 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); in fbcon_init()
1151 if (vc == svc && softback_buf) in fbcon_init()
1152 fbcon_update_softback(vc); in fbcon_init()
1154 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_init()
1156 set_blitting_type(vc, info); in fbcon_init()
1170 static void set_vc_hi_font(struct vc_data *vc, bool set);
1172 static void fbcon_deinit(struct vc_data *vc) in fbcon_deinit() argument
1174 struct display *p = &fb_display[vc->vc_num]; in fbcon_deinit()
1180 idx = con2fb_map[vc->vc_num]; in fbcon_deinit()
1197 if (con_is_visible(vc)) in fbcon_deinit()
1205 vc->vc_font.data = NULL; in fbcon_deinit()
1207 if (vc->vc_hi_font_mask) in fbcon_deinit()
1208 set_vc_hi_font(vc, false); in fbcon_deinit()
1241 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, in fbcon_clear() argument
1244 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear()
1247 struct display *p = &fb_display[vc->vc_num]; in fbcon_clear()
1250 if (fbcon_is_inactive(vc, info)) in fbcon_clear()
1256 if (sy < vc->vc_top && vc->vc_top == logo_lines) { in fbcon_clear()
1257 vc->vc_top = 0; in fbcon_clear()
1264 fbcon_clear_margins(vc, 0); in fbcon_clear()
1272 ops->clear(vc, info, real_y(p, sy), sx, b, width); in fbcon_clear()
1273 ops->clear(vc, info, real_y(p, sy + b), sx, height - b, in fbcon_clear()
1276 ops->clear(vc, info, real_y(p, sy), sx, height, width); in fbcon_clear()
1279 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, in fbcon_putcs() argument
1282 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_putcs()
1283 struct display *p = &fb_display[vc->vc_num]; in fbcon_putcs()
1286 if (!fbcon_is_inactive(vc, info)) in fbcon_putcs()
1287 ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, in fbcon_putcs()
1288 get_color(vc, info, scr_readw(s), 1), in fbcon_putcs()
1289 get_color(vc, info, scr_readw(s), 0)); in fbcon_putcs()
1292 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) in fbcon_putc() argument
1297 fbcon_putcs(vc, &chr, 1, ypos, xpos); in fbcon_putc()
1300 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) in fbcon_clear_margins() argument
1302 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear_margins()
1305 if (!fbcon_is_inactive(vc, info)) in fbcon_clear_margins()
1306 ops->clear_margins(vc, info, bottom_only); in fbcon_clear_margins()
1309 static void fbcon_cursor(struct vc_data *vc, int mode) in fbcon_cursor() argument
1311 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_cursor()
1314 int c = scr_readw((u16 *) vc->vc_pos); in fbcon_cursor()
1316 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_cursor()
1318 if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) in fbcon_cursor()
1321 if (vc->vc_cursor_type & 0x10) in fbcon_cursor()
1332 fbcon_set_origin(vc); in fbcon_cursor()
1336 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), in fbcon_cursor()
1337 get_color(vc, info, c, 0)); in fbcon_cursor()
1348 struct vc_data **default_mode, *vc; in fbcon_set_disp() local
1358 vc = vc_cons[unit].d; in fbcon_set_disp()
1360 if (!vc) in fbcon_set_disp()
1363 default_mode = vc->vc_display_fg; in fbcon_set_disp()
1367 if (!vc->vc_font.data) { in fbcon_set_disp()
1368 vc->vc_font.data = (void *)(p->fontdata = t->fontdata); in fbcon_set_disp()
1369 vc->vc_font.width = (*default_mode)->vc_font.width; in fbcon_set_disp()
1370 vc->vc_font.height = (*default_mode)->vc_font.height; in fbcon_set_disp()
1384 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_set_disp()
1385 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_set_disp()
1387 vc->vc_hi_font_mask = 0; in fbcon_set_disp()
1389 vc->vc_hi_font_mask = 0x100; in fbcon_set_disp()
1390 if (vc->vc_can_do_color) in fbcon_set_disp()
1391 vc->vc_complement_mask <<= 1; in fbcon_set_disp()
1396 if (!*vc->vc_uni_pagedir_loc) in fbcon_set_disp()
1397 con_copy_unimap(vc, svc); in fbcon_set_disp()
1401 cols /= vc->vc_font.width; in fbcon_set_disp()
1402 rows /= vc->vc_font.height; in fbcon_set_disp()
1403 vc_resize(vc, cols, rows); in fbcon_set_disp()
1405 if (con_is_visible(vc)) { in fbcon_set_disp()
1406 update_screen(vc); in fbcon_set_disp()
1408 fbcon_update_softback(vc); in fbcon_set_disp()
1412 static __inline__ void ywrap_up(struct vc_data *vc, int count) in ywrap_up() argument
1414 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_up()
1416 struct display *p = &fb_display[vc->vc_num]; in ywrap_up()
1422 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_up()
1431 static __inline__ void ywrap_down(struct vc_data *vc, int count) in ywrap_down() argument
1433 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_down()
1435 struct display *p = &fb_display[vc->vc_num]; in ywrap_down()
1441 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_down()
1450 static __inline__ void ypan_up(struct vc_data *vc, int count) in ypan_up() argument
1452 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up()
1453 struct display *p = &fb_display[vc->vc_num]; in ypan_up()
1457 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up()
1458 ops->bmove(vc, info, p->vrows - vc->vc_rows, in ypan_up()
1459 0, 0, 0, vc->vc_rows, vc->vc_cols); in ypan_up()
1460 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up()
1464 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up()
1467 fbcon_clear_margins(vc, 1); in ypan_up()
1474 static __inline__ void ypan_up_redraw(struct vc_data *vc, int t, int count) in ypan_up_redraw() argument
1476 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up_redraw()
1478 struct display *p = &fb_display[vc->vc_num]; in ypan_up_redraw()
1482 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up_redraw()
1483 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up_redraw()
1484 fbcon_redraw_move(vc, p, t + count, vc->vc_rows - count, t); in ypan_up_redraw()
1488 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up_redraw()
1491 fbcon_clear_margins(vc, 1); in ypan_up_redraw()
1498 static __inline__ void ypan_down(struct vc_data *vc, int count) in ypan_down() argument
1500 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down()
1501 struct display *p = &fb_display[vc->vc_num]; in ypan_down()
1506 ops->bmove(vc, info, 0, 0, p->vrows - vc->vc_rows, in ypan_down()
1507 0, vc->vc_rows, vc->vc_cols); in ypan_down()
1508 p->yscroll += p->vrows - vc->vc_rows; in ypan_down()
1512 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down()
1515 fbcon_clear_margins(vc, 1); in ypan_down()
1522 static __inline__ void ypan_down_redraw(struct vc_data *vc, int t, int count) in ypan_down_redraw() argument
1524 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down_redraw()
1526 struct display *p = &fb_display[vc->vc_num]; in ypan_down_redraw()
1531 p->yscroll += p->vrows - vc->vc_rows; in ypan_down_redraw()
1532 fbcon_redraw_move(vc, p, t, vc->vc_rows - count, t + count); in ypan_down_redraw()
1536 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down_redraw()
1539 fbcon_clear_margins(vc, 1); in ypan_down_redraw()
1546 static void fbcon_redraw_softback(struct vc_data *vc, struct display *p, in fbcon_redraw_softback() argument
1549 int count = vc->vc_rows; in fbcon_redraw_softback()
1556 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1557 n = softback_curr + delta * vc->vc_size_row; in fbcon_redraw_softback()
1564 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1570 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1590 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1605 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1613 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1626 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw_softback()
1631 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1635 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1639 static void fbcon_redraw_move(struct vc_data *vc, struct display *p, in fbcon_redraw_move() argument
1643 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_move()
1657 fbcon_putcs(vc, start, s - start, in fbcon_redraw_move()
1667 fbcon_putcs(vc, start, s - start, dy, x); in fbcon_redraw_move()
1673 static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info, in fbcon_redraw_blit() argument
1676 int offset = ycount * vc->vc_cols; in fbcon_redraw_blit()
1678 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_blit()
1693 ops->bmove(vc, info, line + ycount, x, in fbcon_redraw_blit()
1709 ops->bmove(vc, info, line + ycount, x, line, x, 1, in fbcon_redraw_blit()
1717 s -= vc->vc_size_row; in fbcon_redraw_blit()
1718 d -= vc->vc_size_row; in fbcon_redraw_blit()
1723 static void fbcon_redraw(struct vc_data *vc, struct display *p, in fbcon_redraw() argument
1727 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw()
1742 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1750 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1765 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw()
1772 s -= vc->vc_size_row; in fbcon_redraw()
1773 d -= vc->vc_size_row; in fbcon_redraw()
1778 static inline void fbcon_softback_note(struct vc_data *vc, int t, in fbcon_softback_note() argument
1783 if (vc->vc_num != fg_console) in fbcon_softback_note()
1785 p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); in fbcon_softback_note()
1788 scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); in fbcon_softback_note()
1791 softback_in += vc->vc_size_row; in fbcon_softback_note()
1795 softback_top += vc->vc_size_row; in fbcon_softback_note()
1803 static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, in fbcon_scroll() argument
1806 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_scroll()
1807 struct display *p = &fb_display[vc->vc_num]; in fbcon_scroll()
1810 if (fbcon_is_inactive(vc, info)) in fbcon_scroll()
1813 fbcon_cursor(vc, CM_ERASE); in fbcon_scroll()
1823 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1824 count = vc->vc_rows; in fbcon_scroll()
1826 fbcon_softback_note(vc, t, count); in fbcon_scroll()
1831 fbcon_redraw_blit(vc, info, p, t, b - t - count, in fbcon_scroll()
1833 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1834 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1835 vc->vc_size_row * in fbcon_scroll()
1837 vc->vc_video_erase_char, in fbcon_scroll()
1838 vc->vc_size_row * count); in fbcon_scroll()
1843 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1845 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1846 vc->vc_cols); in fbcon_scroll()
1847 ywrap_up(vc, count); in fbcon_scroll()
1848 if (vc->vc_rows - b > 0) in fbcon_scroll()
1849 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1850 vc->vc_rows - b, in fbcon_scroll()
1851 vc->vc_cols); in fbcon_scroll()
1853 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1854 b - t - count, vc->vc_cols); in fbcon_scroll()
1857 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1862 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1863 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1866 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1868 fbcon_redraw_move(vc, p, 0, t, count); in fbcon_scroll()
1869 ypan_up_redraw(vc, t, count); in fbcon_scroll()
1870 if (vc->vc_rows - b > 0) in fbcon_scroll()
1871 fbcon_redraw_move(vc, p, b, in fbcon_scroll()
1872 vc->vc_rows - b, b); in fbcon_scroll()
1874 fbcon_redraw_move(vc, p, t + count, b - t - count, t); in fbcon_scroll()
1875 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1880 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1881 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1884 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1886 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1887 vc->vc_cols); in fbcon_scroll()
1888 ypan_up(vc, count); in fbcon_scroll()
1889 if (vc->vc_rows - b > 0) in fbcon_scroll()
1890 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1891 vc->vc_rows - b, in fbcon_scroll()
1892 vc->vc_cols); in fbcon_scroll()
1894 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1895 b - t - count, vc->vc_cols); in fbcon_scroll()
1898 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1903 fbcon_redraw(vc, p, t, b - t - count, in fbcon_scroll()
1904 count * vc->vc_cols); in fbcon_scroll()
1905 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1906 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1907 vc->vc_size_row * in fbcon_scroll()
1909 vc->vc_video_erase_char, in fbcon_scroll()
1910 vc->vc_size_row * count); in fbcon_scroll()
1916 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1917 count = vc->vc_rows; in fbcon_scroll()
1922 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, in fbcon_scroll()
1924 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1925 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1926 vc->vc_size_row * in fbcon_scroll()
1928 vc->vc_video_erase_char, in fbcon_scroll()
1929 vc->vc_size_row * count); in fbcon_scroll()
1934 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1935 if (vc->vc_rows - b > 0) in fbcon_scroll()
1936 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1937 vc->vc_rows - b, in fbcon_scroll()
1938 vc->vc_cols); in fbcon_scroll()
1939 ywrap_down(vc, count); in fbcon_scroll()
1941 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1942 vc->vc_cols); in fbcon_scroll()
1944 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1945 b - t - count, vc->vc_cols); in fbcon_scroll()
1948 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1952 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1953 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1956 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1957 if (vc->vc_rows - b > 0) in fbcon_scroll()
1958 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1959 vc->vc_rows - b, in fbcon_scroll()
1960 vc->vc_cols); in fbcon_scroll()
1961 ypan_down(vc, count); in fbcon_scroll()
1963 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1964 vc->vc_cols); in fbcon_scroll()
1966 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1967 b - t - count, vc->vc_cols); in fbcon_scroll()
1970 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1974 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1975 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1978 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1979 if (vc->vc_rows - b > 0) in fbcon_scroll()
1980 fbcon_redraw_move(vc, p, b, vc->vc_rows - b, in fbcon_scroll()
1982 ypan_down_redraw(vc, t, count); in fbcon_scroll()
1984 fbcon_redraw_move(vc, p, count, t, 0); in fbcon_scroll()
1986 fbcon_redraw_move(vc, p, t, b - t - count, t + count); in fbcon_scroll()
1987 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1992 fbcon_redraw(vc, p, b - 1, b - t - count, in fbcon_scroll()
1993 -count * vc->vc_cols); in fbcon_scroll()
1994 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1995 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1996 vc->vc_size_row * in fbcon_scroll()
1998 vc->vc_video_erase_char, in fbcon_scroll()
1999 vc->vc_size_row * count); in fbcon_scroll()
2007 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, in fbcon_bmove() argument
2010 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove()
2011 struct display *p = &fb_display[vc->vc_num]; in fbcon_bmove()
2013 if (fbcon_is_inactive(vc, info)) in fbcon_bmove()
2026 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, height, width, in fbcon_bmove()
2030 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx, in fbcon_bmove_rec() argument
2033 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove_rec()
2040 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2042 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2045 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2047 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2056 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2058 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2061 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2063 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2068 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, in fbcon_bmove_rec()
2074 struct vc_data *vc) in updatescrollmode() argument
2077 int fh = vc->vc_font.height; in updatescrollmode()
2087 divides(ypan, vc->vc_font.height) && vyres > yres; in updatescrollmode()
2089 divides(ywrap, vc->vc_font.height) && in updatescrollmode()
2090 divides(vc->vc_font.height, vyres) && in updatescrollmode()
2091 divides(vc->vc_font.height, yres); in updatescrollmode()
2099 if (yres > (fh * (vc->vc_rows + 1))) in updatescrollmode()
2100 p->vrows -= (yres - (fh * vc->vc_rows)) / fh; in updatescrollmode()
2119 static int fbcon_resize(struct vc_data *vc, unsigned int width, in fbcon_resize() argument
2122 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_resize()
2124 struct display *p = &fb_display[vc->vc_num]; in fbcon_resize()
2130 virt_fw = FBCON_SWAP(ops->rotate, vc->vc_font.width, in fbcon_resize()
2131 vc->vc_font.height); in fbcon_resize()
2132 virt_fh = FBCON_SWAP(ops->rotate, vc->vc_font.height, in fbcon_resize()
2133 vc->vc_font.width); in fbcon_resize()
2153 if (con_is_visible(vc)) { in fbcon_resize()
2161 updatescrollmode(p, info, vc); in fbcon_resize()
2165 static int fbcon_switch(struct vc_data *vc) in fbcon_switch() argument
2169 struct display *p = &fb_display[vc->vc_num]; in fbcon_switch()
2173 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_switch()
2178 fbcon_set_origin(vc); in fbcon_switch()
2181 fbcon_update_softback(vc); in fbcon_switch()
2208 o->currcon = vc->vc_num; in fbcon_switch()
2239 if (fbcon_is_inactive(vc, info) || in fbcon_switch()
2245 set_blitting_type(vc, info); in fbcon_switch()
2248 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_switch()
2250 set_blitting_type(vc, info); in fbcon_switch()
2253 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_switch()
2254 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_switch()
2257 charcnt = FNTCHARCNT(vc->vc_font.data); in fbcon_switch()
2260 vc->vc_complement_mask <<= 1; in fbcon_switch()
2262 updatescrollmode(p, info, vc); in fbcon_switch()
2266 scrollback_phys_max = p->vrows - vc->vc_rows; in fbcon_switch()
2270 scrollback_phys_max = p->vrows - 2 * vc->vc_rows; in fbcon_switch()
2282 if (!fbcon_is_inactive(vc, info)) { in fbcon_switch()
2287 fbcon_set_palette(vc, color_table); in fbcon_switch()
2288 fbcon_clear_margins(vc, 0); in fbcon_switch()
2295 update_region(vc, in fbcon_switch()
2296 vc->vc_origin + vc->vc_size_row * vc->vc_top, in fbcon_switch()
2297 vc->vc_size_row * (vc->vc_bottom - in fbcon_switch()
2298 vc->vc_top) / 2); in fbcon_switch()
2304 static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, in fbcon_generic_blank() argument
2310 unsigned short charmask = vc->vc_hi_font_mask ? in fbcon_generic_blank()
2314 oldc = vc->vc_video_erase_char; in fbcon_generic_blank()
2315 vc->vc_video_erase_char &= charmask; in fbcon_generic_blank()
2316 fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); in fbcon_generic_blank()
2317 vc->vc_video_erase_char = oldc; in fbcon_generic_blank()
2329 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) in fbcon_blank() argument
2331 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_blank()
2347 if (!fbcon_is_inactive(vc, info)) { in fbcon_blank()
2350 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); in fbcon_blank()
2355 fbcon_generic_blank(vc, info, blank); in fbcon_blank()
2359 update_screen(vc); in fbcon_blank()
2362 if (mode_switch || fbcon_is_inactive(vc, info) || in fbcon_blank()
2371 static int fbcon_debug_enter(struct vc_data *vc) in fbcon_debug_enter() argument
2373 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_enter()
2380 fbcon_set_palette(vc, color_table); in fbcon_debug_enter()
2384 static int fbcon_debug_leave(struct vc_data *vc) in fbcon_debug_leave() argument
2386 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_leave()
2395 static int fbcon_get_font(struct vc_data *vc, struct console_font *font) in fbcon_get_font() argument
2397 u8 *fontdata = vc->vc_font.data; in fbcon_get_font()
2401 font->width = vc->vc_font.width; in fbcon_get_font()
2402 font->height = vc->vc_font.height; in fbcon_get_font()
2403 font->charcount = vc->vc_hi_font_mask ? 512 : 256; in fbcon_get_font()
2408 j = vc->vc_font.height; in fbcon_get_font()
2416 j = vc->vc_font.height * 2; in fbcon_get_font()
2425 for (j = 0; j < vc->vc_font.height; j++) { in fbcon_get_font()
2435 j = vc->vc_font.height * 4; in fbcon_get_font()
2447 static void set_vc_hi_font(struct vc_data *vc, bool set) in set_vc_hi_font() argument
2450 vc->vc_hi_font_mask = 0; in set_vc_hi_font()
2451 if (vc->vc_can_do_color) { in set_vc_hi_font()
2452 vc->vc_complement_mask >>= 1; in set_vc_hi_font()
2453 vc->vc_s_complement_mask >>= 1; in set_vc_hi_font()
2457 if (vc->vc_can_do_color) { in set_vc_hi_font()
2459 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2460 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2467 c = vc->vc_video_erase_char; in set_vc_hi_font()
2468 vc->vc_video_erase_char = in set_vc_hi_font()
2470 vc->vc_attr >>= 1; in set_vc_hi_font()
2473 vc->vc_hi_font_mask = 0x100; in set_vc_hi_font()
2474 if (vc->vc_can_do_color) { in set_vc_hi_font()
2475 vc->vc_complement_mask <<= 1; in set_vc_hi_font()
2476 vc->vc_s_complement_mask <<= 1; in set_vc_hi_font()
2482 (unsigned short *) vc->vc_origin; in set_vc_hi_font()
2483 int count = vc->vc_screenbuf_size / 2; in set_vc_hi_font()
2488 if (vc->vc_can_do_color) in set_vc_hi_font()
2496 c = vc->vc_video_erase_char; in set_vc_hi_font()
2497 if (vc->vc_can_do_color) { in set_vc_hi_font()
2498 vc->vc_video_erase_char = in set_vc_hi_font()
2500 vc->vc_attr <<= 1; in set_vc_hi_font()
2502 vc->vc_video_erase_char = c & ~0x100; in set_vc_hi_font()
2507 static int fbcon_do_set_font(struct vc_data *vc, int w, int h, in fbcon_do_set_font() argument
2510 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_do_set_font()
2512 struct display *p = &fb_display[vc->vc_num]; in fbcon_do_set_font()
2517 if (con_is_visible(vc) && softback_lines) in fbcon_do_set_font()
2518 fbcon_set_origin(vc); in fbcon_do_set_font()
2520 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); in fbcon_do_set_font()
2522 old_data = vc->vc_font.data; in fbcon_do_set_font()
2527 vc->vc_font.data = (void *)(p->fontdata = data); in fbcon_do_set_font()
2530 vc->vc_font.width = w; in fbcon_do_set_font()
2531 vc->vc_font.height = h; in fbcon_do_set_font()
2532 if (vc->vc_hi_font_mask && cnt == 256) in fbcon_do_set_font()
2533 set_vc_hi_font(vc, false); in fbcon_do_set_font()
2534 else if (!vc->vc_hi_font_mask && cnt == 512) in fbcon_do_set_font()
2535 set_vc_hi_font(vc, true); in fbcon_do_set_font()
2544 vc_resize(vc, cols, rows); in fbcon_do_set_font()
2545 if (con_is_visible(vc) && softback_buf) in fbcon_do_set_font()
2546 fbcon_update_softback(vc); in fbcon_do_set_font()
2547 } else if (con_is_visible(vc) in fbcon_do_set_font()
2548 && vc->vc_mode == KD_TEXT) { in fbcon_do_set_font()
2549 fbcon_clear_margins(vc, 0); in fbcon_do_set_font()
2550 update_screen(vc); in fbcon_do_set_font()
2558 static int fbcon_copy_font(struct vc_data *vc, int con) in fbcon_copy_font() argument
2561 struct console_font *f = &vc->vc_font; in fbcon_copy_font()
2565 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); in fbcon_copy_font()
2580 static int fbcon_set_font(struct vc_data *vc, struct console_font *font, unsigned flags) in fbcon_set_font() argument
2582 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_font()
2640 return fbcon_do_set_font(vc, font->width, font->height, new_data, 1); in fbcon_set_font()
2643 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name) in fbcon_set_def_font() argument
2645 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_def_font()
2656 return fbcon_do_set_font(vc, f->width, f->height, f->data, 0); in fbcon_set_def_font()
2667 static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table) in fbcon_set_palette() argument
2669 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_palette()
2673 if (fbcon_is_inactive(vc, info)) in fbcon_set_palette()
2676 if (!con_is_visible(vc)) in fbcon_set_palette()
2683 val = vc->vc_palette[j++]; in fbcon_set_palette()
2685 val = vc->vc_palette[j++]; in fbcon_set_palette()
2687 val = vc->vc_palette[j++]; in fbcon_set_palette()
2702 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) in fbcon_screen_pos() argument
2707 if (vc->vc_num != fg_console || !softback_lines) in fbcon_screen_pos()
2708 return (u16 *) (vc->vc_origin + offset); in fbcon_screen_pos()
2709 line = offset / vc->vc_size_row; in fbcon_screen_pos()
2711 return (u16 *) (vc->vc_origin + offset - in fbcon_screen_pos()
2712 softback_lines * vc->vc_size_row); in fbcon_screen_pos()
2719 static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, in fbcon_getxy() argument
2725 if (pos >= vc->vc_origin && pos < vc->vc_scr_end) { in fbcon_getxy()
2726 unsigned long offset = (pos - vc->vc_origin) / 2; in fbcon_getxy()
2728 x = offset % vc->vc_cols; in fbcon_getxy()
2729 y = offset / vc->vc_cols; in fbcon_getxy()
2730 if (vc->vc_num == fg_console) in fbcon_getxy()
2732 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2733 } else if (vc->vc_num == fg_console && softback_lines) { in fbcon_getxy()
2739 x = offset % vc->vc_cols; in fbcon_getxy()
2740 y = offset / vc->vc_cols; in fbcon_getxy()
2741 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2745 ret = vc->vc_origin; in fbcon_getxy()
2749 ret = vc->vc_origin; in fbcon_getxy()
2760 static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt) in fbcon_invert_region() argument
2764 if (!vc->vc_can_do_color) in fbcon_invert_region()
2766 else if (vc->vc_hi_font_mask == 0x100) in fbcon_invert_region()
2776 p = (u16 *) vc->vc_origin; in fbcon_invert_region()
2780 static void fbcon_scrolldelta(struct vc_data *vc, int lines) in fbcon_scrolldelta() argument
2788 if (vc->vc_num != fg_console) in fbcon_scrolldelta()
2790 if (vc->vc_mode != KD_TEXT || !lines) in fbcon_scrolldelta()
2798 if (logo_shown == vc->vc_num) { in fbcon_scrolldelta()
2803 q = vc->vc_origin + in fbcon_scrolldelta()
2804 logo_lines * vc->vc_size_row; in fbcon_scrolldelta()
2810 p -= vc->vc_size_row; in fbcon_scrolldelta()
2811 q -= vc->vc_size_row; in fbcon_scrolldelta()
2813 vc->vc_size_row); in fbcon_scrolldelta()
2816 update_region(vc, vc->vc_origin, in fbcon_scrolldelta()
2817 logo_lines * vc->vc_cols); in fbcon_scrolldelta()
2821 fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); in fbcon_scrolldelta()
2822 fbcon_redraw_softback(vc, disp, lines); in fbcon_scrolldelta()
2823 fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); in fbcon_scrolldelta()
2839 if (fbcon_is_inactive(vc, info)) in fbcon_scrolldelta()
2842 fbcon_cursor(vc, CM_ERASE); in fbcon_scrolldelta()
2852 limit -= vc->vc_rows; in fbcon_scrolldelta()
2862 ops->var.yoffset = offset * vc->vc_font.height; in fbcon_scrolldelta()
2866 fbcon_cursor(vc, CM_DRAW); in fbcon_scrolldelta()
2869 static int fbcon_set_origin(struct vc_data *vc) in fbcon_set_origin() argument
2872 fbcon_scrolldelta(vc, softback_lines); in fbcon_set_origin()
2878 struct vc_data *vc = NULL; in fbcon_suspended() local
2883 vc = vc_cons[ops->currcon].d; in fbcon_suspended()
2886 fbcon_cursor(vc, CM_ERASE); in fbcon_suspended()
2891 struct vc_data *vc; in fbcon_resumed() local
2896 vc = vc_cons[ops->currcon].d; in fbcon_resumed()
2898 update_screen(vc); in fbcon_resumed()
2904 struct vc_data *vc; in fbcon_modechanged() local
2910 vc = vc_cons[ops->currcon].d; in fbcon_modechanged()
2911 if (vc->vc_mode != KD_TEXT || in fbcon_modechanged()
2915 p = &fb_display[vc->vc_num]; in fbcon_modechanged()
2916 set_blitting_type(vc, info); in fbcon_modechanged()
2918 if (con_is_visible(vc)) { in fbcon_modechanged()
2922 cols /= vc->vc_font.width; in fbcon_modechanged()
2923 rows /= vc->vc_font.height; in fbcon_modechanged()
2924 vc_resize(vc, cols, rows); in fbcon_modechanged()
2925 updatescrollmode(p, info, vc); in fbcon_modechanged()
2929 if (!fbcon_is_inactive(vc, info)) { in fbcon_modechanged()
2934 fbcon_set_palette(vc, color_table); in fbcon_modechanged()
2935 update_screen(vc); in fbcon_modechanged()
2937 fbcon_update_softback(vc); in fbcon_modechanged()
2944 struct vc_data *vc; in fbcon_set_all_vcs() local
2952 vc = vc_cons[i].d; in fbcon_set_all_vcs()
2953 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_set_all_vcs()
2957 if (con_is_visible(vc)) { in fbcon_set_all_vcs()
2962 p = &fb_display[vc->vc_num]; in fbcon_set_all_vcs()
2963 set_blitting_type(vc, info); in fbcon_set_all_vcs()
2967 cols /= vc->vc_font.width; in fbcon_set_all_vcs()
2968 rows /= vc->vc_font.height; in fbcon_set_all_vcs()
2969 vc_resize(vc, cols, rows); in fbcon_set_all_vcs()
3186 struct vc_data *vc; in fbcon_fb_blanked() local
3191 vc = vc_cons[ops->currcon].d; in fbcon_fb_blanked()
3192 if (vc->vc_mode != KD_TEXT || in fbcon_fb_blanked()
3196 if (con_is_visible(vc)) { in fbcon_fb_blanked()
3208 struct vc_data *vc; in fbcon_new_modelist() local
3217 vc = vc_cons[i].d; in fbcon_new_modelist()
3222 fbcon_set_disp(info, &var, vc->vc_num); in fbcon_new_modelist()
3229 struct vc_data *vc; in fbcon_get_requirement() local
3236 vc = vc_cons[i].d; in fbcon_get_requirement()
3237 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3240 caps->x |= 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3241 caps->y |= 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()
3249 vc = vc_cons[fg_console].d; in fbcon_get_requirement()
3251 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3254 caps->x = 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3255 caps->y = 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()