Patchwork [U-Boot,07/16] drivers/video/cfb_console.c: Add function console_swap_colors

login
register
mail settings
Submitter Pali Rohár
Date Dec. 17, 2011, 5:03 p.m.
Message ID <1324141398-14859-7-git-send-email-pali.rohar@gmail.com>
Download mbox | patch
Permalink /patch/132008/
State Changes Requested
Headers show

Comments

Pali Rohár - Dec. 17, 2011, 5:03 p.m.
* swap background and text color

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 drivers/video/cfb_console.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Mike Frysinger - Dec. 18, 2011, 6:57 p.m.
On Saturday 17 December 2011 12:03:09 Pali Rohár wrote:
> --- a/drivers/video/cfb_console.c
> +++ b/drivers/video/cfb_console.c
> 
> +static void console_swap_colors(void)
> +{
> +	eorx = fgx;
> +	fgx = bgx;
> +	bgx = eorx;
> +	eorx = fgx ^ bgx;
> +}

there's nothing calling this new func in this patch ...
-mike
Pali Rohár - Dec. 18, 2011, 7 p.m.
On Sunday 18 December 2011 13:57:40 Mike Frysinger wrote:
> On Saturday 17 December 2011 12:03:09 Pali Rohár wrote:
> > --- a/drivers/video/cfb_console.c
> > +++ b/drivers/video/cfb_console.c
> > 
> > +static void console_swap_colors(void)
> > +{
> > +	eorx = fgx;
> > +	fgx = bgx;
> > +	bgx = eorx;
> > +	eorx = fgx ^ bgx;
> > +}
> 
> there's nothing calling this new func in this patch ...
> -mike

This function in needed for ANSI terminal support in Patch 10.
Mike Frysinger - Dec. 18, 2011, 8:06 p.m.
On Sunday 18 December 2011 14:00:10 Pali Rohár wrote:
> On Sunday 18 December 2011 13:57:40 Mike Frysinger wrote:
> > On Saturday 17 December 2011 12:03:09 Pali Rohár wrote:
> > > --- a/drivers/video/cfb_console.c
> > > +++ b/drivers/video/cfb_console.c
> > > 
> > > +static void console_swap_colors(void)
> > > +{
> > > +	eorx = fgx;
> > > +	fgx = bgx;
> > > +	bgx = eorx;
> > > +	eorx = fgx ^ bgx;
> > > +}
> > 
> > there's nothing calling this new func in this patch ...
> 
> This function in needed for ANSI terminal support in Patch 10.

so squash it into the patch where it actually gets used
-mike

Patch

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 9092399..867c789 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -602,6 +602,14 @@  static void video_putchar(int xx, int yy, unsigned char c)
 	video_drawchars(xx, yy + video_logo_height, &c, 1);
 }
 
+static void console_swap_colors(void)
+{
+	eorx = fgx;
+	fgx = bgx;
+	bgx = eorx;
+	eorx = fgx ^ bgx;
+}
+
 #if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
 static void video_set_cursor(void)
 {