All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] video: Fix splash screen alignment
@ 2013-02-15 13:35 Matthias Weisser
  2013-02-28  1:14 ` Simon Glass
  2013-03-29 11:09 ` Anatolij Gustschin
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Weisser @ 2013-02-15 13:35 UTC (permalink / raw)
  To: u-boot

commit d484b52 "video: Skip bitmaps which do not fit into the screen in
cfb_console" breaks splash screen alignment which is passed in as magic
(BMP_ALIGN_CENTER) x/y coordinates. Moving the check after the alignment block
fixes this.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
---
 drivers/video/cfb_console.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 26f673a..61e1058 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1515,13 +1515,6 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
 
 	padded_line = (((width * bpp + 7) / 8) + 3) & ~0x3;
 
-	/*
-	 * Just ignore elements which are completely beyond screen
-	 * dimensions.
-	 */
-	if ((x >= VIDEO_VISIBLE_COLS) || (y >= VIDEO_VISIBLE_ROWS))
-		return 0;
-
 #ifdef CONFIG_SPLASH_SCREEN_ALIGN
 	if (x == BMP_ALIGN_CENTER)
 		x = max(0, (VIDEO_VISIBLE_COLS - width) / 2);
@@ -1534,6 +1527,13 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
 		y = max(0, VIDEO_VISIBLE_ROWS - height + y + 1);
 #endif /* CONFIG_SPLASH_SCREEN_ALIGN */
 
+	/*
+	 * Just ignore elements which are completely beyond screen
+	 * dimensions.
+	 */
+	if ((x >= VIDEO_VISIBLE_COLS) || (y >= VIDEO_VISIBLE_ROWS))
+		return 0;
+
 	if ((x + width) > VIDEO_VISIBLE_COLS)
 		width = VIDEO_VISIBLE_COLS - x;
 	if ((y + height) > VIDEO_VISIBLE_ROWS)
-- 
1.7.9.5

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

* [U-Boot] [PATCH] video: Fix splash screen alignment
  2013-02-15 13:35 [U-Boot] [PATCH] video: Fix splash screen alignment Matthias Weisser
@ 2013-02-28  1:14 ` Simon Glass
  2013-03-29 11:09 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2013-02-28  1:14 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 15, 2013 at 5:35 AM, Matthias Weisser <weisserm@arcor.de> wrote:
> commit d484b52 "video: Skip bitmaps which do not fit into the screen in
> cfb_console" breaks splash screen alignment which is passed in as magic
> (BMP_ALIGN_CENTER) x/y coordinates. Moving the check after the alignment block
> fixes this.
>
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  drivers/video/cfb_console.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
> index 26f673a..61e1058 100644
> --- a/drivers/video/cfb_console.c
> +++ b/drivers/video/cfb_console.c
> @@ -1515,13 +1515,6 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
>
>         padded_line = (((width * bpp + 7) / 8) + 3) & ~0x3;
>
> -       /*
> -        * Just ignore elements which are completely beyond screen
> -        * dimensions.
> -        */
> -       if ((x >= VIDEO_VISIBLE_COLS) || (y >= VIDEO_VISIBLE_ROWS))
> -               return 0;
> -
>  #ifdef CONFIG_SPLASH_SCREEN_ALIGN
>         if (x == BMP_ALIGN_CENTER)
>                 x = max(0, (VIDEO_VISIBLE_COLS - width) / 2);
> @@ -1534,6 +1527,13 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
>                 y = max(0, VIDEO_VISIBLE_ROWS - height + y + 1);
>  #endif /* CONFIG_SPLASH_SCREEN_ALIGN */
>
> +       /*
> +        * Just ignore elements which are completely beyond screen
> +        * dimensions.
> +        */
> +       if ((x >= VIDEO_VISIBLE_COLS) || (y >= VIDEO_VISIBLE_ROWS))
> +               return 0;
> +
>         if ((x + width) > VIDEO_VISIBLE_COLS)
>                 width = VIDEO_VISIBLE_COLS - x;
>         if ((y + height) > VIDEO_VISIBLE_ROWS)
> --
> 1.7.9.5
>

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

* [U-Boot] [PATCH] video: Fix splash screen alignment
  2013-02-15 13:35 [U-Boot] [PATCH] video: Fix splash screen alignment Matthias Weisser
  2013-02-28  1:14 ` Simon Glass
@ 2013-03-29 11:09 ` Anatolij Gustschin
  1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2013-03-29 11:09 UTC (permalink / raw)
  To: u-boot

Hello,

On Fri, 15 Feb 2013 14:35:12 +0100
Matthias Weisser <weisserm@arcor.de> wrote:

> commit d484b52 "video: Skip bitmaps which do not fit into the screen in
> cfb_console" breaks splash screen alignment which is passed in as magic
> (BMP_ALIGN_CENTER) x/y coordinates. Moving the check after the alignment block
> fixes this.
> 
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>
> ---
>  drivers/video/cfb_console.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

applied, thanks!

Anatolij

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

end of thread, other threads:[~2013-03-29 11:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-15 13:35 [U-Boot] [PATCH] video: Fix splash screen alignment Matthias Weisser
2013-02-28  1:14 ` Simon Glass
2013-03-29 11:09 ` Anatolij Gustschin

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.