Skip to content

firmware: sysfb: Consolidate config/code wrt. sysfb_primary_screen

Thomas Zimmermann dri-devel linux-arm-kernel linux-efi linux-fbdev linux-hyperv linux-riscv loongarch stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 14 repliesIn review 2 of 8 applied

Patches in v1 2 of 8 applied

#Subject and filesSizeRepliesApplied
1/8hv: Select CONFIG_SYSFB only for CONFIG_HYPERV_VMBUSdrivers/hv/Kconfig+1 -14 repliesApplied
2/8firmware: efi: Never declare sysfb_primary_display on x86drivers/firmware/efi/efi-init.c+1 -12 repliesApplied
3/8firmware: sysfb: Make CONFIG_SYSFB a user-selectable optiondrivers/firmware/Kconfig drivers/gpu/drm/sysfb/Kconfig drivers/hv/Kconfig +1 more+22 -77 replies
4/8firmware: sysfb: Split sysfb.c into sysfb_primary.c and sysfb_pci.cdrivers/firmware/Makefile drivers/firmware/sysfb.h drivers/firmware/sysfb_pci.c +1 more+47 -250 replies
5/8firmware: sysfb: Implement screen_info relocation for primary displaydrivers/firmware/sysfb.h drivers/firmware/sysfb_pci.c drivers/firmware/sysfb_primary.c +2 more+123 -1150 replies
6/8firmware: sysfb: Avoid forward-declaring sysfb_parent_dev()drivers/firmware/sysfb_primary.c+17 -190 replies
7/8firmware: efi: Make CONFIG_EFI_EARLYCON depend on CONFIG_SYSFB; clean uparch/arm64/kernel/image-vars.h arch/loongarch/kernel/efi.c arch/loongarch/kernel/image-vars.h +4 more+10 -130 replies
8/8firmware: sysfb: Move CONFIG_FIRMWARE_EDID to firmware optionsarch/loongarch/configs/loongson32_defconfig arch/loongarch/configs/loongson64_defconfig drivers/firmware/Kconfig +2 more+23 -200 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchSaurabh Sengar
1/8R-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] firmware: sysfb: Consolidate config/code wrt. sysfb_primary_screen

The global state sysfb_primary_screen holds information about the framebuffer provided by EFI/BIOS systems. It is part of the sysfb module, but used in several places without direct connection to sysfb. Fix this by making users of sysfb_primary_screen depend on CONFIG_SYSFB. Fix a few issues in the process.

Patches 1 and 2 fix general errors in the Kconfig rules. In any case, these patches should be considered even without the rest of the series.

Patch 3 makes CONFIG_SYSFB a user-controlled option, which gives users more control over the configuration.

Patches 4 to 6 slightly refactor the sysfb code. The PCI helpers are now in a separate source file. Support for relocating the PCI framebuffer is now located in sysfb, where it belongs.

Patches 7 and 8 make earlycon and the firmware EDID depend on sysfb. Both rely on sysfb_primary_display to work correctly.

Smoke-tested with bochs on qemu. Built with/without CONFIG_SYSFB enabled.

Note: vgaarb still guards sysfb_primary_display with CONFIG_X86 instead of CONFIG_SYSFB. That works reliably and is left in place, as a change to guard with SYSFB_SYSFB might affect non-x86 systems in unknown ways.

Thomas Zimmermann (8):
hv: Select CONFIG_SYSFB only for CONFIG_HYPERV_VMBUS
firmware: efi: Never declare sysfb_primary_display on x86
firmware: sysfb: Make CONFIG_SYSFB a user-selectable option
firmware: sysfb: Split sysfb.c into sysfb_primary.c and sysfb_pci.c
firmware: sysfb: Implement screen_info relocation for primary display
firmware: sysfb: Avoid forward-declaring sysfb_parent_dev()
firmware: efi: Make CONFIG_EFI_EARLYCON depend on CONFIG_SYSFB; clean
up
firmware: sysfb: Move CONFIG_FIRMWARE_EDID to firmware options

 arch/arm64/kernel/image-vars.h                |   2 +-
 arch/loongarch/configs/loongson32_defconfig   |   1 +
 arch/loongarch/configs/loongson64_defconfig   |   1 +
 arch/loongarch/kernel/efi.c                   |   4 +-
 arch/loongarch/kernel/image-vars.h            |   2 +-
 arch/riscv/kernel/image-vars.h                |   2 +-
 drivers/firmware/Kconfig                      |  38 ++++-
 drivers/firmware/Makefile                     |   7 +-
 drivers/firmware/efi/Kconfig                  |   3 +-
 drivers/firmware/efi/efi-init.c               |   6 +-
 drivers/firmware/efi/libstub/efi-stub-entry.c |   4 +-
 drivers/firmware/sysfb.h                      |  24 ++++
 drivers/firmware/sysfb_pci.c                  | 132 ++++++++++++++++++
 drivers/firmware/{sysfb.c => sysfb_primary.c} |  70 ++++------
 drivers/gpu/drm/sysfb/Kconfig                 |   4 +-
 drivers/hv/Kconfig                            |   2 +-
 drivers/video/Kconfig                         |  19 ---
 drivers/video/fbdev/Kconfig                   |   5 +-
 drivers/video/screen_info_pci.c               | 110 ---------------
 include/linux/screen_info.h                   |   3 -
 20 files changed, 241 insertions(+), 198 deletions(-)
 create mode 100644 drivers/firmware/sysfb.h
 create mode 100644 drivers/firmware/sysfb_pci.c
 rename drivers/firmware/{sysfb.c => sysfb_primary.c} (90%)

base-commit: 5d36e6d54e963f0c1137aaf2249d2baa781f08c2

Signature · 1 line
2.53.0