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
715 if (vc) in con2fb_acquire_newinfo()
716 set_blitting_type(vc, info); in con2fb_acquire_newinfo()
727 static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, in con2fb_release_oldinfo() argument
773 static void con2fb_init_display(struct vc_data *vc, struct fb_info *info, in con2fb_init_display() argument
820 struct vc_data *vc = vc_cons[unit].d; in set_con2fb_map() local
844 err = con2fb_acquire_newinfo(vc, info, unit, oldidx); in set_con2fb_map()
852 err = con2fb_release_oldinfo(vc, oldinfo, info, unit, oldidx, in set_con2fb_map()
862 con2fb_init_display(vc, info, unit, show_logo); in set_con2fb_map()
922 struct vc_data *vc = vc_cons[fg_console].d; in fbcon_startup() local
963 set_blitting_type(vc, info); in fbcon_startup()
991 if (!p->fontdata && !vc->vc_font.data) { in fbcon_startup()
997 vc->vc_font.width = font->width; in fbcon_startup()
998 vc->vc_font.height = font->height; in fbcon_startup()
999 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_startup()
1000 vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ in fbcon_startup()
1002 p->fontdata = vc->vc_font.data; in fbcon_startup()
1007 cols /= vc->vc_font.width; in fbcon_startup()
1008 rows /= vc->vc_font.height; in fbcon_startup()
1009 vc_resize(vc, cols, rows); in fbcon_startup()
1022 static void fbcon_init(struct vc_data *vc, int init) in fbcon_init() argument
1024 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_init()
1026 struct vc_data **default_mode = vc->vc_display_fg; in fbcon_init()
1028 struct display *t, *p = &fb_display[vc->vc_num]; in fbcon_init()
1037 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || in fbcon_init()
1045 con2fb_acquire_newinfo(vc, info, vc->vc_num, -1); in fbcon_init()
1054 vc->vc_font.data = (void *)(p->fontdata = in fbcon_init()
1056 vc->vc_font.width = fvc->vc_font.width; in fbcon_init()
1057 vc->vc_font.height = fvc->vc_font.height; in fbcon_init()
1070 vc->vc_font.width = font->width; in fbcon_init()
1071 vc->vc_font.height = font->height; in fbcon_init()
1072 vc->vc_font.data = (void *)(p->fontdata = font->data); in fbcon_init()
1073 vc->vc_font.charcount = 256; /* FIXME Need to in fbcon_init()
1081 vc->vc_panic_force_write = !!(info->flags & FBINFO_CAN_FORCE_OUTPUT); in fbcon_init()
1082 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_init()
1083 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_init()
1085 vc->vc_hi_font_mask = 0; in fbcon_init()
1087 vc->vc_hi_font_mask = 0x100; in fbcon_init()
1088 if (vc->vc_can_do_color) in fbcon_init()
1089 vc->vc_complement_mask <<= 1; in fbcon_init()
1094 if (!*vc->vc_uni_pagedir_loc) in fbcon_init()
1095 con_copy_unimap(vc, svc); in fbcon_init()
1098 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_init()
1100 set_blitting_type(vc, info); in fbcon_init()
1102 cols = vc->vc_cols; in fbcon_init()
1103 rows = vc->vc_rows; in fbcon_init()
1106 new_cols /= vc->vc_font.width; in fbcon_init()
1107 new_rows /= vc->vc_font.height; in fbcon_init()
1116 if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) { in fbcon_init()
1144 vc->vc_cols = new_cols; in fbcon_init()
1145 vc->vc_rows = new_rows; in fbcon_init()
1147 vc_resize(vc, new_cols, new_rows); in fbcon_init()
1150 fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows); in fbcon_init()
1152 if (vc == svc && softback_buf) in fbcon_init()
1153 fbcon_update_softback(vc); in fbcon_init()
1155 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_init()
1157 set_blitting_type(vc, info); in fbcon_init()
1171 static void fbcon_deinit(struct vc_data *vc) in fbcon_deinit() argument
1173 struct display *p = &fb_display[vc->vc_num]; in fbcon_deinit()
1179 idx = con2fb_map[vc->vc_num]; in fbcon_deinit()
1196 if (CON_IS_VISIBLE(vc)) in fbcon_deinit()
1204 vc->vc_font.data = NULL; in fbcon_deinit()
1237 static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, in fbcon_clear() argument
1240 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear()
1243 struct display *p = &fb_display[vc->vc_num]; in fbcon_clear()
1246 if (fbcon_is_inactive(vc, info)) in fbcon_clear()
1252 if (sy < vc->vc_top && vc->vc_top == logo_lines) { in fbcon_clear()
1253 vc->vc_top = 0; in fbcon_clear()
1260 fbcon_clear_margins(vc, 0); in fbcon_clear()
1268 ops->clear(vc, info, real_y(p, sy), sx, b, width); in fbcon_clear()
1269 ops->clear(vc, info, real_y(p, sy + b), sx, height - b, in fbcon_clear()
1272 ops->clear(vc, info, real_y(p, sy), sx, height, width); in fbcon_clear()
1275 static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, in fbcon_putcs() argument
1278 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_putcs()
1279 struct display *p = &fb_display[vc->vc_num]; in fbcon_putcs()
1282 if (!fbcon_is_inactive(vc, info)) in fbcon_putcs()
1283 ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, in fbcon_putcs()
1284 get_color(vc, info, scr_readw(s), 1), in fbcon_putcs()
1285 get_color(vc, info, scr_readw(s), 0)); in fbcon_putcs()
1288 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) in fbcon_putc() argument
1293 fbcon_putcs(vc, &chr, 1, ypos, xpos); in fbcon_putc()
1296 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) in fbcon_clear_margins() argument
1298 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_clear_margins()
1301 if (!fbcon_is_inactive(vc, info)) in fbcon_clear_margins()
1302 ops->clear_margins(vc, info, bottom_only); in fbcon_clear_margins()
1305 static void fbcon_cursor(struct vc_data *vc, int mode) in fbcon_cursor() argument
1307 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_cursor()
1310 int c = scr_readw((u16 *) vc->vc_pos); in fbcon_cursor()
1312 ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); in fbcon_cursor()
1314 if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) in fbcon_cursor()
1317 if (vc->vc_cursor_type & 0x10) in fbcon_cursor()
1328 fbcon_set_origin(vc); in fbcon_cursor()
1332 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), in fbcon_cursor()
1333 get_color(vc, info, c, 0)); in fbcon_cursor()
1344 struct vc_data **default_mode, *vc; in fbcon_set_disp() local
1354 vc = vc_cons[unit].d; in fbcon_set_disp()
1356 if (!vc) in fbcon_set_disp()
1359 default_mode = vc->vc_display_fg; in fbcon_set_disp()
1363 if (!vc->vc_font.data) { in fbcon_set_disp()
1364 vc->vc_font.data = (void *)(p->fontdata = t->fontdata); in fbcon_set_disp()
1365 vc->vc_font.width = (*default_mode)->vc_font.width; in fbcon_set_disp()
1366 vc->vc_font.height = (*default_mode)->vc_font.height; in fbcon_set_disp()
1380 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_set_disp()
1381 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_set_disp()
1383 vc->vc_hi_font_mask = 0; in fbcon_set_disp()
1385 vc->vc_hi_font_mask = 0x100; in fbcon_set_disp()
1386 if (vc->vc_can_do_color) in fbcon_set_disp()
1387 vc->vc_complement_mask <<= 1; in fbcon_set_disp()
1392 if (!*vc->vc_uni_pagedir_loc) in fbcon_set_disp()
1393 con_copy_unimap(vc, svc); in fbcon_set_disp()
1397 cols /= vc->vc_font.width; in fbcon_set_disp()
1398 rows /= vc->vc_font.height; in fbcon_set_disp()
1399 vc_resize(vc, cols, rows); in fbcon_set_disp()
1401 if (CON_IS_VISIBLE(vc)) { in fbcon_set_disp()
1402 update_screen(vc); in fbcon_set_disp()
1404 fbcon_update_softback(vc); in fbcon_set_disp()
1408 static __inline__ void ywrap_up(struct vc_data *vc, int count) in ywrap_up() argument
1410 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_up()
1412 struct display *p = &fb_display[vc->vc_num]; in ywrap_up()
1418 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_up()
1427 static __inline__ void ywrap_down(struct vc_data *vc, int count) in ywrap_down() argument
1429 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ywrap_down()
1431 struct display *p = &fb_display[vc->vc_num]; in ywrap_down()
1437 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ywrap_down()
1446 static __inline__ void ypan_up(struct vc_data *vc, int count) in ypan_up() argument
1448 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up()
1449 struct display *p = &fb_display[vc->vc_num]; in ypan_up()
1453 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up()
1454 ops->bmove(vc, info, p->vrows - vc->vc_rows, in ypan_up()
1455 0, 0, 0, vc->vc_rows, vc->vc_cols); in ypan_up()
1456 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up()
1460 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up()
1463 fbcon_clear_margins(vc, 1); in ypan_up()
1470 static __inline__ void ypan_up_redraw(struct vc_data *vc, int t, int count) in ypan_up_redraw() argument
1472 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_up_redraw()
1474 struct display *p = &fb_display[vc->vc_num]; in ypan_up_redraw()
1478 if (p->yscroll > p->vrows - vc->vc_rows) { in ypan_up_redraw()
1479 p->yscroll -= p->vrows - vc->vc_rows; in ypan_up_redraw()
1480 fbcon_redraw_move(vc, p, t + count, vc->vc_rows - count, t); in ypan_up_redraw()
1484 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_up_redraw()
1487 fbcon_clear_margins(vc, 1); in ypan_up_redraw()
1494 static __inline__ void ypan_down(struct vc_data *vc, int count) in ypan_down() argument
1496 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down()
1497 struct display *p = &fb_display[vc->vc_num]; in ypan_down()
1502 ops->bmove(vc, info, 0, 0, p->vrows - vc->vc_rows, in ypan_down()
1503 0, vc->vc_rows, vc->vc_cols); in ypan_down()
1504 p->yscroll += p->vrows - vc->vc_rows; in ypan_down()
1508 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down()
1511 fbcon_clear_margins(vc, 1); in ypan_down()
1518 static __inline__ void ypan_down_redraw(struct vc_data *vc, int t, int count) in ypan_down_redraw() argument
1520 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in ypan_down_redraw()
1522 struct display *p = &fb_display[vc->vc_num]; in ypan_down_redraw()
1527 p->yscroll += p->vrows - vc->vc_rows; in ypan_down_redraw()
1528 fbcon_redraw_move(vc, p, t, vc->vc_rows - count, t + count); in ypan_down_redraw()
1532 ops->var.yoffset = p->yscroll * vc->vc_font.height; in ypan_down_redraw()
1535 fbcon_clear_margins(vc, 1); in ypan_down_redraw()
1542 static void fbcon_redraw_softback(struct vc_data *vc, struct display *p, in fbcon_redraw_softback() argument
1545 int count = vc->vc_rows; in fbcon_redraw_softback()
1552 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1553 n = softback_curr + delta * vc->vc_size_row; in fbcon_redraw_softback()
1560 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1566 (softback_top - n) / vc->vc_size_row; in fbcon_redraw_softback()
1586 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1601 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1609 fbcon_putcs(vc, start, s - start, in fbcon_redraw_softback()
1622 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw_softback()
1627 d = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1631 s = (u16 *) vc->vc_origin; in fbcon_redraw_softback()
1635 static void fbcon_redraw_move(struct vc_data *vc, struct display *p, in fbcon_redraw_move() argument
1639 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_move()
1653 fbcon_putcs(vc, start, s - start, in fbcon_redraw_move()
1663 fbcon_putcs(vc, start, s - start, dy, x); in fbcon_redraw_move()
1669 static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info, in fbcon_redraw_blit() argument
1672 int offset = ycount * vc->vc_cols; in fbcon_redraw_blit()
1674 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw_blit()
1689 ops->bmove(vc, info, line + ycount, x, in fbcon_redraw_blit()
1705 ops->bmove(vc, info, line + ycount, x, line, x, 1, in fbcon_redraw_blit()
1713 s -= vc->vc_size_row; in fbcon_redraw_blit()
1714 d -= vc->vc_size_row; in fbcon_redraw_blit()
1719 static void fbcon_redraw(struct vc_data *vc, struct display *p, in fbcon_redraw() argument
1723 (vc->vc_origin + vc->vc_size_row * line); in fbcon_redraw()
1738 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1746 fbcon_putcs(vc, start, s - start, in fbcon_redraw()
1761 fbcon_putcs(vc, start, s - start, line, x); in fbcon_redraw()
1768 s -= vc->vc_size_row; in fbcon_redraw()
1769 d -= vc->vc_size_row; in fbcon_redraw()
1774 static inline void fbcon_softback_note(struct vc_data *vc, int t, in fbcon_softback_note() argument
1779 if (vc->vc_num != fg_console) in fbcon_softback_note()
1781 p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row); in fbcon_softback_note()
1784 scr_memcpyw((u16 *) softback_in, p, vc->vc_size_row); in fbcon_softback_note()
1787 softback_in += vc->vc_size_row; in fbcon_softback_note()
1791 softback_top += vc->vc_size_row; in fbcon_softback_note()
1799 static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, in fbcon_scroll() argument
1802 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_scroll()
1803 struct display *p = &fb_display[vc->vc_num]; in fbcon_scroll()
1806 if (fbcon_is_inactive(vc, info)) in fbcon_scroll()
1809 fbcon_cursor(vc, CM_ERASE); in fbcon_scroll()
1819 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1820 count = vc->vc_rows; in fbcon_scroll()
1822 fbcon_softback_note(vc, t, count); in fbcon_scroll()
1827 fbcon_redraw_blit(vc, info, p, t, b - t - count, in fbcon_scroll()
1829 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1830 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1831 vc->vc_size_row * in fbcon_scroll()
1833 vc->vc_video_erase_char, in fbcon_scroll()
1834 vc->vc_size_row * count); in fbcon_scroll()
1839 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1841 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1842 vc->vc_cols); in fbcon_scroll()
1843 ywrap_up(vc, count); in fbcon_scroll()
1844 if (vc->vc_rows - b > 0) in fbcon_scroll()
1845 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1846 vc->vc_rows - b, in fbcon_scroll()
1847 vc->vc_cols); in fbcon_scroll()
1849 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1850 b - t - count, vc->vc_cols); in fbcon_scroll()
1853 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1858 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1859 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1862 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1864 fbcon_redraw_move(vc, p, 0, t, count); in fbcon_scroll()
1865 ypan_up_redraw(vc, t, count); in fbcon_scroll()
1866 if (vc->vc_rows - b > 0) in fbcon_scroll()
1867 fbcon_redraw_move(vc, p, b, in fbcon_scroll()
1868 vc->vc_rows - b, b); in fbcon_scroll()
1870 fbcon_redraw_move(vc, p, t + count, b - t - count, t); in fbcon_scroll()
1871 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1876 2 * (p->vrows - vc->vc_rows)) in fbcon_scroll()
1877 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1880 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1882 fbcon_bmove(vc, 0, 0, count, 0, t, in fbcon_scroll()
1883 vc->vc_cols); in fbcon_scroll()
1884 ypan_up(vc, count); in fbcon_scroll()
1885 if (vc->vc_rows - b > 0) in fbcon_scroll()
1886 fbcon_bmove(vc, b - count, 0, b, 0, in fbcon_scroll()
1887 vc->vc_rows - b, in fbcon_scroll()
1888 vc->vc_cols); in fbcon_scroll()
1890 fbcon_bmove(vc, t + count, 0, t, 0, in fbcon_scroll()
1891 b - t - count, vc->vc_cols); in fbcon_scroll()
1894 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1899 fbcon_redraw(vc, p, t, b - t - count, in fbcon_scroll()
1900 count * vc->vc_cols); in fbcon_scroll()
1901 fbcon_clear(vc, b - count, 0, count, vc->vc_cols); in fbcon_scroll()
1902 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1903 vc->vc_size_row * in fbcon_scroll()
1905 vc->vc_video_erase_char, in fbcon_scroll()
1906 vc->vc_size_row * count); in fbcon_scroll()
1912 if (count > vc->vc_rows) /* Maximum realistic size */ in fbcon_scroll()
1913 count = vc->vc_rows; in fbcon_scroll()
1918 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, in fbcon_scroll()
1920 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1921 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1922 vc->vc_size_row * in fbcon_scroll()
1924 vc->vc_video_erase_char, in fbcon_scroll()
1925 vc->vc_size_row * count); in fbcon_scroll()
1930 if (b - t - count > 3 * vc->vc_rows >> 2) { in fbcon_scroll()
1931 if (vc->vc_rows - b > 0) in fbcon_scroll()
1932 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1933 vc->vc_rows - b, in fbcon_scroll()
1934 vc->vc_cols); in fbcon_scroll()
1935 ywrap_down(vc, count); in fbcon_scroll()
1937 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1938 vc->vc_cols); in fbcon_scroll()
1940 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1941 b - t - count, vc->vc_cols); in fbcon_scroll()
1944 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1948 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1949 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1952 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1953 if (vc->vc_rows - b > 0) in fbcon_scroll()
1954 fbcon_bmove(vc, b, 0, b - count, 0, in fbcon_scroll()
1955 vc->vc_rows - b, in fbcon_scroll()
1956 vc->vc_cols); in fbcon_scroll()
1957 ypan_down(vc, count); in fbcon_scroll()
1959 fbcon_bmove(vc, count, 0, 0, 0, t, in fbcon_scroll()
1960 vc->vc_cols); in fbcon_scroll()
1962 fbcon_bmove(vc, t, 0, t + count, 0, in fbcon_scroll()
1963 b - t - count, vc->vc_cols); in fbcon_scroll()
1966 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1970 if ((count - p->yscroll <= p->vrows - vc->vc_rows) in fbcon_scroll()
1971 && ((!scroll_partial && (b - t == vc->vc_rows)) in fbcon_scroll()
1974 3 * vc->vc_rows >> 2)))) { in fbcon_scroll()
1975 if (vc->vc_rows - b > 0) in fbcon_scroll()
1976 fbcon_redraw_move(vc, p, b, vc->vc_rows - b, in fbcon_scroll()
1978 ypan_down_redraw(vc, t, count); in fbcon_scroll()
1980 fbcon_redraw_move(vc, p, count, t, 0); in fbcon_scroll()
1982 fbcon_redraw_move(vc, p, t, b - t - count, t + count); in fbcon_scroll()
1983 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1988 fbcon_redraw(vc, p, b - 1, b - t - count, in fbcon_scroll()
1989 -count * vc->vc_cols); in fbcon_scroll()
1990 fbcon_clear(vc, t, 0, count, vc->vc_cols); in fbcon_scroll()
1991 scr_memsetw((unsigned short *) (vc->vc_origin + in fbcon_scroll()
1992 vc->vc_size_row * in fbcon_scroll()
1994 vc->vc_video_erase_char, in fbcon_scroll()
1995 vc->vc_size_row * count); in fbcon_scroll()
2003 static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, in fbcon_bmove() argument
2006 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove()
2007 struct display *p = &fb_display[vc->vc_num]; in fbcon_bmove()
2009 if (fbcon_is_inactive(vc, info)) in fbcon_bmove()
2022 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, height, width, in fbcon_bmove()
2026 static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx, in fbcon_bmove_rec() argument
2029 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_bmove_rec()
2036 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2038 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2041 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2043 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2052 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2054 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2057 fbcon_bmove_rec(vc, p, sy + b, sx, dy + b, dx, in fbcon_bmove_rec()
2059 fbcon_bmove_rec(vc, p, sy, sx, dy, dx, b, width, in fbcon_bmove_rec()
2064 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, in fbcon_bmove_rec()
2070 struct vc_data *vc) in updatescrollmode() argument
2073 int fh = vc->vc_font.height; in updatescrollmode()
2083 divides(ypan, vc->vc_font.height) && vyres > yres; in updatescrollmode()
2085 divides(ywrap, vc->vc_font.height) && in updatescrollmode()
2086 divides(vc->vc_font.height, vyres) && in updatescrollmode()
2087 divides(vc->vc_font.height, yres); in updatescrollmode()
2095 if (yres > (fh * (vc->vc_rows + 1))) in updatescrollmode()
2096 p->vrows -= (yres - (fh * vc->vc_rows)) / fh; in updatescrollmode()
2115 static int fbcon_resize(struct vc_data *vc, unsigned int width, in fbcon_resize() argument
2118 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_resize()
2120 struct display *p = &fb_display[vc->vc_num]; in fbcon_resize()
2126 virt_fw = FBCON_SWAP(ops->rotate, vc->vc_font.width, in fbcon_resize()
2127 vc->vc_font.height); in fbcon_resize()
2128 virt_fh = FBCON_SWAP(ops->rotate, vc->vc_font.height, in fbcon_resize()
2129 vc->vc_font.width); in fbcon_resize()
2149 if (CON_IS_VISIBLE(vc)) { in fbcon_resize()
2157 updatescrollmode(p, info, vc); in fbcon_resize()
2161 static int fbcon_switch(struct vc_data *vc) in fbcon_switch() argument
2165 struct display *p = &fb_display[vc->vc_num]; in fbcon_switch()
2169 info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_switch()
2174 fbcon_set_origin(vc); in fbcon_switch()
2177 fbcon_update_softback(vc); in fbcon_switch()
2204 o->currcon = vc->vc_num; in fbcon_switch()
2235 if (fbcon_is_inactive(vc, info) || in fbcon_switch()
2241 set_blitting_type(vc, info); in fbcon_switch()
2244 if (ops->rotate_font && ops->rotate_font(info, vc)) { in fbcon_switch()
2246 set_blitting_type(vc, info); in fbcon_switch()
2249 vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); in fbcon_switch()
2250 vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; in fbcon_switch()
2253 charcnt = FNTCHARCNT(vc->vc_font.data); in fbcon_switch()
2256 vc->vc_complement_mask <<= 1; in fbcon_switch()
2258 updatescrollmode(p, info, vc); in fbcon_switch()
2262 scrollback_phys_max = p->vrows - vc->vc_rows; in fbcon_switch()
2266 scrollback_phys_max = p->vrows - 2 * vc->vc_rows; in fbcon_switch()
2278 if (!fbcon_is_inactive(vc, info)) { in fbcon_switch()
2283 fbcon_set_palette(vc, color_table); in fbcon_switch()
2284 fbcon_clear_margins(vc, 0); in fbcon_switch()
2291 update_region(vc, in fbcon_switch()
2292 vc->vc_origin + vc->vc_size_row * vc->vc_top, in fbcon_switch()
2293 vc->vc_size_row * (vc->vc_bottom - in fbcon_switch()
2294 vc->vc_top) / 2); in fbcon_switch()
2300 static void fbcon_generic_blank(struct vc_data *vc, struct fb_info *info, in fbcon_generic_blank() argument
2306 unsigned short charmask = vc->vc_hi_font_mask ? in fbcon_generic_blank()
2310 oldc = vc->vc_video_erase_char; in fbcon_generic_blank()
2311 vc->vc_video_erase_char &= charmask; in fbcon_generic_blank()
2312 fbcon_clear(vc, 0, 0, vc->vc_rows, vc->vc_cols); in fbcon_generic_blank()
2313 vc->vc_video_erase_char = oldc; in fbcon_generic_blank()
2325 static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) in fbcon_blank() argument
2327 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_blank()
2343 if (!fbcon_is_inactive(vc, info)) { in fbcon_blank()
2346 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); in fbcon_blank()
2351 fbcon_generic_blank(vc, info, blank); in fbcon_blank()
2355 update_screen(vc); in fbcon_blank()
2358 if (mode_switch || fbcon_is_inactive(vc, info) || in fbcon_blank()
2367 static int fbcon_debug_enter(struct vc_data *vc) in fbcon_debug_enter() argument
2369 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_enter()
2376 fbcon_set_palette(vc, color_table); in fbcon_debug_enter()
2380 static int fbcon_debug_leave(struct vc_data *vc) in fbcon_debug_leave() argument
2382 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_debug_leave()
2391 static int fbcon_get_font(struct vc_data *vc, struct console_font *font) in fbcon_get_font() argument
2393 u8 *fontdata = vc->vc_font.data; in fbcon_get_font()
2397 font->width = vc->vc_font.width; in fbcon_get_font()
2398 font->height = vc->vc_font.height; in fbcon_get_font()
2399 font->charcount = vc->vc_hi_font_mask ? 512 : 256; in fbcon_get_font()
2404 j = vc->vc_font.height; in fbcon_get_font()
2412 j = vc->vc_font.height * 2; in fbcon_get_font()
2421 for (j = 0; j < vc->vc_font.height; j++) { in fbcon_get_font()
2431 j = vc->vc_font.height * 4; in fbcon_get_font()
2442 static int fbcon_do_set_font(struct vc_data *vc, int w, int h, in fbcon_do_set_font() argument
2445 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_do_set_font()
2447 struct display *p = &fb_display[vc->vc_num]; in fbcon_do_set_font()
2452 if (CON_IS_VISIBLE(vc) && softback_lines) in fbcon_do_set_font()
2453 fbcon_set_origin(vc); in fbcon_do_set_font()
2455 resize = (w != vc->vc_font.width) || (h != vc->vc_font.height); in fbcon_do_set_font()
2457 old_data = vc->vc_font.data; in fbcon_do_set_font()
2462 vc->vc_font.data = (void *)(p->fontdata = data); in fbcon_do_set_font()
2465 vc->vc_font.width = w; in fbcon_do_set_font()
2466 vc->vc_font.height = h; in fbcon_do_set_font()
2467 if (vc->vc_hi_font_mask && cnt == 256) { in fbcon_do_set_font()
2468 vc->vc_hi_font_mask = 0; in fbcon_do_set_font()
2469 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2470 vc->vc_complement_mask >>= 1; in fbcon_do_set_font()
2471 vc->vc_s_complement_mask >>= 1; in fbcon_do_set_font()
2475 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2477 (unsigned short *) vc->vc_origin; in fbcon_do_set_font()
2478 int count = vc->vc_screenbuf_size / 2; in fbcon_do_set_font()
2485 c = vc->vc_video_erase_char; in fbcon_do_set_font()
2486 vc->vc_video_erase_char = in fbcon_do_set_font()
2488 vc->vc_attr >>= 1; in fbcon_do_set_font()
2490 } else if (!vc->vc_hi_font_mask && cnt == 512) { in fbcon_do_set_font()
2491 vc->vc_hi_font_mask = 0x100; in fbcon_do_set_font()
2492 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2493 vc->vc_complement_mask <<= 1; in fbcon_do_set_font()
2494 vc->vc_s_complement_mask <<= 1; in fbcon_do_set_font()
2500 (unsigned short *) vc->vc_origin; in fbcon_do_set_font()
2501 int count = vc->vc_screenbuf_size / 2; in fbcon_do_set_font()
2506 if (vc->vc_can_do_color) in fbcon_do_set_font()
2514 c = vc->vc_video_erase_char; in fbcon_do_set_font()
2515 if (vc->vc_can_do_color) { in fbcon_do_set_font()
2516 vc->vc_video_erase_char = in fbcon_do_set_font()
2518 vc->vc_attr <<= 1; in fbcon_do_set_font()
2520 vc->vc_video_erase_char = c & ~0x100; in fbcon_do_set_font()
2532 vc_resize(vc, cols, rows); in fbcon_do_set_font()
2533 if (CON_IS_VISIBLE(vc) && softback_buf) in fbcon_do_set_font()
2534 fbcon_update_softback(vc); in fbcon_do_set_font()
2535 } else if (CON_IS_VISIBLE(vc) in fbcon_do_set_font()
2536 && vc->vc_mode == KD_TEXT) { in fbcon_do_set_font()
2537 fbcon_clear_margins(vc, 0); in fbcon_do_set_font()
2538 update_screen(vc); in fbcon_do_set_font()
2546 static int fbcon_copy_font(struct vc_data *vc, int con) in fbcon_copy_font() argument
2549 struct console_font *f = &vc->vc_font; in fbcon_copy_font()
2553 return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); in fbcon_copy_font()
2568 static int fbcon_set_font(struct vc_data *vc, struct console_font *font, unsigned flags) in fbcon_set_font() argument
2570 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_font()
2628 return fbcon_do_set_font(vc, font->width, font->height, new_data, 1); in fbcon_set_font()
2631 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font, char *name) in fbcon_set_def_font() argument
2633 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_def_font()
2644 return fbcon_do_set_font(vc, f->width, f->height, f->data, 0); in fbcon_set_def_font()
2655 static int fbcon_set_palette(struct vc_data *vc, unsigned char *table) in fbcon_set_palette() argument
2657 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; in fbcon_set_palette()
2661 if (fbcon_is_inactive(vc, info)) in fbcon_set_palette()
2664 if (!CON_IS_VISIBLE(vc)) in fbcon_set_palette()
2671 val = vc->vc_palette[j++]; in fbcon_set_palette()
2673 val = vc->vc_palette[j++]; in fbcon_set_palette()
2675 val = vc->vc_palette[j++]; in fbcon_set_palette()
2690 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) in fbcon_screen_pos() argument
2695 if (vc->vc_num != fg_console || !softback_lines) in fbcon_screen_pos()
2696 return (u16 *) (vc->vc_origin + offset); in fbcon_screen_pos()
2697 line = offset / vc->vc_size_row; in fbcon_screen_pos()
2699 return (u16 *) (vc->vc_origin + offset - in fbcon_screen_pos()
2700 softback_lines * vc->vc_size_row); in fbcon_screen_pos()
2707 static unsigned long fbcon_getxy(struct vc_data *vc, unsigned long pos, in fbcon_getxy() argument
2713 if (pos >= vc->vc_origin && pos < vc->vc_scr_end) { in fbcon_getxy()
2714 unsigned long offset = (pos - vc->vc_origin) / 2; in fbcon_getxy()
2716 x = offset % vc->vc_cols; in fbcon_getxy()
2717 y = offset / vc->vc_cols; in fbcon_getxy()
2718 if (vc->vc_num == fg_console) in fbcon_getxy()
2720 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2721 } else if (vc->vc_num == fg_console && softback_lines) { in fbcon_getxy()
2727 x = offset % vc->vc_cols; in fbcon_getxy()
2728 y = offset / vc->vc_cols; in fbcon_getxy()
2729 ret = pos + (vc->vc_cols - x) * 2; in fbcon_getxy()
2733 ret = vc->vc_origin; in fbcon_getxy()
2737 ret = vc->vc_origin; in fbcon_getxy()
2748 static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt) in fbcon_invert_region() argument
2752 if (!vc->vc_can_do_color) in fbcon_invert_region()
2754 else if (vc->vc_hi_font_mask == 0x100) in fbcon_invert_region()
2764 p = (u16 *) vc->vc_origin; in fbcon_invert_region()
2768 static int fbcon_scrolldelta(struct vc_data *vc, int lines) in fbcon_scrolldelta() argument
2776 if (vc->vc_num != fg_console) in fbcon_scrolldelta()
2778 if (vc->vc_mode != KD_TEXT || !lines) in fbcon_scrolldelta()
2786 if (logo_shown == vc->vc_num) { in fbcon_scrolldelta()
2791 q = vc->vc_origin + in fbcon_scrolldelta()
2792 logo_lines * vc->vc_size_row; in fbcon_scrolldelta()
2798 p -= vc->vc_size_row; in fbcon_scrolldelta()
2799 q -= vc->vc_size_row; in fbcon_scrolldelta()
2801 vc->vc_size_row); in fbcon_scrolldelta()
2804 update_region(vc, vc->vc_origin, in fbcon_scrolldelta()
2805 logo_lines * vc->vc_cols); in fbcon_scrolldelta()
2809 fbcon_cursor(vc, CM_ERASE | CM_SOFTBACK); in fbcon_scrolldelta()
2810 fbcon_redraw_softback(vc, disp, lines); in fbcon_scrolldelta()
2811 fbcon_cursor(vc, CM_DRAW | CM_SOFTBACK); in fbcon_scrolldelta()
2827 if (fbcon_is_inactive(vc, info)) in fbcon_scrolldelta()
2830 fbcon_cursor(vc, CM_ERASE); in fbcon_scrolldelta()
2840 limit -= vc->vc_rows; in fbcon_scrolldelta()
2850 ops->var.yoffset = offset * vc->vc_font.height; in fbcon_scrolldelta()
2854 fbcon_cursor(vc, CM_DRAW); in fbcon_scrolldelta()
2858 static int fbcon_set_origin(struct vc_data *vc) in fbcon_set_origin() argument
2861 fbcon_scrolldelta(vc, softback_lines); in fbcon_set_origin()
2867 struct vc_data *vc = NULL; in fbcon_suspended() local
2872 vc = vc_cons[ops->currcon].d; in fbcon_suspended()
2875 fbcon_cursor(vc, CM_ERASE); in fbcon_suspended()
2880 struct vc_data *vc; in fbcon_resumed() local
2885 vc = vc_cons[ops->currcon].d; in fbcon_resumed()
2887 update_screen(vc); in fbcon_resumed()
2893 struct vc_data *vc; in fbcon_modechanged() local
2899 vc = vc_cons[ops->currcon].d; in fbcon_modechanged()
2900 if (vc->vc_mode != KD_TEXT || in fbcon_modechanged()
2904 p = &fb_display[vc->vc_num]; in fbcon_modechanged()
2905 set_blitting_type(vc, info); in fbcon_modechanged()
2907 if (CON_IS_VISIBLE(vc)) { in fbcon_modechanged()
2911 cols /= vc->vc_font.width; in fbcon_modechanged()
2912 rows /= vc->vc_font.height; in fbcon_modechanged()
2913 vc_resize(vc, cols, rows); in fbcon_modechanged()
2914 updatescrollmode(p, info, vc); in fbcon_modechanged()
2918 if (!fbcon_is_inactive(vc, info)) { in fbcon_modechanged()
2923 fbcon_set_palette(vc, color_table); in fbcon_modechanged()
2924 update_screen(vc); in fbcon_modechanged()
2926 fbcon_update_softback(vc); in fbcon_modechanged()
2933 struct vc_data *vc; in fbcon_set_all_vcs() local
2941 vc = vc_cons[i].d; in fbcon_set_all_vcs()
2942 if (!vc || vc->vc_mode != KD_TEXT || in fbcon_set_all_vcs()
2946 if (CON_IS_VISIBLE(vc)) { in fbcon_set_all_vcs()
2951 p = &fb_display[vc->vc_num]; in fbcon_set_all_vcs()
2952 set_blitting_type(vc, info); in fbcon_set_all_vcs()
2956 cols /= vc->vc_font.width; in fbcon_set_all_vcs()
2957 rows /= vc->vc_font.height; in fbcon_set_all_vcs()
2958 vc_resize(vc, cols, rows); in fbcon_set_all_vcs()
3175 struct vc_data *vc; in fbcon_fb_blanked() local
3180 vc = vc_cons[ops->currcon].d; in fbcon_fb_blanked()
3181 if (vc->vc_mode != KD_TEXT || in fbcon_fb_blanked()
3185 if (CON_IS_VISIBLE(vc)) { in fbcon_fb_blanked()
3197 struct vc_data *vc; in fbcon_new_modelist() local
3206 vc = vc_cons[i].d; in fbcon_new_modelist()
3211 fbcon_set_disp(info, &var, vc->vc_num); in fbcon_new_modelist()
3218 struct vc_data *vc; in fbcon_get_requirement() local
3225 vc = vc_cons[i].d; in fbcon_get_requirement()
3226 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3229 caps->x |= 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3230 caps->y |= 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()
3238 vc = vc_cons[fg_console].d; in fbcon_get_requirement()
3240 if (vc && vc->vc_mode == KD_TEXT && in fbcon_get_requirement()
3243 caps->x = 1 << (vc->vc_font.width - 1); in fbcon_get_requirement()
3244 caps->y = 1 << (vc->vc_font.height - 1); in fbcon_get_requirement()