From: Thomas Zimmermann <tzimmermann@suse.de>
To: wuqianhai@loongson.cn, chenhuacai@kernel.org, kernel@xen0n.name,
deller@gmx.de, bhelgaas@google.com
Cc: ardb@kernel.org, ilias.apalodimas@linaro.org, javierm@redhat.com,
loongarch@lists.linux.dev, linux-pci@vger.kernel.org,
linux-efi@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/6] LoongArch: efi: Provide sysfb_primary_display for screen_info users
Date: Tue, 10 Nov 2026 17:25:53 +0100 [thread overview]
Message-ID: <31fdcc5a-c944-43cf-9390-60e8cdd964ed@suse.de> (raw)
In-Reply-To: <20261110085617.2626835-2-wuqianhai@loongson.cn>
Hi
Am 10.11.26 um 09:56 schrieb wuqianhai@loongson.cn:
> From: wuqianhai <wuqianhai@loongson.cn>
>
> LoongArch defines and initializes sysfb_primary_display only when
> CONFIG_SYSFB or CONFIG_EFI_EARLYCON is enabled. The PCI VGA arbiter and
> the framebuffer console need the firmware framebuffer information through
> screen_info whenever CONFIG_SCREEN_INFO is enabled, even if neither of
> those options is set.
>
> Drop the guards so sysfb_primary_display is always defined and
> initialized, and its EFI stub alias is always provided, mirroring x86.
> This avoids selecting SYSFB just to obtain the symbol.
The idea is that you select SYSFB is you're interested in that
information. I guess we could make sysfb_primary_display available if
CONFIG_VGA_ARB=y.
Best regards
Thomas
>
> Signed-off-by: wuqianhai <wuqianhai@loongson.cn>
> ---
> arch/loongarch/kernel/efi.c | 5 +----
> arch/loongarch/kernel/image-vars.h | 2 --
> 2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c
> index 69dd83f8082f..e491a82b2e0d 100644
> --- a/arch/loongarch/kernel/efi.c
> +++ b/arch/loongarch/kernel/efi.c
> @@ -74,10 +74,8 @@ bool efi_poweroff_required(void)
>
> unsigned long __initdata primary_display_table = EFI_INVALID_TABLE_ADDR;
>
> -#if defined(CONFIG_SYSFB) || defined(CONFIG_EFI_EARLYCON)
> struct sysfb_display_info sysfb_primary_display __section(".data");
> EXPORT_SYMBOL_GPL(sysfb_primary_display);
> -#endif
>
> static void __init init_primary_display(void)
> {
> @@ -129,8 +127,7 @@ void __init efi_init(void)
>
> set_bit(EFI_CONFIG_TABLES, &efi.flags);
>
> - if (IS_ENABLED(CONFIG_EFI_EARLYCON) || IS_ENABLED(CONFIG_SYSFB))
> - init_primary_display();
> + 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 e557ebd46c2b..4d1d7978553a 100644
> --- a/arch/loongarch/kernel/image-vars.h
> +++ b/arch/loongarch/kernel/image-vars.h
> @@ -11,9 +11,7 @@ __efistub_strcmp = strcmp;
> __efistub_kernel_entry = kernel_entry;
> __efistub_kernel_asize = kernel_asize;
> __efistub_kernel_fsize = kernel_fsize;
> -#if defined(CONFIG_EFI_EARLYCON) || defined(CONFIG_SYSFB)
> __efistub_sysfb_primary_display = sysfb_primary_display;
> -#endif
>
> #endif
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-11-10 16:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 9:46 [PATCH] PCI/VGA: Fix boot device detection after framebuffer relocation wuqianhai
2026-10-28 23:15 ` Bjorn Helgaas
2026-10-29 3:39 ` wuqianhai
2026-10-29 20:03 ` Bjorn Helgaas
2026-10-29 7:54 ` Thomas Zimmermann
2026-10-29 3:34 ` [PATCH v2] PCI/VGA: Enable firmware default device detection on LoongArch wuqianhai
2026-10-29 8:10 ` Thomas Zimmermann
2026-11-10 8:56 ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device wuqianhai
2026-11-10 8:56 ` [PATCH v3 1/6] LoongArch: efi: Provide sysfb_primary_display for screen_info users wuqianhai
2026-11-10 14:34 ` Thomas Zimmermann
2026-11-10 14:39 ` Thomas Zimmermann
2026-11-10 16:25 ` Thomas Zimmermann [this message]
2026-11-10 8:56 ` [PATCH v3 2/6] LoongArch/PCI: Refresh screen_info after resource assignment wuqianhai
2026-11-10 14:46 ` Thomas Zimmermann
2026-11-10 8:56 ` [PATCH v3 3/6] LoongArch/PCI: Remove vga default device override wuqianhai
2026-11-10 9:01 ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device wuqianhai
2026-11-10 9:01 ` [PATCH v3 1/6] LoongArch: efi: Provide sysfb_primary_display for screen_info users wuqianhai
2026-11-10 9:01 ` [PATCH v3 2/6] LoongArch/PCI: Refresh screen_info after resource assignment wuqianhai
2026-11-10 9:02 ` [PATCH v3 3/6] LoongArch/PCI: Remove vga default device override wuqianhai
2026-11-10 9:24 ` [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection wuqianhai
2026-11-10 9:24 ` [PATCH v3 5/6] efi/libstub: Enable direct sysfb_primary_display access on LoongArch wuqianhai
2026-11-10 9:24 ` [PATCH v3 6/6] PCI/VGA: Enable firmware default device detection " wuqianhai
2026-11-10 10:00 ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device Huacai Chen
2026-10-29 7:00 ` [PATCH] PCI/VGA: Fix boot device detection after framebuffer relocation kernel test robot
2026-10-29 13:30 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31fdcc5a-c944-43cf-9390-60e8cdd964ed@suse.de \
--to=tzimmermann@suse.de \
--cc=ardb@kernel.org \
--cc=bhelgaas@google.com \
--cc=chenhuacai@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=ilias.apalodimas@linaro.org \
--cc=javierm@redhat.com \
--cc=kernel@xen0n.name \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=wuqianhai@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®