diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-05-27 16:15:52 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-27 16:15:52 +0200 |
commit | ce1d966a302229a88bcb4398a5ca76d657b06848 (patch) | |
tree | 812671d666fef8b5a955087cff5dc7b3cd555a35 /drivers/firmware/efi/earlycon.c | |
parent | f8af9113b1cf71cd21b0a027d38b06c15989c789 (diff) | |
parent | 9cb1fd0efd195590b828b9b865421ad345a4a145 (diff) | |
download | linux-ce1d966a302229a88bcb4398a5ca76d657b06848.tar.gz linux-ce1d966a302229a88bcb4398a5ca76d657b06848.tar.bz2 linux-ce1d966a302229a88bcb4398a5ca76d657b06848.zip |
Merge tag 'v5.7-rc7' into devel
Linux 5.7-rc7
Diffstat (limited to 'drivers/firmware/efi/earlycon.c')
-rw-r--r-- | drivers/firmware/efi/earlycon.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/firmware/efi/earlycon.c b/drivers/firmware/efi/earlycon.c index 5d4f84781aa0..a52236e11e5f 100644 --- a/drivers/firmware/efi/earlycon.c +++ b/drivers/firmware/efi/earlycon.c @@ -114,14 +114,16 @@ static void efi_earlycon_write_char(u32 *dst, unsigned char c, unsigned int h) const u32 color_black = 0x00000000; const u32 color_white = 0x00ffffff; const u8 *src; - u8 s8; - int m; + int m, n, bytes; + u8 x; - src = font->data + c * font->height; - s8 = *(src + h); + bytes = BITS_TO_BYTES(font->width); + src = font->data + c * font->height * bytes + h * bytes; - for (m = 0; m < 8; m++) { - if ((s8 >> (7 - m)) & 1) + for (m = 0; m < font->width; m++) { + n = m % 8; + x = *(src + m / 8); + if ((x >> (7 - n)) & 1) *dst = color_white; else *dst = color_black; |