Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715364 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2017-08-18 20:30 +0200 |
| Last post | 2017-08-23 18:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3] fbcon: add fbcon=margin:<color> command line option Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-18 20:30 +0200
Re: [PATCH v3] fbcon: add fbcon=margin:<color> command line option David Lechner <david@lechnology.com> - 2017-08-18 21:20 +0200
Re: [PATCH v3] fbcon: add fbcon=margin:<color> command line option David Lechner <david@lechnology.com> - 2017-08-23 18:00 +0200
Re: [PATCH v3] fbcon: add fbcon=margin:<color> command line option Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-08-23 18:00 +0200
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-08-18 20:30 +0200 |
| Subject | Re: [PATCH v3] fbcon: add fbcon=margin:<color> command line option |
| Message-ID | <ufUbT-7p6-3@gated-at.bofh.it> |
Hi David,
On Tue, Aug 1, 2017 at 6:35 PM, David Lechner <david@lechnology.com> wrote:
> 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>
> --- 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:<color>
> +
> + 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.
> +
Given the standard console palette contains 16 colors, why limit this to
the first 8 colors, and not 0 to 15?
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -137,6 +137,7 @@ static int info_idx = -1;
> /* console rotation */
> static int initial_rotation;
> static int fbcon_has_sysfs;
> +static int margin_color;
>
> static const struct consw fb_con;
>
> @@ -491,6 +492,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;
> + }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-18 21:20 +0200 |
| Message-ID | <ufUYi-7Um-5@gated-at.bofh.it> |
| In reply to | #1715364 |
On 08/18/2017 01:21 PM, Geert Uytterhoeven wrote: > Hi David, > > On Tue, Aug 1, 2017 at 6:35 PM, David Lechner <david@lechnology.com> wrote: >> 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> > >> --- 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:<color> >> + >> + 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. >> + > > Given the standard console palette contains 16 colors, why limit this to > the first 8 colors, and not 0 to 15? Good question. I think in some of my previous attempts there was a 0x7 mask involved somewhere and this is a carryover from that. But, after having looked at this again, I don't see a reason for limiting to 7.
[toc] | [prev] | [next] | [standalone]
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-08-23 18:00 +0200 |
| Message-ID | <uhGet-2rq-3@gated-at.bofh.it> |
| In reply to | #1715391 |
On 08/23/2017 10:56 AM, Bartlomiej Zolnierkiewicz wrote: > >>> >>> Given the standard console palette contains 16 colors, why limit this to >>> the first 8 colors, and not 0 to 15? >> >> Good question. I think in some of my previous attempts there was a 0x7 >> mask involved somewhere and this is a carryover from that. But, after >> having looked at this again, I don't see a reason for limiting to 7. > > Could you please prepare the incremental patch raising the number of colors > possible to use? Yes, I will do this.
[toc] | [prev] | [next] | [standalone]
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2017-08-23 18:00 +0200 |
| Message-ID | <uhGet-2rq-7@gated-at.bofh.it> |
| In reply to | #1715391 |
Hi, On Friday, August 18, 2017 02:19:28 PM David Lechner wrote: > On 08/18/2017 01:21 PM, Geert Uytterhoeven wrote: > > Hi David, > > > > On Tue, Aug 1, 2017 at 6:35 PM, David Lechner <david@lechnology.com> wrote: > >> 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> > > > >> --- 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:<color> > >> + > >> + 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. > >> + > > > > Given the standard console palette contains 16 colors, why limit this to > > the first 8 colors, and not 0 to 15? > > Good question. I think in some of my previous attempts there was a 0x7 > mask involved somewhere and this is a carryover from that. But, after > having looked at this again, I don't see a reason for limiting to 7. Could you please prepare the incremental patch raising the number of colors possible to use? Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web