fbcon: clear the logo bitmap from the margin area
authorKamal Mostafa <kamal@whence.com>
Fri, 22 Feb 2013 00:42:07 +0000 (16:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 01:22:16 +0000 (17:22 -0800)
Explicitly clear_margins when clearing the logo, in case the font dimensions
are non-integral to the framebuffer dimensions.

Signed-off-by: Kamal Mostafa <kamal@whence.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/console/fbcon.c

index fdefa8fd72c4da070787d95260b2744d6a9a7dab..f8a61e210d2e63469d3196a97aee5cb704e9f940 100644 (file)
@@ -1242,8 +1242,16 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
        if (!height || !width)
                return;
 
-       if (sy < vc->vc_top && vc->vc_top == logo_lines)
+       if (sy < vc->vc_top && vc->vc_top == logo_lines) {
                vc->vc_top = 0;
+               /*
+                * If the font dimensions are not an integral of the display
+                * dimensions then the ops->clear below won't end up clearing
+                * the margins.  Call clear_margins here in case the logo
+                * bitmap stretched into the margin area.
+                */
+               fbcon_clear_margins(vc, 0);
+       }
 
        /* Split blits that cross physical y_wrap boundary */