All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbcon: Use background color for margins
@ 2017-07-28 20:26 ` David Lechner
  0 siblings, 0 replies; 11+ messages in thread
From: David Lechner @ 2017-07-28 20:26 UTC (permalink / raw)
  To: linux-fbdev; +Cc: David Lechner, Bartlomiej Zolnierkiewicz, linux-kernel

Screens that don't have a black border around the active area will have
ugly black bars for the margin when the text background color is not black.
This is especially noticeable on an LCD screen (not the backlit kind) when
the terminal colors are inverted.

Fix by using the same color for the margin that is used in the regular
clear function.

Signed-off-by: David Lechner <david@lechnology.com>
---
 drivers/video/console/bitblit.c   | 3 ++-
 drivers/video/console/fbcon_ccw.c | 3 ++-
 drivers/video/console/fbcon_cw.c  | 3 ++-
 drivers/video/console/fbcon_ud.c  | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index dbfe4ee..61b182b 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -205,6 +205,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 			      int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.xres - (vc->vc_cols*cw);
@@ -213,7 +214,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = info->var.yres - bh;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 5a3cbf6..80527be 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -191,6 +191,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
 static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.yres - (vc->vc_cols*cw);
@@ -198,7 +199,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = vc->vc_rows*ch;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c
index e7ee44d..58c16a1 100644
--- a/drivers/video/console/fbcon_cw.c
+++ b/drivers/video/console/fbcon_cw.c
@@ -174,6 +174,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
 static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.yres - (vc->vc_cols*cw);
@@ -181,7 +182,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int rs = info->var.yres - rw;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index 19e3714..eea3028 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -222,13 +222,14 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
 static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.xres - (vc->vc_cols*cw);
 	unsigned int bh = info->var.yres - (vc->vc_rows*ch);
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] fbcon: Use background color for margins
@ 2017-07-28 20:26 ` David Lechner
  0 siblings, 0 replies; 11+ messages in thread
From: David Lechner @ 2017-07-28 20:26 UTC (permalink / raw)
  To: linux-fbdev; +Cc: David Lechner, Bartlomiej Zolnierkiewicz, linux-kernel

Screens that don't have a black border around the active area will have
ugly black bars for the margin when the text background color is not black.
This is especially noticeable on an LCD screen (not the backlit kind) when
the terminal colors are inverted.

Fix by using the same color for the margin that is used in the regular
clear function.

Signed-off-by: David Lechner <david@lechnology.com>
---
 drivers/video/console/bitblit.c   | 3 ++-
 drivers/video/console/fbcon_ccw.c | 3 ++-
 drivers/video/console/fbcon_cw.c  | 3 ++-
 drivers/video/console/fbcon_ud.c  | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index dbfe4ee..61b182b 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -205,6 +205,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 			      int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.xres - (vc->vc_cols*cw);
@@ -213,7 +214,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = info->var.yres - bh;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 5a3cbf6..80527be 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -191,6 +191,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
 static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.yres - (vc->vc_cols*cw);
@@ -198,7 +199,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int bs = vc->vc_rows*ch;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c
index e7ee44d..58c16a1 100644
--- a/drivers/video/console/fbcon_cw.c
+++ b/drivers/video/console/fbcon_cw.c
@@ -174,6 +174,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
 static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.yres - (vc->vc_cols*cw);
