mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 2/6] LoongArch/PCI: Refresh screen_info after resource assignment
Date: Tue, 10 Nov 2026 15:46:44 +0100	[thread overview]
Message-ID: <ad517faa-3c8d-43a5-a3d6-8cd6f046f757@suse.de> (raw)
In-Reply-To: <20261110085617.2626835-3-wuqianhai@loongson.cn>

Hi

Am 10.11.26 um 09:56 schrieb wuqianhai@loongson.cn:
> From: wuqianhai <wuqianhai@loongson.cn>
>
> PCI resource assignment runs from acpi_init() at subsys_initcall time.
> The firmware framebuffer BAR can be relocated, leaving screen_info's
> lfb_base stale.  vga_arb_device_init() runs later at subsys_initcall_sync
> time and reads screen_info to identify the firmware default VGA device.
>
> Update screen_info through the generic screen_info_apply_fixups() helper
> right after the root bus resources have been assigned, so both the VGA
> arbiter and sysfb_init() observe the final framebuffer address.

I don't know much about the internals of the PCI subsystem.  But I would 
assume that there's a common function that sets up PCI resources on all 
architectures. And this is the place where we'd want to call 
screen_info_apply_fixups().

Best regards
Thomas


>
> Signed-off-by: wuqianhai <wuqianhai@loongson.cn>
> ---
>   arch/loongarch/pci/acpi.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/arch/loongarch/pci/acpi.c b/arch/loongarch/pci/acpi.c
> index ccbcea61fcd9..cb313ff67f7e 100644
> --- a/arch/loongarch/pci/acpi.c
> +++ b/arch/loongarch/pci/acpi.c
> @@ -9,6 +9,7 @@
>   #include <linux/slab.h>
>   #include <linux/pci-acpi.h>
>   #include <linux/pci-ecam.h>
> +#include <linux/screen_info.h>
>   
>   #include <asm/pci.h>
>   #include <asm/numa.h>
> @@ -256,6 +257,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
>   		 */
>   		pci_assign_unassigned_root_bus_resources(bus);
>   
> +		if (IS_ENABLED(CONFIG_SCREEN_INFO))
> +			screen_info_apply_fixups();
> +
>   		list_for_each_entry(child, &bus->children, node)
>   			pcie_bus_configure_settings(child);
>   	}

-- 
--
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)



  reply	other threads:[~2026-11-10 14:46 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
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 [this message]
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=ad517faa-3c8d-43a5-a3d6-8cd6f046f757@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®