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/screen_info.h>
13 #include <linux/init.h>
14 #include <linux/module.h>
17 * Dummy console driver
21 #define DUMMY_COLUMNS screen_info.orig_video_cols
22 #define DUMMY_ROWS screen_info.orig_video_lines
24 /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
25 #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
26 #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
29 static const char *dummycon_startup(void)
31 return "dummy device";
34 static void dummycon_init(struct vc_data
*vc
, int init
)
36 vc
->vc_can_do_color
= 1;
38 vc
->vc_cols
= DUMMY_COLUMNS
;
39 vc
->vc_rows
= DUMMY_ROWS
;
41 vc_resize(vc
, DUMMY_COLUMNS
, DUMMY_ROWS
);
44 static int dummycon_dummy(void)
49 #define DUMMY (void *)dummycon_dummy
52 * The console `switch' structure for the dummy console
54 * Most of the operations are dummies.
57 const struct consw dummy_con
= {
59 .con_startup
= dummycon_startup
,
60 .con_init
= dummycon_init
,
69 .con_font_set
= DUMMY
,
70 .con_font_default
= DUMMY
,
71 .con_font_copy
= DUMMY
,
73 EXPORT_SYMBOL_GPL(dummy_con
);