linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms
@ 2021-06-25 13:09 Javier Martinez Canillas
  2021-06-25 13:09 ` [PATCH v3 1/2] drivers/firmware: move x86 Generic System Framebuffers support Javier Martinez Canillas
  2021-07-13 16:59 ` [PATCH v3 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms Javier Martinez Canillas
  0 siblings, 2 replies; 14+ messages in thread
From: Javier Martinez Canillas @ 2021-06-25 13:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Zimmermann, Palmer Dabbelt, Russell King, linux-efi,
	Thomas Gleixner, Hans de Goede, x86, Ingo Molnar, Will Deacon,
	Paul Walmsley, linux-riscv, Borislav Petkov, Albert Ou,
	Peter Robinson, dri-devel, linux-arm-kernel, David Airlie,
	Greg Kroah-Hartman, Daniel Vetter, Ard Biesheuvel,
	Catalin Marinas, Atish Patra, Javier Martinez Canillas

The simplefb and simpledrm drivers match against a "simple-framebuffer"
device, but for aarch64 this is only registered when using Device Trees
and there's a node with a "simple-framebuffer" compatible string.

There is no code to register a "simple-framebuffer" platform device when
using EFI instead. In fact, the only platform device that's registered in
this case is an "efi-framebuffer", which means that the efifb driver is
the only driver supported to have an early console with EFI on aarch64.

The x86 architecture platform has a Generic System Framebuffers (sysfb)
support, that register a system frambuffer platform device. It either
registers a "simple-framebuffer" for the simple{fb,drm} drivers or legacy
VGA/EFI FB devices for the vgafb/efifb drivers.

The sysfb is generic enough to be reused by other architectures and can be
moved out of the arch/x86 directory to drivers/firmware, allowing the EFI
logic used by non-x86 architectures to be folded into sysfb as well.

Patch #1 in this series do the former while patch #2 do the latter. It has
been tested on x86_64 and aarch64 machines using the efifb, simplefb and
simpledrm drivers. But more testing will be highly appreciated, to make
sure that no regressions are being introduced by these changes.

The series touches different subystems and will need coordination between
maintainers but the patches have already been acked by the x86 folks. Ard
Biesheuvel said that these could be merged through the EFI tree if needed.

Best regards,
Javier

Changes in v3:
- Add Borislav and Greg Acked-by tags.
- Also update the SYSFB_SIMPLEFB symbol name in drivers/gpu/drm/tiny/Kconfig.
- We have a a max 100 char limit now, use it to avoid multi-line statements.
- Figure out the platform device name before allocating the platform device.

Changes in v2:
- Use default y and depends on X86 instead doing a select in arch/x86/Kconfig.
- Also enable the SYSFB Kconfig option when COMPILE_TEST.
- Improve commit message to explain why is useful for other arches to use this.
- Use "depends on" for the supported architectures instead of selecting it.
- Improve commit message to explain the benefits of reusing sysfb for !X86.

Javier Martinez Canillas (2):
  drivers/firmware: move x86 Generic System Framebuffers support
  drivers/firmware: consolidate EFI framebuffer setup for all arches

 arch/arm/include/asm/efi.h                    |  5 +-
 arch/arm64/include/asm/efi.h                  |  5 +-
 arch/riscv/include/asm/efi.h                  |  5 +-
 arch/x86/Kconfig                              | 26 ------
 arch/x86/kernel/Makefile                      |  3 -
 drivers/firmware/Kconfig                      | 32 +++++++
 drivers/firmware/Makefile                     |  2 +
 drivers/firmware/efi/Makefile                 |  2 +
 drivers/firmware/efi/efi-init.c               | 90 -------------------
 .../firmware/efi}/sysfb_efi.c                 | 78 +++++++++++++++-
 {arch/x86/kernel => drivers/firmware}/sysfb.c | 37 +++++---
 .../firmware}/sysfb_simplefb.c                | 33 ++++---
 drivers/gpu/drm/tiny/Kconfig                  |  4 +-
 .../x86/include/asm => include/linux}/sysfb.h | 32 +++----
 14 files changed, 180 insertions(+), 174 deletions(-)
 rename {arch/x86/kernel => drivers/firmware/efi}/sysfb_efi.c (84%)
 rename {arch/x86/kernel => drivers/firmware}/sysfb.c (75%)
 rename {arch/x86/kernel => drivers/firmware}/sysfb_simplefb.c (81%)
 rename {arch/x86/include/asm => include/linux}/sysfb.h (70%)

-- 
2.31.1


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

end of thread, other threads:[~2021-07-21 11:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 13:09 [PATCH v3 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms Javier Martinez Canillas
2021-06-25 13:09 ` [PATCH v3 1/2] drivers/firmware: move x86 Generic System Framebuffers support Javier Martinez Canillas
2021-07-13 16:59 ` [PATCH v3 0/2] allow simple{fb,drm} drivers to be used on non-x86 EFI platforms Javier Martinez Canillas
2021-07-15  8:11   ` [PATCH v3 0/2] allow simple{fb, drm} " Thomas Zimmermann
2021-07-19  2:59     ` Dave Airlie
2021-07-19  7:10       ` Ard Biesheuvel
2021-07-20 13:01         ` Daniel Vetter
2021-07-20 13:42           ` Javier Martinez Canillas
2021-07-20 13:59             ` Daniel Vetter
2021-07-20 18:38               ` Thomas Zimmermann
2021-07-21  5:09                 ` Javier Martinez Canillas
2021-07-21 10:07                   ` Thomas Zimmermann
2021-07-21 10:15                     ` Javier Martinez Canillas
2021-07-21 11:23                       ` Daniel Vetter

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).