Hi, > > >> - /* Only deal with VGA class devices */ > > >> - if (!pci_is_vga(pdev)) > > >> + /* Only deal with display devices */ > > >> + if (!pci_is_display(pdev)) > > >> return 0; > > > > > > Are there any other pci_is_vga() users that might want > > > pci_is_display() instead? virtio_gpu_pci_quirk()? > > > > +AlexW for comments on potential virtio changes here. > > I can't comment on virtio_gpu, Cc +Gerd for that. virtio-gpu comes in two variants, with and without vga compatibility mode, and they advertise them self as "display/other" and "display/vga". The driver has some pci_is_vga() checks and they need to stay that way because only the variant with vga compatibility mode has to care about vga compat things. > I do however take issue with the premise of this patch. The VGA > arbiter is for adjusting VGA routing. If neither device is VGA, why > are they registering with the VGA arbiter and what sense does it make > to create a boot_vga sysfs attribute of a non-VGA device? 100% agree. If a device is not vga compatible, why register it with the vga arbiter in the first place? With BIOS support starting to disappear I expect VGA compatibility in GPU will be less and less common, and the concept "primary VGA" will slowly disappear too. > It seems like we're trying to adapt the kernel to create a facade for > userspace when userspace should be falling back to some other means of > determining a primary graphical device. For instance, is there > something in UEFI that could indicate the console? ACPI? DT? I don't think there is the one source of truth here. I expect userspace (with the help of the kernel) needs collect information from multiple sources, then try make a good default choice, and of course offer ways to override that of needed. The VGA arbiter can be one of these sources, but using it as the *only* source looks wrong to me.