Skip to contentSkip to conversation

video: Fix splash screen alignment

PATCH New Matthias Weisser 3 participants 3 messages Feb 15, 2013 – Mar 29, 2013 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: Fix splash screen alignment

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.

---
 drivers/video/cfb_console.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/video/cfb_console.c +7 -7
index 26f673a..61e1058 100644
@@ -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)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 video: Fix splash screen alignment

Quoted 6 lines · Matthias Weisser

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.

Quoted 39 lines
---
 drivers/video/cfb_console.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/video/cfb_console.c +7 -8
index 26f673a..61e1058 100644
@@ -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

#2 lore raw

PATCH 1/1 video: Fix splash screen alignment

In reply to Matthias Weisser

Hello,

Quoted 9 lines · On Fri, 15 Feb 2013 14:35:12 +0100 Matthias Weisser <[email protected]> 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.

---
 drivers/video/cfb_console.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

applied, thanks!

Anatolij