@@ -213,7 +213,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 = vc->vc_decscnm ? 7 : 0;
region.rop = ROP_COPY;
if (rw && !bottom_only) {
@@ -198,7 +198,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 = vc->vc_decscnm ? 7 : 0;
region.rop = ROP_COPY;
if (rw && !bottom_only) {
@@ -181,7 +181,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 = vc->vc_decscnm ? 7 : 0;
region.rop = ROP_COPY;
if (rw && !bottom_only) {
@@ -228,7 +228,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
unsigned int bh = info->var.yres - (vc->vc_rows*ch);
struct fb_fillrect region;
- region.color = 0;
+ region.color = vc->vc_decscnm ? 7 : 0;
region.rop = ROP_COPY;
if (rw && !bottom_only) {
This uses white (7) for the margin color when a fbcon terminal is inverted, e.g. with `setterm -inverse on`. The motivation for this is screens where the black does not blend into 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, if the margins are not also inverted, it leaves ugly black bars on the right and bottom of the text area. Signed-off-by: David Lechner <david@lechnology.com> --- drivers/video/console/bitblit.c | 2 +- drivers/video/console/fbcon_ccw.c | 2 +- drivers/video/console/fbcon_cw.c | 2 +- drivers/video/console/fbcon_ud.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)