diff options
author | David Lechner <david@lechnology.com> | 2017-08-18 19:56:40 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-08-18 19:56:40 +0200 |
commit | 74c1c8b3326a366d39aa74e1737a28d4cba151c8 (patch) | |
tree | 821b7647c8fc9e41f4b02eb1897d3e7e4569d980 /drivers/video/fbdev/core/fbcon.c | |
parent | 16622a8e7e46fab31fd33ca5a23672385de240f6 (diff) |
fbcon: add fbcon=margin:<color> command line option
This adds a new command line option to select the fbcon margin color.
The motivation for this is screens where black does not blend into the
physical surroundings of the screen. For example, using an LCD (not the
backlit kind), white text on a black background is hard to read, so
inverting the colors is preferred. However, when you do this, most of the
screen is filled with white but the margins are still filled with black.
This makes a big, black, backwards 'L' on the screen. By setting
fbcon=margin:7, the margins will be filled with white and the LCD looks as
expected.
Signed-off-by: David Lechner <david@lechnology.com>
[b.zolnierkie: ported over fbcon changes]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/core/fbcon.c')
-rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index fcd5399949e0..4dd08b4af170 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -138,6 +138,7 @@ static int info_idx = -1; /* console rotation */ static int initial_rotation = -1; static int fbcon_has_sysfs; +static int margin_color; static const struct consw fb_con; @@ -492,6 +493,15 @@ static int __init fb_console_setup(char *this_opt) initial_rotation = 0; continue; } + + if (!strncmp(options, "margin:", 7)) { + options += 7; + if (*options) + margin_color = simple_strtoul(options, &options, 0); + if (margin_color > 7) + margin_color = 0; + continue; + } } return 1; } @@ -1306,7 +1316,7 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) struct fbcon_ops *ops = info->fbcon_par; if (!fbcon_is_inactive(vc, info)) - ops->clear_margins(vc, info, bottom_only); + ops->clear_margins(vc, info, margin_color, bottom_only); } static void fbcon_cursor(struct vc_data *vc, int mode) |