Skip to content

Commit fd390ff

Browse files
superm1tdz
authored andcommitted
PCI/VGA: Don't assume the only VGA device on a system is boot_vga
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 <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220712 Tested-by: Aaron Erhardt <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Fixes: ad90860 ("fbcon: Use screen info to find primary device") Tested-by: Luke D. Jones <[email protected]> Signed-off-by: Mario Limonciello (AMD) <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent e8b3627 commit fd390ff

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

drivers/pci/vgaarb.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,13 +652,6 @@ static bool vga_is_boot_device(struct vga_device *vgadev)
652652
return true;
653653
}
654654

655-
/*
656-
* Vgadev has neither IO nor MEM enabled. If we haven't found any
657-
* other VGA devices, it is the best candidate so far.
658-
*/
659-
if (!boot_vga)
660-
return true;
661-
662655
return false;
663656
}
664657

0 commit comments

Comments
 (0)