[PATCH] video: screen_info: Update framebuffers behind PCI bridges
Javier Martinez Canillas
javierm at redhat.com
Tue Apr 22 21:50:57 UTC 2025
Thomas Zimmermann <tzimmermann at suse.de> writes:
Hello Thomas,
> cc'ing PCI devs
>
> Am 17.04.25 um 09:27 schrieb Thomas Zimmermann:
>> Apply bridge window offsets to screen_info framebuffers during
>> relocation. Fixes invalid access to I/O memory.
>>
>> Resources behind a PCI bridge can be located at a certain offset
>> in the kernel's I/O range. The framebuffer memory range stored in
>> screen_info refers to the offset as seen during boot (essentialy 0).
>> During boot up, the kernel may assign a different memory offset to
>> the bridge device and thereby relocating the framebuffer address of
>> the PCI graphics device as seen by the kernel. The information in
>> screen_info must be updated as well.
>>
>> The helper pcibios_bus_to_resource() performs the relocation of
>> the screen_info resource. The result now matches the I/O-memory
>> resource of the PCI graphics device. As before, we store away the
>> information necessary to update the information in screen_info.
>>
>> Commit 78aa89d1dfba ("firmware/sysfb: Update screen_info for relocated
>> EFI framebuffers") added the code for updating screen_info. It is
>> based on similar functionality that pre-existed in efifb. But efifb
>> did not handle bridges correctly, so the problem presumably exists
>> only on newer systems.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> Reported-by: Tested-by: "Ivan T. Ivanov" <iivanov at suse.de>
>> Closes: https://bugzilla.suse.com/show_bug.cgi?id=1240696
>> Tested-by: Tested-by: "Ivan T. Ivanov" <iivanov at suse.de>
>> Fixes: 78aa89d1dfba ("firmware/sysfb: Update screen_info for relocated EFI framebuffers")
>> Cc: dri-devel at lists.freedesktop.org
>> Cc: <stable at vger.kernel.org> # v6.9+
>> ---
Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
More information about the dri-devel
mailing list