diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-09 20:49:19 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-09 20:49:19 -0800 |
| commit | 0c61526621ec1916527d6f6226d8a466340cca22 (patch) | |
| tree | 22ee5ea165acd724cca10cac89659a5f8e2666fe /arch | |
| parent | 33120a2f8fc47f388506b7df1209bd5ac85dd584 (diff) | |
| parent | c5a8f13f1e476c90f4bc184a58751d3e7ff88f2b (diff) | |
Merge tag 'efi-next-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI updates from Ard Biesheuvel:
- Quirk the broken EFI framebuffer geometry on the Valve Steam Deck
- Capture the EDID information of the primary display also on non-x86
EFI systems when booting via the EFI stub.
* tag 'efi-next-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi: Support EDID information
sysfb: Move edid_info into sysfb_primary_display
sysfb: Pass sysfb_primary_display to devices
sysfb: Replace screen_info with sysfb_primary_display
sysfb: Add struct sysfb_display_info
efi: sysfb_efi: Reduce number of references to global screen_info
efi: earlycon: Reduce number of references to global screen_info
efi: sysfb_efi: Fix efidrmfb and simpledrmfb on Valve Steam Deck
efi: sysfb_efi: Convert swap width and height quirk to a callback
efi: sysfb_efi: Fix lfb_linelength calculation when applying quirks
efi: sysfb_efi: Replace open coded swap with the macro
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm64/kernel/image-vars.h | 2 | ||||
| -rw-r--r-- | arch/loongarch/kernel/efi.c | 31 | ||||
| -rw-r--r-- | arch/loongarch/kernel/image-vars.h | 2 | ||||
| -rw-r--r-- | arch/riscv/kernel/image-vars.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/kexec-bzimage64.c | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 16 | ||||
| -rw-r--r-- | arch/x86/video/video-common.c | 4 |
7 files changed, 31 insertions, 30 deletions
diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index 211f0e2e55e2..a9d206e35fc1 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -38,7 +38,7 @@ PROVIDE(__efistub__end = _end); PROVIDE(__efistub___inittext_end = __inittext_end); PROVIDE(__efistub__edata = _edata); #if defined(CONFIG_EFI_EARLYCON) || defined(CONFIG_SYSFB) -PROVIDE(__efistub_screen_info = screen_info); +PROVIDE(__efistub_sysfb_primary_display = sysfb_primary_display); #endif PROVIDE(__efistub__ctype = _ctype); diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c index 52c21c895318..69dd83f8082f 100644 --- a/arch/loongarch/kernel/efi.c +++ b/arch/loongarch/kernel/efi.c @@ -18,7 +18,7 @@ #include <linux/kobject.h> #include <linux/memblock.h> #include <linux/reboot.h> -#include <linux/screen_info.h> +#include <linux/sysfb.h> #include <linux/uaccess.h> #include <asm/early_ioremap.h> @@ -72,30 +72,31 @@ bool efi_poweroff_required(void) (acpi_gbl_reduced_hardware || acpi_no_s5); } -unsigned long __initdata screen_info_table = EFI_INVALID_TABLE_ADDR; +unsigned long __initdata primary_display_table = EFI_INVALID_TABLE_ADDR; #if defined(CONFIG_SYSFB) || defined(CONFIG_EFI_EARLYCON) -struct screen_info screen_info __section(".data"); -EXPORT_SYMBOL_GPL(screen_info); +struct sysfb_display_info sysfb_primary_display __section(".data"); +EXPORT_SYMBOL_GPL(sysfb_primary_display); #endif -static void __init init_screen_info(void) +static void __init init_primary_display(void) { - struct screen_info *si; + struct sysfb_display_info *dpy; - if (screen_info_table == EFI_INVALID_TABLE_ADDR) + if (primary_display_table == EFI_INVALID_TABLE_ADDR) return; - si = early_memremap(screen_info_table, sizeof(*si)); - if (!si) { - pr_err("Could not map screen_info config table\n"); + dpy = early_memremap(primary_display_table, sizeof(*dpy)); + if (!dpy) { + pr_err("Could not map primary_display config table\n"); return; } - screen_info = *si; - memset(si, 0, sizeof(*si)); - early_memunmap(si, sizeof(*si)); + sysfb_primary_display = *dpy; + memset(dpy, 0, sizeof(*dpy)); + early_memunmap(dpy, sizeof(*dpy)); - memblock_reserve(__screen_info_lfb_base(&screen_info), screen_info.lfb_size); + memblock_reserve(__screen_info_lfb_base(&sysfb_primary_display.screen), + sysfb_primary_display.screen.lfb_size); } void __init efi_init(void) @@ -129,7 +130,7 @@ void __init efi_init(void) set_bit(EFI_CONFIG_TABLES, &efi.flags); if (IS_ENABLED(CONFIG_EFI_EARLYCON) || IS_ENABLED(CONFIG_SYSFB)) - init_screen_info(); + init_primary_display(); if (boot_memmap == EFI_INVALID_TABLE_ADDR) return; diff --git a/arch/loongarch/kernel/image-vars.h b/arch/loongarch/kernel/image-vars.h index 41ddcf56d21c..e557ebd46c2b 100644 --- a/arch/loongarch/kernel/image-vars.h +++ b/arch/loongarch/kernel/image-vars.h @@ -12,7 +12,7 @@ __efistub_kernel_entry = kernel_entry; __efistub_kernel_asize = kernel_asize; __efistub_kernel_fsize = kernel_fsize; #if defined(CONFIG_EFI_EARLYCON) || defined(CONFIG_SYSFB) -__efistub_screen_info = screen_info; +__efistub_sysfb_primary_display = sysfb_primary_display; #endif #endif diff --git a/arch/riscv/kernel/image-vars.h b/arch/riscv/kernel/image-vars.h index 3df30dd1c458..3bd9d06a8b8f 100644 --- a/arch/riscv/kernel/image-vars.h +++ b/arch/riscv/kernel/image-vars.h @@ -29,7 +29,7 @@ __efistub__end = _end; __efistub__edata = _edata; __efistub___init_text_end = __init_text_end; #if defined(CONFIG_EFI_EARLYCON) || defined(CONFIG_SYSFB) -__efistub_screen_info = screen_info; +__efistub_sysfb_primary_display = sysfb_primary_display; #endif #endif diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c index c3244ac680d1..7508d0ccc740 100644 --- a/arch/x86/kernel/kexec-bzimage64.c +++ b/arch/x86/kernel/kexec-bzimage64.c @@ -20,6 +20,7 @@ #include <linux/of_fdt.h> #include <linux/efi.h> #include <linux/random.h> +#include <linux/sysfb.h> #include <asm/bootparam.h> #include <asm/setup.h> @@ -303,7 +304,8 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params, params->hdr.hardware_subarch = boot_params.hdr.hardware_subarch; /* Copying screen_info will do? */ - memcpy(¶ms->screen_info, &screen_info, sizeof(struct screen_info)); + memcpy(¶ms->screen_info, &sysfb_primary_display.screen, + sizeof(sysfb_primary_display.screen)); /* Fill in memsize later */ params->screen_info.ext_mem_k = 0; diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 1b2edd07a3e1..d9bfe2032cd9 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -22,6 +22,7 @@ #include <linux/random.h> #include <linux/root_dev.h> #include <linux/static_call.h> +#include <linux/sysfb.h> #include <linux/swiotlb.h> #include <linux/tboot.h> #include <linux/usb/xhci-dbgp.h> @@ -211,12 +212,9 @@ arch_initcall(init_x86_sysctl); /* * Setup options */ -struct screen_info screen_info; -EXPORT_SYMBOL(screen_info); -#if defined(CONFIG_FIRMWARE_EDID) -struct edid_info edid_info; -EXPORT_SYMBOL_GPL(edid_info); -#endif + +struct sysfb_display_info sysfb_primary_display; +EXPORT_SYMBOL(sysfb_primary_display); extern int root_mountflags; @@ -526,9 +524,9 @@ static void __init parse_setup_data(void) static void __init parse_boot_params(void) { ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); - screen_info = boot_params.screen_info; + sysfb_primary_display.screen = boot_params.screen_info; #if defined(CONFIG_FIRMWARE_EDID) - edid_info = boot_params.edid_info; + sysfb_primary_display.edid = boot_params.edid_info; #endif #ifdef CONFIG_X86_32 apm_info.bios = boot_params.apm_bios_info; @@ -1254,7 +1252,7 @@ void __init setup_arch(char **cmdline_p) #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) if (!efi_enabled(EFI_BOOT) || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY)) - vgacon_register_screen(&screen_info); + vgacon_register_screen(&sysfb_primary_display.screen); #endif #endif x86_init.oem.banner(); diff --git a/arch/x86/video/video-common.c b/arch/x86/video/video-common.c index e0aeee99bc99..152789f00fcd 100644 --- a/arch/x86/video/video-common.c +++ b/arch/x86/video/video-common.c @@ -9,7 +9,7 @@ #include <linux/module.h> #include <linux/pci.h> -#include <linux/screen_info.h> +#include <linux/sysfb.h> #include <linux/vgaarb.h> #include <asm/video.h> @@ -29,7 +29,7 @@ EXPORT_SYMBOL(pgprot_framebuffer); bool video_is_primary_device(struct device *dev) { #ifdef CONFIG_SCREEN_INFO - struct screen_info *si = &screen_info; + struct screen_info *si = &sysfb_primary_display.screen; struct resource res[SCREEN_INFO_MAX_RESOURCES]; ssize_t i, numres; #endif |