@@ -181,7 +182,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
 	unsigned int rs = info->var.yres - rw;
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index 19e3714..eea3028 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -222,13 +222,14 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
 static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
 			     int bottom_only)
 {
+	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	unsigned int cw = vc->vc_font.width;
 	unsigned int ch = vc->vc_font.height;
 	unsigned int rw = info->var.xres - (vc->vc_cols*cw);
 	unsigned int bh = info->var.yres - (vc->vc_rows*ch);
 	struct fb_fillrect region;
 
-	region.color = 0;
+	region.color = attr_bgcol_ec(bgshift, vc, info);
 	region.rop = ROP_COPY;
 
 	if (rw && !bottom_only) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
  2017-07-28 20:26 ` David Lechner
@ 2017-07-30  9:47   ` Pavel Machek
  -1 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2017-07-30  9:47 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Hi!

> Screens that don't have a black border around the active area will have
> ugly black bars for the margin when the text background color is not black.
> This is especially noticeable on an LCD screen (not the backlit kind) when
> the terminal colors are inverted.

Are you sure? It is quite common to have different backgrounds in
different parts of the screen, how it is supposed to work there?

								Pavel
								
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
@ 2017-07-30  9:47   ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2017-07-30  9:47 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Hi!

> Screens that don't have a black border around the active area will have
> ugly black bars for the margin when the text background color is not black.
> This is especially noticeable on an LCD screen (not the backlit kind) when
> the terminal colors are inverted.

Are you sure? It is quite common to have different backgrounds in
different parts of the screen, how it is supposed to work there?

								Pavel
								
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
  2017-07-30  9:47   ` Pavel Machek
  (?)
@ 2017-07-30 19:57   ` David Lechner
  2017-07-30 21:51       ` Pavel Machek
  -1 siblings, 1 reply; 11+ messages in thread
From: David Lechner @ 2017-07-30 19:57 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

On 07/30/2017 04:47 AM, Pavel Machek wrote:
> Hi!
> 
>> Screens that don't have a black border around the active area will have
>> ugly black bars for the margin when the text background color is not black.
>> This is especially noticeable on an LCD screen (not the backlit kind) when
>> the terminal colors are inverted.
> 
> Are you sure?

Of course I am sure. Otherwise I would not send a patch. ;-)

I have attached some pictures to explain it better. The 
default-console.jpg picture shows what it looks like using just 
defaults. I think it is hard to read the white text with the black 
background.

So, the solution is to invert the terminal colors. But when you do this, 
the margins are not inverted, so you are left with black bars on the 
bottom and the right as seen in inverted-without-patch.jpg.

With this patch applied, the margins are also inverted, so you don't 
have the black bars as seen in inverted-with-patch.jpg. I think this is 
much nicer.

  It is quite common to have different backgrounds in
> different parts of the screen, how it is supposed to work there?

There will be nothing different in this regard. Only the margins 
(non-text area) are changed.

[-- Attachment #2: default-console.jpg --]
[-- Type: image/jpeg, Size: 27497 bytes --]

[-- Attachment #3: inverted-without-patch.jpg --]
[-- Type: image/jpeg, Size: 29001 bytes --]

[-- Attachment #4: inverted-with-patch.jpg --]
[-- Type: image/jpeg, Size: 28918 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
  2017-07-30 19:57   ` David Lechner
@ 2017-07-30 21:51       ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2017-07-30 21:51 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]

Hi!

> >>Screens that don't have a black border around the active area will have
> >>ugly black bars for the margin when the text background color is not black.
> >>This is especially noticeable on an LCD screen (not the backlit kind) when
> >>the terminal colors are inverted.
> >
> >Are you sure?
> 
> Of course I am sure. Otherwise I would not send a patch. ;-)
> 
> I have attached some pictures to explain it better. The default-console.jpg
> picture shows what it looks like using just defaults. I think it is hard to
> read the white text with the black background.
> 
> So, the solution is to invert the terminal colors. But when you do this, the
> margins are not inverted, so you are left with black bars on the bottom and
> the right as seen in inverted-without-patch.jpg.
> 
> With this patch applied, the margins are also inverted, so you don't have
> the black bars as seen in inverted-with-patch.jpg. I think this is much
> nicer.
> 
>  It is quite common to have different backgrounds in
> >different parts of the screen, how it is supposed to work there?
> 
> There will be nothing different in this regard. Only the margins (non-text
> area) are changed.

So you have something like midnight commander, which uses colors.

Lets say top half of screen is normal, bottom one is inverted. What
color will borders be?

Will not they do something stupid (such as changing) when the
curses-based application refreshes?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
@ 2017-07-30 21:51       ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2017-07-30 21:51 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]

Hi!

> >>Screens that don't have a black border around the active area will have
> >>ugly black bars for the margin when the text background color is not black.
> >>This is especially noticeable on an LCD screen (not the backlit kind) when
> >>the terminal colors are inverted.
> >
> >Are you sure?
> 
> Of course I am sure. Otherwise I would not send a patch. ;-)
> 
> I have attached some pictures to explain it better. The default-console.jpg
> picture shows what it looks like using just defaults. I think it is hard to
> read the white text with the black background.
> 
> So, the solution is to invert the terminal colors. But when you do this, the
> margins are not inverted, so you are left with black bars on the bottom and
> the right as seen in inverted-without-patch.jpg.
> 
> With this patch applied, the margins are also inverted, so you don't have
> the black bars as seen in inverted-with-patch.jpg. I think this is much
> nicer.
> 
>  It is quite common to have different backgrounds in
> >different parts of the screen, how it is supposed to work there?
> 
> There will be nothing different in this regard. Only the margins (non-text
> area) are changed.

