Commit d484b52e authored by Vadim Bendebury's avatar Vadim Bendebury Committed by Anatolij Gustschin
Browse files

video: Skip bitmaps which do not fit into the screen in cfb_console

The cfb console driver is trying to prevent bitmaps to spill over the
screen, but the calculations assume that at least part of the bitmap
fits into the screen area. In reality there could be bitmap elements
which are completely out of the screen area, they just need to be
Signed-off-by: default avatarVadim Bendebury <>
Signed-off-by: default avatarSimon Glass <>
parent 45d7f525
......@@ -1515,6 +1515,13 @@ 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.
return 0;
x = max(0, (VIDEO_VISIBLE_COLS - width) / 2);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment