From 74c1c8b3326a366d39aa74e1737a28d4cba151c8 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 18 Aug 2017 19:56:40 +0200 Subject: fbcon: add fbcon=margin: 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 [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz --- Documentation/fb/fbcon.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation') diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt index 4a9739abc860..1822b190ccd6 100644 --- a/Documentation/fb/fbcon.txt +++ b/Documentation/fb/fbcon.txt @@ -148,6 +148,13 @@ C. Boot options Actually, the underlying fb driver is totally ignorant of console rotation. +5. fbcon=margin: + + This option specifies the color of the margins. The margins are the + leftover area at the right and the bottom of the screen that are not + used by text. By default, this area will be black. The 'color' value + is 0 to 7 where 0 is black and 7 is white. + C. Attaching, Detaching and Unloading Before going on how to attach, detach and unload the framebuffer console, an -- cgit v1.2.3-59-g8ed1b From 176780c7d2fab4ac7b46f217e20db0ce533f27f4 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 4 Sep 2017 16:00:49 +0200 Subject: fbcon: remove restriction on margin color This removes the restriction on the value range of the fbcon=margin: parameter. The color value really depends on the driver being used. Signed-off-by: David Lechner Cc: Geert Uytterhoeven [b.zolnierkie: ported over fbcon changes] Signed-off-by: Bartlomiej Zolnierkiewicz --- Documentation/fb/fbcon.txt | 2 +- drivers/video/fbdev/core/fbcon.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt index 1822b190ccd6..a38d3aa4d189 100644 --- a/Documentation/fb/fbcon.txt +++ b/Documentation/fb/fbcon.txt @@ -153,7 +153,7 @@ C. Boot options This option specifies the color of the margins. The margins are the leftover area at the right and the bottom of the screen that are not used by text. By default, this area will be black. The 'color' value - is 0 to 7 where 0 is black and 7 is white. + is an integer number that depends on the framebuffer driver being used. C. Attaching, Detaching and Unloading diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 4dd08b4af170..04612f938bab 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -498,8 +498,6 @@ static int __init fb_console_setup(char *this_opt) options += 7; if (*options) margin_color = simple_strtoul(options, &options, 0); - if (margin_color > 7) - margin_color = 0; continue; } } -- cgit v1.2.3-59-g8ed1b