So you have something like midnight commander, which uses colors.

Lets say top half of screen is normal, bottom one is inverted. What
color will borders be?

Will not they do something stupid (such as changing) when the
curses-based application refreshes?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
  2017-07-30 21:51       ` Pavel Machek
@ 2017-07-31 17:25         ` David Lechner
  -1 siblings, 0 replies; 11+ messages in thread
From: David Lechner @ 2017-07-31 17:25 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

On 07/30/2017 04:51 PM, Pavel Machek wrote:
> Hi!
> 
>>>> Screens that don't have a black border around the active area will have
>>>> ugly black bars for the margin when the text background color is not black.
>>>> This is especially noticeable on an LCD screen (not the backlit kind) when
>>>> the terminal colors are inverted.
>>>
>>> Are you sure?
>>
>> Of course I am sure. Otherwise I would not send a patch. ;-)
>>
>> I have attached some pictures to explain it better. The default-console.jpg
>> picture shows what it looks like using just defaults. I think it is hard to
>> read the white text with the black background.
>>
>> So, the solution is to invert the terminal colors. But when you do this, the
>> margins are not inverted, so you are left with black bars on the bottom and
>> the right as seen in inverted-without-patch.jpg.
>>
>> With this patch applied, the margins are also inverted, so you don't have
>> the black bars as seen in inverted-with-patch.jpg. I think this is much
>> nicer.
>>
>>   It is quite common to have different backgrounds in
>>> different parts of the screen, how it is supposed to work there?
>>
>> There will be nothing different in this regard. Only the margins (non-text
>> area) are changed.
> 
> So you have something like midnight commander, which uses colors.
> 
> Lets say top half of screen is normal, bottom one is inverted. What
> color will borders be?
> 
> Will not they do something stupid (such as changing) when the
> curses-based application refreshes?
> 

Ah. I see what you mean now. The margin will be whatever is set for the 
vc_video_erase_char in the kernel, which can be changed by userspace. I 
tried midnight commander and sure enough, I still have the black margins 
when I invert the screen (`setterm -inverse on`). Interestingly, after 
allowing the console to blank after a timeout, the console was blanked 
with white, then after pressing a key to unblank, the margins were also 
white.

So, scratch this one. I will re-evaluate and send a new patch.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
@ 2017-07-31 17:25         ` David Lechner
  0 siblings, 0 replies; 11+ messages in thread
From: David Lechner @ 2017-07-31 17:25 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

On 07/30/2017 04:51 PM, Pavel Machek wrote:
> Hi!
> 
>>>> Screens that don't have a black border around the active area will have
>>>> ugly black bars for the margin when the text background color is not black.
>>>> This is especially noticeable on an LCD screen (not the backlit kind) when
>>>> the terminal colors are inverted.
>>>
>>> Are you sure?
>>
>> Of course I am sure. Otherwise I would not send a patch. ;-)
>>
>> I have attached some pictures to explain it better. The default-console.jpg
>> picture shows what it looks like using just defaults. I think it is hard to
>> read the white text with the black background.
>>
>> So, the solution is to invert the terminal colors. But when you do this, the
>> margins are not inverted, so you are left with black bars on the bottom and
>> the right as seen in inverted-without-patch.jpg.
>>
>> With this patch applied, the margins are also inverted, so you don't have
>> the black bars as seen in inverted-with-patch.jpg. I think this is much
>> nicer.
>>
>>   It is quite common to have different backgrounds in
>>> different parts of the screen, how it is supposed to work there?
>>
>> There will be nothing different in this regard. Only the margins (non-text
>> area) are changed.
> 
> So you have something like midnight commander, which uses colors.
> 
> Lets say top half of screen is normal, bottom one is inverted. What
> color will borders be?
> 
> Will not they do something stupid (such as changing) when the
> curses-based application refreshes?
> 

Ah. I see what you mean now. The margin will be whatever is set for the 
vc_video_erase_char in the kernel, which can be changed by userspace. I 
tried midnight commander and sure enough, I still have the black margins 
when I invert the screen (`setterm -inverse on`). Interestingly, after 
allowing the console to blank after a timeout, the console was blanked 
with white, then after pressing a key to unblank, the margins were also 
white.

So, scratch this one. I will re-evaluate and send a new patch.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
  2017-07-31 17:25         ` David Lechner
