linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver
@ 2022-08-06 16:32 Markuss Broks
  2022-08-06 16:32 ` [PATCH v2 1/3] drivers: serial: earlycon: Correct argument name Markuss Broks
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Markuss Broks @ 2022-08-06 16:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Markuss Broks,
	Jonathan Corbet, Ard Biesheuvel, Greg Kroah-Hartman, Jiri Slaby,
	Helge Deller, Paul E. McKenney, Borislav Petkov, Kees Cook,
	Andrew Morton, Randy Dunlap, Damien Le Moal, Thomas Zimmermann,
	Michal Suchanek, Javier Martinez Canillas, Arnd Bergmann,
	Maarten Lankhorst, Wei Ming Chen, Bartlomiej Zolnierkiewicz,
	Tony Lindgren, linux-doc, linux-efi, linux-serial, linux-fbdev,
	dri-devel

Make the EFI earlycon driver be suitable for any linear framebuffers.
This should be helpful for early porting of boards with no other means of
output, like smartphones/tablets. There seems to be an issue with early_ioremap
function on ARM32, but I am unable to find the exact cause. It appears the mappings
returned by it are somehow incorrect, thus the driver is disabled on ARM. EFI early
console was disabled on IA64 previously because of missing early_memremap_prot,
and this is inherited to this driver.

This patch also changes behavior on EFI systems, by selecting the mapping type
based on if the framebuffer region intersects with system RAM. If it does, it's
common sense that it should be in RAM as a whole, and so the system RAM mapping is
used. It was tested to be working on my PC (Intel Z490 platform), as well as several
ARM64 boards (Samsung Galaxy S9 (Exynos), iPad Air 2, Xiaomi Mi Pad 4, ...).

Markuss Broks (2):
  drivers: serial: earlycon: Pass device-tree node
  efi: earlycon: Add support for generic framebuffers and move to fbdev
    subsystem


v1 -> v2:

- a new patch correcting serial/earlycon.c argument name to "offset" instead
  of "node"
- move IA64 exclusion from EFI earlycon Kconfig to earlycon driver Kconfig
  (IA64 has no early_memremap_prot)
- move driver from fbdev to console subsystem
- select EFI earlycon by default
- fetch stride manually from device-tree, as on some devices it seems stride
  doesn't match the horizontal resolution * bpp.
- use saner format (e.g. 1920x1080x32 instead of 1920,1080,32).

 .../admin-guide/kernel-parameters.txt         |  12 +-
 MAINTAINERS                                   |   5 +
 drivers/firmware/efi/Kconfig                  |   6 +-
 drivers/firmware/efi/Makefile                 |   1 -
 drivers/firmware/efi/earlycon.c               | 246 --------------
 drivers/tty/serial/earlycon.c                 |   3 +
 drivers/video/fbdev/Kconfig                   |  11 +
 drivers/video/fbdev/Makefile                  |   1 +
 drivers/video/fbdev/earlycon.c                | 301 ++++++++++++++++++
 include/linux/serial_core.h                   |   1 +
 10 files changed, 331 insertions(+), 256 deletions(-)
 delete mode 100644 drivers/firmware/efi/earlycon.c
 create mode 100644 drivers/video/fbdev/earlycon.c

-- 
2.37.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-07  9:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06 16:32 [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver Markuss Broks
2022-08-06 16:32 ` [PATCH v2 1/3] drivers: serial: earlycon: Correct argument name Markuss Broks
2022-08-06 16:56   ` Andy Shevchenko
2022-08-08  1:28   ` kernel test robot
2022-08-08 15:55   ` Rob Herring
2022-08-06 16:32 ` [PATCH v2 2/3] drivers: serial: earlycon: Pass device-tree node Markuss Broks
2022-08-06 16:32 ` [PATCH v2 3/3] efi: earlycon: Add support for generic framebuffers and move to console subsystem Markuss Broks
2022-08-06 21:37   ` Andy Shevchenko
2022-08-07 13:16   ` kernel test robot
2022-08-14  0:01   ` kernel test robot
2022-08-14  7:04   ` kernel test robot
2022-09-06 21:52   ` Daniel Vetter
2022-09-07  6:55     ` Thomas Zimmermann
2022-09-07  8:22     ` Arnd Bergmann
2022-09-06 16:54 ` [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).