* [PATCH v2 RESEND] PCI/VGA: Don't assume the only VGA device on a system is `boot_vga`
@ 2026-01-06 4:46 Mario Limonciello (AMD)
2026-01-06 7:18 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello (AMD) @ 2026-01-06 4:46 UTC (permalink / raw)
To: Bjorn Helgaas, open list:PCI SUBSYSTEM
Cc: Mario Limonciello (AMD), Aaron Erhardt, Thomas Zimmermann,
Luke D . Jones
Some systems ship with multiple display class devices but not all
of them are VGA devices. If the "only" VGA device on the system is not
used for displaying the image on the screen marking it as `boot_vga`
because nothing was found is totally wrong.
This behavior actually leads to mistakes of the wrong device being
advertised to userspace and then userspace can make incorrect decisions.
As there is an accurate `boot_display` sysfs file stop lying about
`boot_vga` by assuming if nothing is found it's the right device.
Reported-by: Aaron Erhardt <aer@tuxedocomputers.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220712
Tested-by: Aaron Erhardt <aer@tuxedocomputers.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: ad90860bd10ee ("fbcon: Use screen info to find primary device")
Tested-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
This was probably lost in the holiday shuffle, so resend it.
v2: https://lore.kernel.org/linux-pci/20251214183602.150412-1-superm1@kernel.org/
drivers/pci/vgaarb.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
index 436fa7f4c3873..baa242b140993 100644
--- a/drivers/pci/vgaarb.c
+++ b/drivers/pci/vgaarb.c
@@ -652,13 +652,6 @@ static bool vga_is_boot_device(struct vga_device *vgadev)
return true;
}
- /*
- * Vgadev has neither IO nor MEM enabled. If we haven't found any
- * other VGA devices, it is the best candidate so far.
- */
- if (!boot_vga)
- return true;
-
return false;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2 RESEND] PCI/VGA: Don't assume the only VGA device on a system is `boot_vga`
2026-01-06 4:46 [PATCH v2 RESEND] PCI/VGA: Don't assume the only VGA device on a system is `boot_vga` Mario Limonciello (AMD)
@ 2026-01-06 7:18 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2026-01-06 7:18 UTC (permalink / raw)
To: Mario Limonciello (AMD), Bjorn Helgaas, open list:PCI SUBSYSTEM
Cc: Aaron Erhardt, Luke D . Jones
Hi
Am 06.01.26 um 05:46 schrieb Mario Limonciello (AMD):
> Some systems ship with multiple display class devices but not all
> of them are VGA devices. If the "only" VGA device on the system is not
> used for displaying the image on the screen marking it as `boot_vga`
> because nothing was found is totally wrong.
>
> This behavior actually leads to mistakes of the wrong device being
> advertised to userspace and then userspace can make incorrect decisions.
>
> As there is an accurate `boot_display` sysfs file stop lying about
> `boot_vga` by assuming if nothing is found it's the right device.
>
> Reported-by: Aaron Erhardt <aer@tuxedocomputers.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220712
> Tested-by: Aaron Erhardt <aer@tuxedocomputers.com>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: ad90860bd10ee ("fbcon: Use screen info to find primary device")
> Tested-by: Luke D. Jones <luke@ljones.dev>
> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> This was probably lost in the holiday shuffle, so resend it.
Merged now into drm-misc-fixes.
Best regards
Thomas
> v2: https://lore.kernel.org/linux-pci/20251214183602.150412-1-superm1@kernel.org/
> drivers/pci/vgaarb.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
> index 436fa7f4c3873..baa242b140993 100644
> --- a/drivers/pci/vgaarb.c
> +++ b/drivers/pci/vgaarb.c
> @@ -652,13 +652,6 @@ static bool vga_is_boot_device(struct vga_device *vgadev)
> return true;
> }
>
> - /*
> - * Vgadev has neither IO nor MEM enabled. If we haven't found any
> - * other VGA devices, it is the best candidate so far.
> - */
> - if (!boot_vga)
> - return true;
> -
> return false;
> }
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-06 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 4:46 [PATCH v2 RESEND] PCI/VGA: Don't assume the only VGA device on a system is `boot_vga` Mario Limonciello (AMD)
2026-01-06 7:18 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox