From: sashiko-bot@kernel.org
To: wuqianhai@loongson.cn, chenhuacai@kernel.org, kernel@xen0n.name,
tzimmermann@suse.de, deller@gmx.de, bhelgaas@google.com
Cc: ardb@kernel.org, ilias.apalodimas@linaro.org, javierm@redhat.com,
linux-pci@vger.kernel.org, linux-efi@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 6/6] PCI/VGA: Enable firmware default device detection on LoongArch
Date: Tue, 10 Nov 2026 09:49:56 +0000 [thread overview]
Message-ID: <sashiko-outbox-206807@kernel.org> (raw)
In-Reply-To: <20261110092426.2647976-1-wuqianhai@loongson.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] PCI/VGA: stale screen_info on DT/non-x86 paths in
vga_is_firmware_default()
--
commit cc9285f73294dc9c72f6466431882028a26deb92
Author: wuqianhai <wuqianhai@loongson.cn>
PCI/VGA: Enable firmware default device detection on LoongArch
This commit selects SCREEN_INFO for VGA_ARB on LoongArch and switches
vga_is_firmware_default() from a CONFIG_X86 guard to CONFIG_SCREEN_INFO.
> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
> index 3e58b2c05c854..4528ad0386102 100644
> --- a/drivers/pci/vgaarb.c
> +++ b/drivers/pci/vgaarb.c
> @@ -566,7 +566,7 @@ EXPORT_SYMBOL(vga_put);
>
> static bool vga_is_firmware_default(struct pci_dev *pdev)
> {
> -#if defined CONFIG_X86
> +#ifdef CONFIG_SCREEN_INFO
> return pdev == screen_info_pci_dev(&sysfb_primary_display.screen);
> #else
> return false;
[Severity: Medium]
Does guarding this with CONFIG_SCREEN_INFO cause vga_is_firmware_default()
to read a stale sysfb_primary_display.screen.lfb_base on LoongArch
DeviceTree systems and other non-x86 EFI architectures (such as ARM64, ARM
and RISC-V with CONFIG_SYSFB=y)?
Commit "LoongArch/PCI: Refresh screen_info after resource assignment" only
adds screen_info_apply_fixups() to LoongArch's ACPI pci_acpi_scan_root().
When PCI probing runs via pci_host_probe() (e.g. loongson_pci_probe()) or
generic pci_acpi_scan_root() in drivers/pci/pci-acpi.c,
vga_arb_device_init() runs at subsys_initcall_sync time before
sysfb_init() calls screen_info_apply_fixups() at device_initcall time. If
the firmware framebuffer BAR was relocated during resource assignment or
sits behind a host bridge with a non-zero CPU-to-PCI offset,
screen_info_pci_dev() will not match pdev and fails to select the firmware
default VGA device.
Also, the second paragraph of the commit message says the previous patch
handled screen_info staleness so vga_arb_device_init() no longer needs to
refresh screen_info itself, which looks like leftover commentary from an
earlier version of the series.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110090203.2631481-1-wuqianhai@loongson.cn?part=6
next prev parent reply other threads:[~2026-11-10 9:49 UTC|newest]
Thread overview: 34+ 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 10:11 ` sashiko-bot
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 3:58 ` sashiko-bot
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
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:38 ` sashiko-bot
2026-11-10 9:01 ` [PATCH v3 2/6] LoongArch/PCI: Refresh screen_info after resource assignment wuqianhai
2026-11-10 9:52 ` sashiko-bot
2026-11-10 9:02 ` [PATCH v3 3/6] LoongArch/PCI: Remove vga default device override wuqianhai
2026-11-10 9:41 ` sashiko-bot
2026-11-10 9:24 ` [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection wuqianhai
2026-11-10 9:58 ` sashiko-bot
2026-11-10 9:24 ` [PATCH v3 5/6] efi/libstub: Enable direct sysfb_primary_display access on LoongArch wuqianhai
2026-11-10 9:35 ` sashiko-bot
2026-11-10 9:24 ` [PATCH v3 6/6] PCI/VGA: Enable firmware default device detection " wuqianhai
2026-11-10 9:49 ` sashiko-bot [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2026-11-10 8:57 [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection wuqianhai
2026-11-10 8:57 ` [PATCH v3 6/6] PCI/VGA: Enable firmware default device detection on LoongArch wuqianhai
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=sashiko-outbox-206807@kernel.org \
--to=sashiko-bot@kernel.org \
--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-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tzimmermann@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.