diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-11-26 17:03:21 +0100 |
|---|---|---|
| committer | Ard Biesheuvel <ardb@kernel.org> | 2025-12-16 14:12:44 +0100 |
| commit | a41e0ab394e42c7c09ddd8155d2cc3ca17bdce55 (patch) | |
| tree | 3a374077b091def4f2e40b03a3fdd86abac2e2c7 /drivers/video | |
| parent | b945922619b77b95a48f254582ed86f33d24f560 (diff) | |
sysfb: Replace screen_info with sysfb_primary_display
Replace the global screen_info with sysfb_primary_display of type
struct sysfb_display_info. Adapt all users of screen_info.
Instances of screen_info are defined for x86, loongarch and EFI,
with only one instance compiled into a specific build. Replace all
of them with sysfb_primary_display.
All existing users of screen_info are updated by pointing them to
sysfb_primary_display.screen instead. This introduces some churn to
the code, but has no impact on functionality.
Boot parameters and EFI config tables are unchanged. They transfer
screen_info as before. The logic in EFI's alloc_screen_info() changes
slightly, as it now returns the screen field of sysfb_primary_display.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com> # drivers/pci/
Reviewed-by: Richard Lyu <richard.lyu@suse.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/screen_info_pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/screen_info_pci.c b/drivers/video/screen_info_pci.c index 66bfc1d0a6dc..8f34d8a74f09 100644 --- a/drivers/video/screen_info_pci.c +++ b/drivers/video/screen_info_pci.c @@ -4,6 +4,7 @@ #include <linux/printk.h> #include <linux/screen_info.h> #include <linux/string.h> +#include <linux/sysfb.h> static struct pci_dev *screen_info_lfb_pdev; static size_t screen_info_lfb_bar; @@ -26,7 +27,7 @@ static bool __screen_info_relocation_is_valid(const struct screen_info *si, stru void screen_info_apply_fixups(void) { - struct screen_info *si = &screen_info; + struct screen_info *si = &sysfb_primary_display.screen; if (screen_info_lfb_pdev) { struct resource *pr = &screen_info_lfb_pdev->resource[screen_info_lfb_bar]; @@ -75,7 +76,7 @@ static void screen_info_fixup_lfb(struct pci_dev *pdev) .flags = IORESOURCE_MEM, }; const struct resource *pr; - const struct screen_info *si = &screen_info; + const struct screen_info *si = &sysfb_primary_display.screen; if (screen_info_lfb_pdev) return; // already found |
