Skip to content

arch,sysfb,efi: Support EDID on non-x86 EFI systems

Thomas Zimmermann dri-devel linux-arm-kernel linux-efi linux-fbdev linux-hyperv linux-pci linux-riscv lkml loongarch 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 9 repliesIn review 4 of 9 applied
  2. v210 patches 4 repliesSuperseded
  3. v16 patches 14 repliesSuperseded

Changes in v3 from the cover letter

- replace SCREEN_INFO table entry (Ard)
- merge libstub patch into kernel patch

Patches in v3 4 of 9 applied

#Subject and filesSizeRepliesApplied
1/9efi: earlycon: Reduce number of references to global screen_infodrivers/firmware/efi/earlycon.c+20 -200 repliesApplied
2/9efi: sysfb_efi: Reduce number of references to global screen_infodrivers/firmware/efi/sysfb_efi.c drivers/firmware/sysfb.c drivers/firmware/sysfb_simplefb.c +1 more+51 -450 replies
3/9sysfb: Add struct sysfb_display_infoinclude/linux/sysfb.h+5 -01 replyApplied
4/9sysfb: Replace screen_info with sysfb_primary_displayarch/arm64/kernel/image-vars.h arch/loongarch/kernel/efi.c arch/loongarch/kernel/image-vars.h +14 more+66 -531 reply
5/9sysfb: Pass sysfb_primary_display to devicesdrivers/firmware/sysfb.c drivers/gpu/drm/sysfb/efidrm.c drivers/gpu/drm/sysfb/vesadrm.c +3 more+32 -191 replyApplied
6/9sysfb: Move edid_info into sysfb_primary_displayarch/x86/kernel/setup.c drivers/gpu/drm/sysfb/efidrm.c drivers/gpu/drm/sysfb/vesadrm.c +3 more+16 -180 repliesApplied
7/9efi: Refactor init_primary_display() helpersarch/loongarch/kernel/efi.c drivers/firmware/efi/efi-init.c+21 -201 reply
8/9efi: Support EDID informationarch/loongarch/kernel/efi.c drivers/firmware/efi/efi-init.c drivers/firmware/efi/efi.c +9 more+123 -1060 replies
9/9efi: libstub: Simplify interfaces for primary_displaydrivers/firmware/efi/libstub/efi-stub-entry.c drivers/firmware/efi/libstub/efi-stub.c drivers/firmware/efi/libstub/efistub.h +2 more+42 -282 replies

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchArnd BergmannArd BiesheuvelBjorn HelgaasRichard Lyu
1/9A-b A-b R-b
2/9A-b A-b R-b
3/9A-b A-b R-b
4/9A-b A-b A-b R-b
5/9A-b A-b R-b
6/9A-b A-b
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/9] arch,sysfb,efi: Support EDID on non-x86 EFI systems

Replace screen_info and edid_info with sysfb_primary_device of type struct sysfb_display_info. Update all users. Then implement EDID support in the kernel EFI code.

Sysfb DRM drivers currently fetch the global edid_info directly, when they should get that information together with the screen_info from their device. Wrapping screen_info and edid_info in sysfb_primary_display and passing this to drivers enables this.

Replacing both with sysfb_primary_display has been motivate by the EFI stub. EFI wants to transfer EDID via config table in a single entry. Using struct sysfb_display_info this will become easily possible. Hence accept some churn in architecture code for the long-term improvements.

Patches 1 and 2 reduce the exposure of screen_info in EFI-related code.

Patch 3 adds struct sysfb_display_info.

Patch 4 replaces scren_info with sysfb_primary_display. This results in several changes throught the kernel, but is really just a refactoring.

Patch 5 updates sysfb to transfer sysfb_primary_display to the related drivers.

Patch 6 moves edid_info into sysfb_primary_display. This resolves some drivers' reference to the global edid_info, but also makes the EDID data available on non-x86 architectures.

Patches 7 and 8 add support for EDID transfers on non-x86 EFI systems.

Patch 9 cleans up the config-table allocation to be easier to understand.

v3:
- replace SCREEN_INFO table entry (Ard)
- merge libstub patch into kernel patch
v2:
- combine v1 of the series at [1] plus changes from [2] and [3].

[1] https://lore.kernel.org/dri-devel/[email protected]/
[2] https://lore.kernel.org/dri-devel/[email protected]/
[3] https://lore.kernel.org/linux-efi/[email protected]/

Thomas Zimmermann (9):
efi: earlycon: Reduce number of references to global screen_info
efi: sysfb_efi: Reduce number of references to global screen_info
sysfb: Add struct sysfb_display_info
sysfb: Replace screen_info with sysfb_primary_display
sysfb: Pass sysfb_primary_display to devices
sysfb: Move edid_info into sysfb_primary_display
efi: Refactor init_primary_display() helpers
efi: Support EDID information
efi: libstub: Simplify interfaces for primary_display

 arch/arm64/kernel/image-vars.h                |  2 +-
 arch/loongarch/kernel/efi.c                   | 38 ++++-----
 arch/loongarch/kernel/image-vars.h            |  2 +-
 arch/riscv/kernel/image-vars.h                |  2 +-
 arch/x86/kernel/kexec-bzimage64.c             |  4 +-
 arch/x86/kernel/setup.c                       | 16 ++--
 arch/x86/video/video-common.c                 |  4 +-
 drivers/firmware/efi/earlycon.c               | 42 +++++-----
 drivers/firmware/efi/efi-init.c               | 46 ++++++-----
 drivers/firmware/efi/efi.c                    |  4 +-
 drivers/firmware/efi/libstub/Makefile         |  2 +-
 drivers/firmware/efi/libstub/efi-stub-entry.c | 36 +++++++--
 drivers/firmware/efi/libstub/efi-stub.c       | 49 +++++++----
 drivers/firmware/efi/libstub/efistub.h        |  7 +-
 .../firmware/efi/libstub/primary_display.c    | 41 ++++++++++
 drivers/firmware/efi/libstub/screen_info.c    | 53 ------------
 drivers/firmware/efi/libstub/zboot.c          |  6 +-
 drivers/firmware/efi/sysfb_efi.c              | 81 ++++++++++---------
 drivers/firmware/sysfb.c                      | 13 +--
 drivers/firmware/sysfb_simplefb.c             |  2 +-
 drivers/gpu/drm/sysfb/efidrm.c                | 14 ++--
 drivers/gpu/drm/sysfb/vesadrm.c               | 14 ++--
 drivers/hv/vmbus_drv.c                        |  6 +-
 drivers/pci/vgaarb.c                          |  4 +-
 drivers/video/Kconfig                         |  8 +-
 drivers/video/fbdev/core/fbmon.c              |  8 +-
 drivers/video/fbdev/efifb.c                   | 10 ++-
 drivers/video/fbdev/vesafb.c                  | 10 ++-
 drivers/video/fbdev/vga16fb.c                 |  8 +-
 drivers/video/screen_info_pci.c               |  5 +-
 include/linux/efi.h                           |  9 ++-
 include/linux/screen_info.h                   |  2 -
 include/linux/sysfb.h                         | 23 ++++--
 include/video/edid.h                          |  4 -
 34 files changed, 321 insertions(+), 254 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/primary_display.c
 delete mode 100644 drivers/firmware/efi/libstub/screen_info.c

base-commit: d724c6f85e80a23ed46b7ebc6e38b527c09d64f5

Signature · 1 line
2.51.1