2 * linux/drivers/video/dummycon.c -- A dummy console driver
4 * To be used if there's no other console driver (e.g. for plain VGA text)
5 * available, usually until fbcon takes console over.
8 #include <linux/types.h>
9 #include <linux/kdev_t.h>
10 #include <linux/console.h>
11 #include <linux/vt_kern.h>
12 #include <linux/init.h>
13 #include <linux/module.h>
16 * Dummy console driver
20 #define DUMMY_COLUMNS ORIG_VIDEO_COLS
21 #define DUMMY_ROWS ORIG_VIDEO_LINES
22 #elif defined(__hppa__)
23 /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
24 #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
25 #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
27 #define DUMMY_COLUMNS 80
31 static const char *dummycon_startup(void)
33 return "dummy device";
36 static void dummycon_init(struct vc_data *vc, int init)
38 vc->vc_can_do_color = 1;
40 vc->vc_cols = DUMMY_COLUMNS;
41 vc->vc_rows = DUMMY_ROWS;
43 vc_resize(vc, DUMMY_COLUMNS, DUMMY_ROWS);
46 static int dummycon_dummy(void)
51 #define DUMMY (void *)dummycon_dummy
54 * The console `switch' structure for the dummy console
56 * Most of the operations are dummies.
59 const struct consw dummy_con = {
61 .con_startup = dummycon_startup,
62 .con_init = dummycon_init,
72 .con_font_set = DUMMY,
73 .con_font_get = DUMMY,
74 .con_font_default = DUMMY,
75 .con_font_copy = DUMMY,
76 .con_set_palette = DUMMY,
77 .con_scrolldelta = DUMMY,