mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/1] splash: fix background color support
@ 2013-03-12 19:59 Jean-Christophe PLAGNIOL-VILLARD
  2013-03-14 14:08 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-03-12 19:59 UTC (permalink / raw)
  To: barebox

the fb info is stored in struct screen by fb_open

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 commands/splash.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/commands/splash.c b/commands/splash.c
index 4cc463e..0955c01 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -13,7 +13,6 @@ static int do_splash(int argc, char *argv[])
 	struct screen sc;
 	int ret, opt, fd;
 	char *fbdev = "/dev/fb0";
-	struct fb_info info;
 	char *image_file;
 	int offscreen = 0;
 	u32 bg_color = 0x00000000;
@@ -21,7 +20,6 @@ static int do_splash(int argc, char *argv[])
 
 	memset(&s, 0, sizeof(s));
 	memset(&sc, 0, sizeof(sc));
-	memset(&info, 0, sizeof(info));
 
 	s.x = -1;
 	s.y = -1;
@@ -61,12 +59,12 @@ static int do_splash(int argc, char *argv[])
 
 	if (sc.offscreenbuf) {
 		if (do_bg)
-			memset_pixel(&info, sc.offscreenbuf, bg_color,
+			memset_pixel(&sc.info, sc.offscreenbuf, bg_color,
 					sc.s.width * sc.s.height);
 		else
 			memcpy(sc.offscreenbuf, sc.fb, sc.fbsize);
 	} else if (do_bg) {
-		memset_pixel(&info, sc.fb, bg_color, sc.s.width * sc.s.height);
+		memset_pixel(&sc.info, sc.fb, bg_color, sc.s.width * sc.s.height);
 	}
 
 	if (image_renderer_file(&sc, &s, image_file) < 0)
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/1] splash: fix background color support
  2013-03-12 19:59 [PATCH 1/1] splash: fix background color support Jean-Christophe PLAGNIOL-VILLARD
@ 2013-03-14 14:08 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-03-14 14:08 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Tue, Mar 12, 2013 at 08:59:09PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> the fb info is stored in struct screen by fb_open
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Applied, thanks

Sascha

> ---
>  commands/splash.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/commands/splash.c b/commands/splash.c
> index 4cc463e..0955c01 100644
> --- a/commands/splash.c
> +++ b/commands/splash.c
> @@ -13,7 +13,6 @@ static int do_splash(int argc, char *argv[])
>  	struct screen sc;
>  	int ret, opt, fd;
>  	char *fbdev = "/dev/fb0";
> -	struct fb_info info;
>  	char *image_file;
>  	int offscreen = 0;
>  	u32 bg_color = 0x00000000;
> @@ -21,7 +20,6 @@ static int do_splash(int argc, char *argv[])
>  
>  	memset(&s, 0, sizeof(s));
>  	memset(&sc, 0, sizeof(sc));
> -	memset(&info, 0, sizeof(info));
>  
>  	s.x = -1;
>  	s.y = -1;
> @@ -61,12 +59,12 @@ static int do_splash(int argc, char *argv[])
>  
>  	if (sc.offscreenbuf) {
>  		if (do_bg)
> -			memset_pixel(&info, sc.offscreenbuf, bg_color,
> +			memset_pixel(&sc.info, sc.offscreenbuf, bg_color,
>  					sc.s.width * sc.s.height);
>  		else
>  			memcpy(sc.offscreenbuf, sc.fb, sc.fbsize);
>  	} else if (do_bg) {
> -		memset_pixel(&info, sc.fb, bg_color, sc.s.width * sc.s.height);
> +		memset_pixel(&sc.info, sc.fb, bg_color, sc.s.width * sc.s.height);
>  	}
>  
>  	if (image_renderer_file(&sc, &s, image_file) < 0)
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-03-14 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12 19:59 [PATCH 1/1] splash: fix background color support Jean-Christophe PLAGNIOL-VILLARD
2013-03-14 14:08 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox