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 int fbcon_set_palette(struct vc_data *vc, unsigned char *table);
174 static int fbcon_scrolldelta(struct vc_data *vc, int lines);
179 static __inline__ void ywrap_up(struct vc_data *vc, int count);
180 static __inline__ void ywrap_down(struct vc_data *vc, int count);
181 static __inline__ void ypan_up(struct vc_data *vc, int count);
182 static __inline__ void ypan_down(struct vc_data *vc, int count);
183 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx,
187 static void fbcon_redraw_move(struct vc_data *vc, struct display *p,
232 struct vc_data *vc; in fbcon_rotate_all() local
240 vc = vc_cons[i].d; in fbcon_rotate_all()
241 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_rotate_all()
245 p = &fb_display[vc->vc_num]; in fbcon_rotate_all()
277 static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info) in fbcon_is_inactive() argument
282 vc->vc_mode != KD_TEXT || ops->graphics) && in fbcon_is_inactive()
283 !vt_force_oops_output(vc); in fbcon_is_inactive()
286 static int get_color(struct vc_data *vc, struct fb_info *info, in get_color() argument
293 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in get_color()
295 c = vc->vc_video_erase_char & charmask; in get_color()
299 color = (is_fg) ? attr_fgcol((vc->vc_hi_font_mask) ? 9 : 8, c) in get_color()
300 : attr_bgcol((vc->vc_hi_font_mask) ? 13 : 12, c); in get_color()
353 static void fbcon_update_softback(struct vc_data *vc) in fbcon_update_softback() argument
355 int l = fbcon_softback_size / vc->vc_size_row; in fbcon_update_softback()
358 softback_end = softback_buf + l * vc->vc_size_row; in fbcon_update_softback()
369 struct vc_data *vc = NULL; in fb_flashcursor() local
382 vc = vc_cons[ops->currcon].d; in fb_flashcursor()
384 if (!vc || !CON_IS_VISIBLE(vc) || in fb_flashcursor()
385 registered_fb[con2fb_map[vc->vc_num]] != info || in fb_flashcursor()
386 vc->vc_deccm != 1) { in fb_flashcursor()
391 c = scr_readw((u16 *) vc->vc_pos); in fb_flashcursor()
394 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), in fb_flashcursor()
395 get_color(vc, info, c, 0)); in fb_flashcursor()
556 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
562 static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, in fbcon_prepare_logo() argument
567 int cnt, erase = vc->vc_video_erase_char, step; in fbcon_prepare_logo()
583 logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height); in fbcon_prepare_logo()
584 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
585 vc->vc_size_row * rows); in fbcon_prepare_logo()
588 if (scr_readw(r) != vc->vc_video_erase_char) in fbcon_prepare_logo()
605 scr_memcpyw(r + step, r, vc->vc_size_row); in fbcon_prepare_logo()
610 if (vc->vc_y + logo_lines >= rows) in fbcon_prepare_logo()
611 lines = rows - vc->vc_y - 1; in fbcon_prepare_logo()
614 vc->vc_y += lines; in fbcon_prepare_logo()
615 vc->vc_pos += lines * vc->vc_size_row; in fbcon_prepare_logo()
618 scr_memsetw((unsigned short *) vc->vc_origin, in fbcon_prepare_logo()
620 vc->vc_size_row * logo_lines); in fbcon_prepare_logo()
622 if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) { in fbcon_prepare_logo()
623 fbcon_clear_margins(vc, 0); in fbcon_prepare_logo()
624 update_screen(vc); in fbcon_prepare_logo()
628 q = (unsigned short *) (vc->vc_origin + in fbcon_prepare_logo()
629 vc->vc_size_row * in fbcon_prepare_logo()
632 vc->vc_y += logo_lines; in fbcon_prepare_logo()
633 vc->vc_pos += logo_lines * vc->vc_size_row; in fbcon_prepare_logo()
637 if (logo_lines > vc->vc_bottom) { in fbcon_prepare_logo()
643 vc->vc_top = logo_lines; in fbcon_prepare_logo()
649 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
653 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
656 fbcon_set_tileops(vc, info); in set_blitting_type()
674 static void set_blitting_type(struct vc_data *vc, struct fb_info *info) in set_blitting_type() argument
679 ops->p = &fb_display[vc->vc_num]; in set_blitting_type()
692 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
961 set_blitting_type(vc, info); in fbcon_startup()
989 if (!p->fontdata && !vc->vc_font.data) { in fbcon_startup()
995 vc->vc_font.width = font->width; in fbcon_startup()
996 vc->vc_font.height = font->height; in fbcon_startup()
997 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_startup()
998 vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ in fbcon_startup()
1000 p->fontdata = vc->vc_font.data; in fbcon_startup()
1005 cols /= vc->vc_font.width; in fbcon_startup()
1006 rows /= vc->vc_font.height; in fbcon_startup()
1007 vc_resize(vc, cols, rows); in fbcon_startup()
1020 static void fbcon_init(struct vc_data *vc, int init) in fbcon_init() argument
1022 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_init()
1024 struct vc_data **default_mode = vc->vc_display_fg; in fbcon_init()
1026 struct display *t, *p = &fb_display[vc->vc_num]; in fbcon_init()
1035 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || in fbcon_init()
1043 con2fb_acquire_newinfo(vc, info, vc->vc_num, -1); in fbcon_init()
1052 vc->vc_font.data = (void *)(p->fontdata = in fbcon_init()
1054 vc->vc_font.width = fvc->vc_font.width; in fbcon_init()
1055 vc->vc_font.height = fvc->vc_font.height; in fbcon_init()
1068 vc->vc_font.width = font->width; in fbcon_init()
1069 vc->vc_font.height = font->height; in fbcon_init()
1070 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_init()
1071 vc->vc_font.charcount = 256; /* FIXME Need to in fbcon_init()
1079 vc->vc_panic_force_write = !!(info->flags & FBINFO_CAN_FORCE_OUTPUT); in fbcon_init()
1080 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_init()
1081 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_init()
1083 vc->vc_hi_font_mask = 0; in fbcon_init()
1085 vc->vc_hi_font_mask = 0x100; in fbcon_init()
1086 if (vc->vc_can_do_color) in fbcon_init()
1087 vc->vc_complement_mask <<= 1; in fbcon_init()
1092 if (!*vc->vc_uni_pagedir_loc) in fbcon_init()
1093 con_copy_unimap(vc, svc); in fbcon_init()
1097 set_blitting_type(vc, info); in fbcon_init()
1099 cols = vc->vc_cols; in fbcon_init()
1100 rows = vc->vc_rows; in fbcon_init()
1103 new_cols /= vc->vc_font.width; in fbcon_init()
1104 new_rows /= vc->vc_font.height; in fbcon_init()
1113 if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) { in fbcon_init()
1141 vc->vc_cols = new_cols; in fbcon_init()
1142 vc->vc_rows = new_rows; in fbcon_init()
1144 vc_resize(vc, new_cols, new_rows); in fbcon_init()
1147 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); in fbcon_init()
1149 if (vc == svc && softback_buf) in fbcon_init()
1150 fbcon_update_softback(vc); in fbcon_init()
1152 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_init()
1154 set_blitting_type(vc, info); in fbcon_init()
1168 static void fbcon_deinit(struct vc_data *vc) in fbcon_deinit() argument
1170 struct display *p = &fb_display[vc->vc_num]; in fbcon_deinit()
1176 idx = con2fb_map[vc->vc_num]; in fbcon_deinit()
1193 if (CON_IS_VISIBLE(vc)) in fbcon_deinit()
1201 vc->vc_font.data = NULL; in fbcon_deinit()
1234 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, in fbcon_clear() argument
1237 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear()
1240 struct display *p = &fb_display[vc->vc_num]; in fbcon_clear()
1243 if (fbcon_is_inactive(vc, info)) in fbcon_clear()
1249 if (sy < vc->vc_top && vc->vc_top == logo_lines) { in fbcon_clear()
1250 vc->vc_top = 0; in fbcon_clear()
1257 fbcon_clear_margins(vc, 0); in fbcon_clear()
1265 ops->clear(vc, info, real_y(p, sy), sx, b, width); in fbcon_clear()
1266 ops->clear(vc, info, real_y(p, sy + b), sx, height - b, in fbcon_clear()
1269 ops->clear(vc, info, real_y(p, sy), sx, height, width); in fbcon_clear()
1272 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, in fbcon_putcs() argument
1275 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_putcs()
1276 struct display *p = &fb_display[vc->vc_num]; in fbcon_putcs()
1279 if (!fbcon_is_inactive(vc, info)) in fbcon_putcs()
1280 ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, in fbcon_putcs()
1281 get_color(vc, info, scr_readw(s), 1), in fbcon_putcs()
1282 get_color(vc, info, scr_readw(s), 0)); in fbcon_putcs()
1285 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) in fbcon_putc() argument
1290 fbcon_putcs(vc, &chr, 1, ypos, xpos); in fbcon_putc()
1293 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) in fbcon_clear_margins() argument
1295 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear_margins()
1298 if (!fbcon_is_inactive(vc, info)) in fbcon_clear_margins()
1299 ops->clear_margins(vc, info, bottom_only); in fbcon_clear_margins()
1302 static void fbcon_cursor(struct vc_data *vc, int mode) in fbcon_cursor() argument
1304 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_cursor()
1307 int c = scr_readw((u16 *) vc->vc_pos); in fbcon_cursor()
1309 if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) in fbcon_cursor()
1312 if (vc->vc_cursor_type & 0x10) in fbcon_cursor()
1323 fbcon_set_origin(vc); in fbcon_cursor()
1327 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), in fbcon_cursor()
1328 get_color(vc, info, c, 0)); in fbcon_cursor()
1339 struct vc_data **default_mode, *vc; in fbcon_set_disp() local
1349 vc = vc_cons[unit].d; in fbcon_set_disp()
1351 if (!vc) in fbcon_set_disp()
1354 default_mode = vc->vc_display_fg; in fbcon_set_disp()
1358 if (!vc->vc_font.data) { in fbcon_set_disp()
1359 vc->vc_font.data = (void *)(p->fontdata = t->fontdata); in fbcon_set_disp()
1360 vc->vc_font.width = (*default_mode)->vc_font.width; in fbcon_set_disp()
1361 vc->vc_font.height = (*default_mode)->vc_font.height; in fbcon_set_disp()
1375 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_set_disp()
1376 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_set_disp()
1378 vc->vc_hi_font_mask = 0; in fbcon_set_disp()
1380 vc->vc_hi_font_mask = 0x100; in fbcon_set_disp()
1381 if (vc->vc_can_do_color) in fbcon_set_disp()
1382 vc->vc_complement_mask <<= 1; in fbcon_set_disp()
1387 if (!*vc->vc_uni_pagedir_loc) in fbcon_set_disp()
1388 con_copy_unimap(vc, svc); in fbcon_set_disp()
1392 cols /= vc->vc_font.width; in fbcon_set_disp()
1393 rows /= vc->vc_font.height; in fbcon_set_disp()
1394 vc_resize(vc, cols, rows); in fbcon_set_disp()
1396 if (CON_IS_VISIBLE(vc)) { in fbcon_set_disp()
1397 update_screen(vc); in fbcon_set_disp()
1399 fbcon_update_softback(vc); in fbcon_set_disp()
1403 static __inline__ void ywrap_up(struct vc_data *vc, int count) in ywrap_up() argument
1405 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_up()
1407 struct display *p = &fb_display[vc->vc_num]; in ywrap_up()
1413 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_up()
1422 static __inline__ void ywrap_down(struct vc_data *vc, int count) in ywrap_down() argument
1424 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_down()
1426 struct display *p = &fb_display[vc->vc_num]; in ywrap_down()
1432 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_down()
1441 static __inline__ void ypan_up(struct vc_data *vc, int count) in ypan_up() argument
1443 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up()
1444 struct display *p = &fb_display[vc->vc_num]; in ypan_up()
1448 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up()
1449 ops->bmove(vc, info, p->vrows - vc->vc_rows, in ypan_up()
1450 0, 0, 0, vc->vc_rows, vc->vc_cols); in ypan_up()
1451 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up()
1455 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up()
1458 fbcon_clear_margins(vc, 1); in ypan_up()
1465 static __inline__ void ypan_up_redraw(struct vc_data *vc, int t, int count) in ypan_up_redraw() argument
1467 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up_redraw()
1469 struct display *p = &fb_display[vc->vc_num]; in ypan_up_redraw()
1473 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up_redraw()
1474 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up_redraw()
1475 fbcon_redraw_move(vc, p, t + count, vc->vc_rows - count, t); in ypan_up_redraw()
1479 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up_redraw()
1482 fbcon_clear_margins(vc, 1); in ypan_up_redraw()
1489 static __inline__ void ypan_down(struct vc_data *vc, int count) in ypan_down() argument
1491 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down()
1492 struct display *p = &fb_display[vc->vc_num]; in ypan_down()
1497 ops->bmove(vc, info, 0, 0, p->vrows - vc->vc_rows, in ypan_down()
1498 0, vc->vc_rows, vc->vc_cols); in ypan_down()
1499 p->yscroll += p->vrows - vc->vc_rows; in ypan_down()
1503 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down()
1506 fbcon_clear_margins(vc, 1); in ypan_down()
1513 static __inline__ void ypan_down_redraw(struct vc_data *vc, int t, int count) in ypan_down_redraw() argument
1515 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down_redraw()
1517 struct display *p = &fb_display[vc->vc_num]; in ypan_down_redraw()
1522 p->yscroll += p->vrows - vc->vc_rows; in ypan_down_redraw()
1523 fbcon_redraw_move(vc, p, t, vc->vc_rows - count, t + count); in ypan_down_redraw()
1527 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down_redraw()
1530 fbcon_clear_margins(vc, 1); in ypan_down_redraw()
1537 static void fbcon_redraw_softback(struct vc_data *vc, struct display *p, in fbcon_redraw_softback() argument
1540 int count = vc->vc_rows; in fbcon_redraw_softback()
1547 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1548 n = softback_curr + delta * vc->vc_size_row; in fbcon_redraw_softback()
1555 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1561 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1581 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1596 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1604 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1617 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw_softback()
1622 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1626 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1630 static void fbcon_redraw_move(struct vc_data *vc, struct display *p, in fbcon_redraw_move() argument
1634 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_move()
1648 fbcon_putcs(vc, start, s - start, in fbcon_redraw_move()
1658 fbcon_putcs(vc, start, s - start, dy, x); in fbcon_redraw_move()
1664 static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info, in fbcon_redraw_blit() argument
1667 int offset = ycount * vc->vc_cols; in fbcon_redraw_blit()
1669 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_blit()
1684 ops->bmove(vc, info, line + ycount, x, in fbcon_redraw_blit()
1700 ops->bmove(vc, info, line + ycount, x, line, x, 1, in fbcon_redraw_blit()
1708 s -= vc->vc_size_row; in fbcon_redraw_blit()
1709 d -= vc->vc_size_row; in fbcon_redraw_blit()
1714 static void fbcon_redraw(struct vc_data *vc, struct display *p, in fbcon_redraw() argument
1718 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw()
1733 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1741 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1756 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw()
1763 s -= vc->vc_size_row; in fbcon_redraw()
1764 d -= vc->vc_size_row; in fbcon_redraw()
1769 static inline void fbcon_softback_note(struct vc_data *vc, int t, in fbcon_softback_note() argument
1774 if (vc->vc_num != fg_console) in fbcon_softback_note()
1776 p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); in fbcon_softback_note()
1779 scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); in fbcon_softback_note()
1782 softback_in += vc->vc_size_row; in fbcon_softback_note()
1786 softback_top += vc->vc_size_row; in fbcon_softback_note()
1794 static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, in fbcon_scroll() argument
1797 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_scroll()
1798 struct display *p = &fb_display[vc->vc_num]; in fbcon_scroll()
1801 if (fbcon_is_inactive(vc, info)) in fbcon_scroll()
1804 fbcon_cursor(vc, CM_ERASE); in fbcon_scroll()
1814 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1815 count = vc->vc_rows; in fbcon_scroll()
1817 fbcon_softback_note(vc, t, count); in fbcon_scroll()
1822 fbcon_redraw_blit(vc, info, p, t, b - t - count, in fbcon_scroll()
1824 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1825 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1826 vc->vc_size_row * in fbcon_scroll()
1828 vc->vc_video_erase_char, in fbcon_scroll()
1829 vc->vc_size_row * count); in fbcon_scroll()
1834 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1836 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1837 vc->vc_cols); in fbcon_scroll()
1838 ywrap_up(vc, count); in fbcon_scroll()
1839 if (vc->vc_rows - b > 0) in fbcon_scroll()
1840 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1841 vc->vc_rows - b, in fbcon_scroll()
1842 vc->vc_cols); in fbcon_scroll()
1844 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1845 b - t - count, vc->vc_cols); in fbcon_scroll()
1848 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1853 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1854 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1857 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1859 fbcon_redraw_move(vc, p, 0, t, count); in fbcon_scroll()
1860 ypan_up_redraw(vc, t, count); in fbcon_scroll()
1861 if (vc->vc_rows - b > 0) in fbcon_scroll()
1862 fbcon_redraw_move(vc, p, b, in fbcon_scroll()
1863 vc->vc_rows - b, b); in fbcon_scroll()
1865 fbcon_redraw_move(vc, p, t + count, b - t - count, t); in fbcon_scroll()
1866 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1871 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1872 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1875 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1877 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1878 vc->vc_cols); in fbcon_scroll()
1879 ypan_up(vc, count); in fbcon_scroll()
1880 if (vc->vc_rows - b > 0) in fbcon_scroll()
1881 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1882 vc->vc_rows - b, in fbcon_scroll()
1883 vc->vc_cols); in fbcon_scroll()
1885 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1886 b - t - count, vc->vc_cols); in fbcon_scroll()
1889 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1894 fbcon_redraw(vc, p, t, b - t - count, in fbcon_scroll()
1895 count * vc->vc_cols); in fbcon_scroll()
1896 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1897 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1898 vc->vc_size_row * in fbcon_scroll()
1900 vc->vc_video_erase_char, in fbcon_scroll()
1901 vc->vc_size_row * count); in fbcon_scroll()
1907 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1908 count = vc->vc_rows; in fbcon_scroll()
1913 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, in fbcon_scroll()
1915 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1916 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1917 vc->vc_size_row * in fbcon_scroll()
1919 vc->vc_video_erase_char, in fbcon_scroll()
1920 vc->vc_size_row * count); in fbcon_scroll()
1925 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1926 if (vc->vc_rows - b > 0) in fbcon_scroll()
1927 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1928 vc->vc_rows - b, in fbcon_scroll()
1929 vc->vc_cols); in fbcon_scroll()
1930 ywrap_down(vc, count); in fbcon_scroll()
1932 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1933 vc->vc_cols); in fbcon_scroll()
1935 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1936 b - t - count, vc->vc_cols); in fbcon_scroll()
1939 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1943 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1944 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1947 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1948 if (vc->vc_rows - b > 0) in fbcon_scroll()
1949 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1950 vc->vc_rows - b, in fbcon_scroll()
1951 vc->vc_cols); in fbcon_scroll()
1952 ypan_down(vc, count); in fbcon_scroll()
1954 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1955 vc->vc_cols); in fbcon_scroll()
1957 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1958 b - t - count, vc->vc_cols); in fbcon_scroll()
1961 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1965 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1966 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1969 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1970 if (vc->vc_rows - b > 0) in fbcon_scroll()
1971 fbcon_redraw_move(vc, p, b, vc->vc_rows - b, in fbcon_scroll()
1973 ypan_down_redraw(vc, t, count); in fbcon_scroll()
1975 fbcon_redraw_move(vc, p, count, t, 0); in fbcon_scroll()
1977 fbcon_redraw_move(vc, p, t, b - t - count, t + count); in fbcon_scroll()
1978 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1983 fbcon_redraw(vc, p, b - 1, b - t - count, in fbcon_scroll()
1984 -count * vc->vc_cols); in fbcon_scroll()
1985 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1986 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1987 vc->vc_size_row * in fbcon_scroll()
1989 vc->vc_video_erase_char, in fbcon_scroll()
1990 vc->vc_size_row * count); in fbcon_scroll()
1998 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, in fbcon_bmove() argument
2001 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove()
2002 struct display *p = &fb_display[vc->vc_num]; in fbcon_bmove()
2004 if (fbcon_is_inactive(vc, info)) in fbcon_bmove()
2017 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, height, width, in fbcon_bmove()
2021 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx, in fbcon_bmove_rec() argument
2024 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove_rec()
2031 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2033 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2036 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2038 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2047 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2049 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2052 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2054 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2059 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, in fbcon_bmove_rec()
2065 struct vc_data *vc) in updatescrollmode() argument
2068 int fh = vc->vc_font.height; in updatescrollmode()
2078 divides(ypan, vc->vc_font.height) && vyres > yres; in updatescrollmode()
2080 divides(ywrap, vc->vc_font.height) && in updatescrollmode()
2081 divides(vc->vc_font.height, vyres) && in updatescrollmode()
2082 divides(vc->vc_font.height, yres); in updatescrollmode()
2090 if (yres > (fh * (vc->vc_rows + 1))) in updatescrollmode()
2091 p->vrows -= (yres - (fh * vc->vc_rows)) / fh; in updatescrollmode()
2110 static int fbcon_resize(struct vc_data *vc, unsigned int width, in fbcon_resize() argument
2113 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_resize()
2115 struct display *p = &fb_display[vc->vc_num]; in fbcon_resize()
2121 virt_fw = FBCON_SWAP(ops->rotate, vc->vc_font.width, in fbcon_resize()
2122 vc->vc_font.height); in fbcon_resize()
2123 virt_fh = FBCON_SWAP(ops->rotate, vc->vc_font.height, in fbcon_resize()
2124 vc->vc_font.width); in fbcon_resize()
2144 if (CON_IS_VISIBLE(vc)) { in fbcon_resize()
2152 updatescrollmode(p, info, vc); in fbcon_resize()
2156 static int fbcon_switch(struct vc_data *vc) in fbcon_switch() argument
2160 struct display *p = &fb_display[vc->vc_num]; in fbcon_switch()
2164 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_switch()
2169 fbcon_set_origin(vc); in fbcon_switch()
2172 fbcon_update_softback(vc); in fbcon_switch()
2199 o->currcon = vc->vc_num; in fbcon_switch()
2230 if (fbcon_is_inactive(vc, info) || in fbcon_switch()
2236 set_blitting_type(vc, info); in fbcon_switch()
2239 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_switch()
2241 set_blitting_type(vc, info); in fbcon_switch()
2244 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_switch()
2245 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_switch()
2248 charcnt = FNTCHARCNT(vc->vc_font.data); in fbcon_switch()
2251 vc->vc_complement_mask <<= 1; in fbcon_switch()
2253 updatescrollmode(p, info, vc); in fbcon_switch()
2257 scrollback_phys_max = p->vrows - vc->vc_rows; in fbcon_switch()
2261 scrollback_phys_max = p->vrows - 2 * vc->vc_rows; in fbcon_switch()
2273 if (!fbcon_is_inactive(vc, info)) { in fbcon_switch()
2278 fbcon_set_palette(vc, color_table); in fbcon_switch()
2279 fbcon_clear_margins(vc, 0); in fbcon_switch()
2286 update_region(vc, in fbcon_switch()
2287 vc->vc_origin + vc->vc_size_row * vc->vc_top, in fbcon_switch()
2288 vc->vc_size_row * (vc->vc_bottom - in fbcon_switch()
2289 vc->vc_top) / 2); in fbcon_switch()
2295 static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, in fbcon_generic_blank() argument
2301 unsigned short charmask = vc->vc_hi_font_mask ? in fbcon_generic_blank()
2305 oldc = vc->vc_video_erase_char; in fbcon_generic_blank()
2306 vc->vc_video_erase_char &= charmask; in fbcon_generic_blank()
2307 fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); in fbcon_generic_blank()
2308 vc->vc_video_erase_char = oldc; in fbcon_generic_blank()
2320 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) in fbcon_blank() argument
2322 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_blank()
2338 if (!fbcon_is_inactive(vc, info)) { in fbcon_blank()
2341 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); in fbcon_blank()
2346 fbcon_generic_blank(vc, info, blank); in fbcon_blank()
2350 update_screen(vc); in fbcon_blank()
2353 if (mode_switch || fbcon_is_inactive(vc, info) || in fbcon_blank()
2362 static int fbcon_debug_enter(struct vc_data *vc) in fbcon_debug_enter() argument
2364 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_enter()
2371 fbcon_set_palette(vc, color_table); in fbcon_debug_enter()
2375 static int fbcon_debug_leave(struct vc_data *vc) in fbcon_debug_leave() argument
2377 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_leave()
2386 static int fbcon_get_font(struct vc_data *vc, struct console_font *font) in fbcon_get_font() argument
2388 u8 *fontdata = vc->vc_font.data; in fbcon_get_font()
2392 font->width = vc->vc_font.width; in fbcon_get_font()
2393 font->height = vc->vc_font.height; in fbcon_get_font()
2394 font->charcount = vc->vc_hi_font_mask ? 512 : 256; in fbcon_get_font()
2399 j = vc->vc_font.height; in fbcon_get_font()
2407 j = vc->vc_font.height * 2; in fbcon_get_font()
2416 for (j = 0; j < vc->vc_font.height; j++) { in fbcon_get_font()
2426 j = vc->vc_font.height * 4; in fbcon_get_font()
2437 static int fbcon_do_set_font(struct vc_data *vc, int w, int h, in fbcon_do_set_font() argument
2440 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_do_set_font()
2442 struct display *p = &fb_display[vc->vc_num]; in fbcon_do_set_font()
2447 if (CON_IS_VISIBLE(vc) && softback_lines) in fbcon_do_set_font()
2448 fbcon_set_origin(vc); in fbcon_do_set_font()
2450 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); in fbcon_do_set_font()
2452 old_data = vc->vc_font.data; in fbcon_do_set_font()
2457 vc->vc_font.data = (void *)(p->fontdata = data); in fbcon_do_set_font()
2460 vc->vc_font.width = w; in fbcon_do_set_font()
2461 vc->vc_font.height = h; in fbcon_do_set_font()
2462 if (vc->vc_hi_font_mask && cnt == 256) { in fbcon_do_set_font()
2463 vc->vc_hi_font_mask = 0; in fbcon_do_set_font()
2464 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2465 vc->vc_complement_mask >>= 1; in fbcon_do_set_font()
2466 vc->vc_s_complement_mask >>= 1; in fbcon_do_set_font()
2470 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2472 (unsigned short *) vc->vc_origin; in fbcon_do_set_font()
2473 int count = vc->vc_screenbuf_size / 2; in fbcon_do_set_font()
2480 c = vc->vc_video_erase_char; in fbcon_do_set_font()
2481 vc->vc_video_erase_char = in fbcon_do_set_font()
2483 vc->vc_attr >>= 1; in fbcon_do_set_font()
2485 } else if (!vc->vc_hi_font_mask && cnt == 512) { in fbcon_do_set_font()
2486 vc->vc_hi_font_mask = 0x100; in fbcon_do_set_font()
2487 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2488 vc->vc_complement_mask <<= 1; in fbcon_do_set_font()
2489 vc->vc_s_complement_mask <<= 1; in fbcon_do_set_font()
2495 (unsigned short *) vc->vc_origin; in fbcon_do_set_font()
2496 int count = vc->vc_screenbuf_size / 2; in fbcon_do_set_font()
2501 if (vc->vc_can_do_color) in fbcon_do_set_font()
2509 c = vc->vc_video_erase_char; in fbcon_do_set_font()
2510 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2511 vc->vc_video_erase_char = in fbcon_do_set_font()
2513 vc->vc_attr <<= 1; in fbcon_do_set_font()
2515 vc->vc_video_erase_char = c & ~0x100; in fbcon_do_set_font()
2527 vc_resize(vc, cols, rows); in fbcon_do_set_font()
2528 if (CON_IS_VISIBLE(vc) && softback_buf) in fbcon_do_set_font()
2529 fbcon_update_softback(vc); in fbcon_do_set_font()
2530 } else if (CON_IS_VISIBLE(vc) in fbcon_do_set_font()
2531 && vc->vc_mode == KD_TEXT) { in fbcon_do_set_font()
2532 fbcon_clear_margins(vc, 0); in fbcon_do_set_font()
2533 update_screen(vc); in fbcon_do_set_font()
2541 static int fbcon_copy_font(struct vc_data *vc, int con) in fbcon_copy_font() argument
2544 struct console_font *f = &vc->vc_font; in fbcon_copy_font()
2548 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); in fbcon_copy_font()
2563 static int fbcon_set_font(struct vc_data *vc, struct console_font *font, unsigned flags) in fbcon_set_font() argument
2565 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_font()
2623 return fbcon_do_set_font(vc, font->width, font->height, new_data, 1); in fbcon_set_font()
2626 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name) in fbcon_set_def_font() argument
2628 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_def_font()
2639 return fbcon_do_set_font(vc, f->width, f->height, f->data, 0); in fbcon_set_def_font()
2650 static int fbcon_set_palette(struct vc_data *vc, unsigned char *table) in fbcon_set_palette() argument
2652 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_palette()
2656 if (fbcon_is_inactive(vc, info)) in fbcon_set_palette()
2659 if (!CON_IS_VISIBLE(vc)) in fbcon_set_palette()
2666 val = vc->vc_palette[j++]; in fbcon_set_palette()
2668 val = vc->vc_palette[j++]; in fbcon_set_palette()
2670 val = vc->vc_palette[j++]; in fbcon_set_palette()
2685 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) in fbcon_screen_pos() argument
2690 if (vc->vc_num != fg_console || !softback_lines) in fbcon_screen_pos()
2691 return (u16 *) (vc->vc_origin + offset); in fbcon_screen_pos()
2692 line = offset / vc->vc_size_row; in fbcon_screen_pos()
2694 return (u16 *) (vc->vc_origin + offset - in fbcon_screen_pos()
2695 softback_lines * vc->vc_size_row); in fbcon_screen_pos()
2702 static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, in fbcon_getxy() argument
2708 if (pos >= vc->vc_origin && pos < vc->vc_scr_end) { in fbcon_getxy()
2709 unsigned long offset = (pos - vc->vc_origin) / 2; in fbcon_getxy()
2711 x = offset % vc->vc_cols; in fbcon_getxy()
2712 y = offset / vc->vc_cols; in fbcon_getxy()
2713 if (vc->vc_num == fg_console) in fbcon_getxy()
2715 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2716 } else if (vc->vc_num == fg_console && softback_lines) { in fbcon_getxy()
2722 x = offset % vc->vc_cols; in fbcon_getxy()
2723 y = offset / vc->vc_cols; in fbcon_getxy()
2724 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2728 ret = vc->vc_origin; in fbcon_getxy()
2732 ret = vc->vc_origin; in fbcon_getxy()
2743 static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt) in fbcon_invert_region() argument
2747 if (!vc->vc_can_do_color) in fbcon_invert_region()
2749 else if (vc->vc_hi_font_mask == 0x100) in fbcon_invert_region()
2759 p = (u16 *) vc->vc_origin; in fbcon_invert_region()
2763 static int fbcon_scrolldelta(struct vc_data *vc, int lines) in fbcon_scrolldelta() argument
2771 if (vc->vc_num != fg_console) in fbcon_scrolldelta()
2773 if (vc->vc_mode != KD_TEXT || !lines) in fbcon_scrolldelta()
2781 if (logo_shown == vc->vc_num) { in fbcon_scrolldelta()
2786 q = vc->vc_origin + in fbcon_scrolldelta()
2787 logo_lines * vc->vc_size_row; in fbcon_scrolldelta()
2793 p -= vc->vc_size_row; in fbcon_scrolldelta()
2794 q -= vc->vc_size_row; in fbcon_scrolldelta()
2796 vc->vc_size_row); in fbcon_scrolldelta()
2799 update_region(vc, vc->vc_origin, in fbcon_scrolldelta()
2800 logo_lines * vc->vc_cols); in fbcon_scrolldelta()
2804 fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); in fbcon_scrolldelta()
2805 fbcon_redraw_softback(vc, disp, lines); in fbcon_scrolldelta()
2806 fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); in fbcon_scrolldelta()
2822 if (fbcon_is_inactive(vc, info)) in fbcon_scrolldelta()
2825 fbcon_cursor(vc, CM_ERASE); in fbcon_scrolldelta()
2835 limit -= vc->vc_rows; in fbcon_scrolldelta()
2845 ops->var.yoffset = offset * vc->vc_font.height; in fbcon_scrolldelta()
2849 fbcon_cursor(vc, CM_DRAW); in fbcon_scrolldelta()
2853 static int fbcon_set_origin(struct vc_data *vc) in fbcon_set_origin() argument
2856 fbcon_scrolldelta(vc, softback_lines); in fbcon_set_origin()
2862 struct vc_data *vc = NULL; in fbcon_suspended() local
2867 vc = vc_cons[ops->currcon].d; in fbcon_suspended()
2870 fbcon_cursor(vc, CM_ERASE); in fbcon_suspended()
2875 struct vc_data *vc; in fbcon_resumed() local
2880 vc = vc_cons[ops->currcon].d; in fbcon_resumed()
2882 update_screen(vc); in fbcon_resumed()
2888 struct vc_data *vc; in fbcon_modechanged() local
2894 vc = vc_cons[ops->currcon].d; in fbcon_modechanged()
2895 if (vc->vc_mode != KD_TEXT || in fbcon_modechanged()
2899 p = &fb_display[vc->vc_num]; in fbcon_modechanged()
2900 set_blitting_type(vc, info); in fbcon_modechanged()
2902 if (CON_IS_VISIBLE(vc)) { in fbcon_modechanged()
2906 cols /= vc->vc_font.width; in fbcon_modechanged()
2907 rows /= vc->vc_font.height; in fbcon_modechanged()
2908 vc_resize(vc, cols, rows); in fbcon_modechanged()
2909 updatescrollmode(p, info, vc); in fbcon_modechanged()
2913 if (!fbcon_is_inactive(vc, info)) { in fbcon_modechanged()
2918 fbcon_set_palette(vc, color_table); in fbcon_modechanged()
2919 update_screen(vc); in fbcon_modechanged()
2921 fbcon_update_softback(vc); in fbcon_modechanged()
2928 struct vc_data *vc; in fbcon_set_all_vcs() local
2936 vc = vc_cons[i].d; in fbcon_set_all_vcs()
2937 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_set_all_vcs()
2941 if (CON_IS_VISIBLE(vc)) { in fbcon_set_all_vcs()
2946 p = &fb_display[vc->vc_num]; in fbcon_set_all_vcs()
2947 set_blitting_type(vc, info); in fbcon_set_all_vcs()
2951 cols /= vc->vc_font.width; in fbcon_set_all_vcs()
2952 rows /= vc->vc_font.height; in fbcon_set_all_vcs()
2953 vc_resize(vc, cols, rows); in fbcon_set_all_vcs()
3170 struct vc_data *vc; in fbcon_fb_blanked() local
3175 vc = vc_cons[ops->currcon].d; in fbcon_fb_blanked()
3176 if (vc->vc_mode != KD_TEXT || in fbcon_fb_blanked()
3180 if (CON_IS_VISIBLE(vc)) { in fbcon_fb_blanked()
3192 struct vc_data *vc; in fbcon_new_modelist() local
3201 vc = vc_cons[i].d; in fbcon_new_modelist()
3206 fbcon_set_disp(info, &var, vc->vc_num); in fbcon_new_modelist()
3213 struct vc_data *vc; in fbcon_get_requirement() local
3220 vc = vc_cons[i].d; in fbcon_get_requirement()
3221 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3224 caps->x |= 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3225 caps->y |= 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()
3233 vc = vc_cons[fg_console].d; in fbcon_get_requirement()
3235 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3238 caps->x = 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3239 caps->y = 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()