@ 2017-07-31 21:11           ` Adam Borowski
  -1 siblings, 0 replies; 11+ messages in thread
From: Adam Borowski @ 2017-07-31 21:11 UTC (permalink / raw)
  To: David Lechner
  Cc: Pavel Machek, linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

On Mon, Jul 31, 2017 at 12:25:28PM -0500, David Lechner wrote:
> On 07/30/2017 04:51 PM, Pavel Machek wrote:
> > > > > Screens that don't have a black border around the active area will have
> > > > > ugly black bars for the margin when the text background color is not black.
> > > > > This is especially noticeable on an LCD screen (not the backlit kind) when
> > > > > the terminal colors are inverted.

Also when you have multiple monitors of different resolutions (VT does
mirror them which is quite pointless, but hey, VT is meant for rescue tasks
so for fancy features you'd better use X).

I see this on nouveau which your patch doesn't handle, but we can extend it
to nouveau later.

> Ah. I see what you mean now. The margin will be whatever is set for the
> vc_video_erase_char in the kernel, which can be changed by userspace. I
> tried midnight commander and sure enough, I still have the black margins
> when I invert the screen (`setterm -inverse on`). Interestingly, after
> allowing the console to blank after a timeout, the console was blanked with
> white, then after pressing a key to unblank, the margins were also white.

"setterm -inverse on" looks ugly.

I've just added reverse to my vtgamma (https://github.com/kilobyte/vtgamma),
it uses a different method (setting the palette instead of \e[?5h) which on
VT looks a lot nicer.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition:
⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal
⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs (the five fishes + two breads affair)
⠈⠳⣄⠀⠀⠀⠀ • use glitches to walk on water

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] fbcon: Use background color for margins
@ 2017-07-31 21:11           ` Adam Borowski
  0 siblings, 0 replies; 11+ messages in thread
From: Adam Borowski @ 2017-07-31 21:11 UTC (permalink / raw)
  To: David Lechner
  Cc: Pavel Machek, linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel

On Mon, Jul 31, 2017 at 12:25:28PM -0500, David Lechner wrote:
> On 07/30/2017 04:51 PM, Pavel Machek wrote:
> > > > > Screens that don't have a black border around the active area will have
> > > > > ugly black bars for the margin when the text background color is not black.
> > > > > This is especially noticeable on an LCD screen (not the backlit kind) when
> > > > > the terminal colors are inverted.

Also when you have multiple monitors of different resolutions (VT does
mirror them which is quite pointless, but hey, VT is meant for rescue tasks
so for fancy features you'd better use X).

I see this on nouveau which your patch doesn't handle, but we can extend it
to nouveau later.

> Ah. I see what you mean now. The margin will be whatever is set for the
> vc_video_erase_char in the kernel, which can be changed by userspace. I
> tried midnight commander and sure enough, I still have the black margins
> when I invert the screen (`setterm -inverse on`). Interestingly, after
> allowing the console to blank after a timeout, the console was blanked with
> white, then after pressing a key to unblank, the margins were also white.

"setterm -inverse on" looks ugly.

I've just added reverse to my vtgamma (https://github.com/kilobyte/vtgamma),
it uses a different method (setting the palette instead of \e[?5h) which on
VT looks a lot nicer.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition:
⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal
⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs (the five fishes + two breads affair)
⠈⠳⣄⠀⠀⠀⠀ • use glitches to walk on water

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-07-31 21:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 20:26 [PATCH] fbcon: Use background color for margins David Lechner
2017-07-28 20:26 ` David Lechner
2017-07-30  9:47 ` Pavel Machek
2017-07-30  9:47   ` Pavel Machek
2017-07-30 19:57   ` David Lechner
2017-07-30 21:51     ` Pavel Machek
2017-07-30 21:51       ` Pavel Machek
2017-07-31 17:25       ` David Lechner
2017-07-31 17:25         ` David Lechner
2017-07-31 21:11         ` Adam Borowski
2017-07-31 21:11           ` Adam Borowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.