efi/earlycon: Fix early printk for wider fonts
authorDave Young <dyoung@redhat.com>
Sun, 12 Apr 2020 02:49:27 +0000 (10:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Jun 2020 11:16:45 +0000 (13:16 +0200)
commit98b034fecfc32a2abe27bf1d88ea5b9f4591c64f
tree5a56e2c45a4851c8e68835f18fbeae9e9ef26ada
parentbe1c731c666bf0f076fd7ba22d03e8c10ba18fab
efi/earlycon: Fix early printk for wider fonts

[ Upstream commit 8f592ada59b321d248391bae175cd78a12972223 ]

When I play with terminus fonts I noticed the efi early printk does
not work because the earlycon code assumes font width is 8.

Here add the code to adapt with larger fonts.  Tested with all kinds
of kernel built-in fonts on my laptop. Also tested with a local draft
patch for 14x28 !bold terminus font.

Signed-off-by: Dave Young <dyoung@redhat.com>
Link: https://lore.kernel.org/r/20200412024927.GA6884@dhcp-128-65.nay.redhat.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/earlycon.c