[PATCH xserver 4/4] xfree86: promote one GPU screen if (NumScreens == 0 && NumGPUScreens > 0)
Gerd Hoffmann
kraxel at redhat.com
Mon Sep 5 14:57:20 UTC 2016
Hi,
> > Why is this otherwise correct, generally speaking ? AFAIK virtio-gpu-pci
> > is needed for Virgil, so I would expect it to become the default graphical
> > card in vms in the future, or is that what virtio-vga is for ?
>
> Yes. Both virtio-vga and virtio-gpu-pci share the VirtIO GPU Device
> part, but only the former has the VGA compat stuff (incl. the legacy
> framebuffer), and only the former qualifies as "primary graphics card"
> at the moment.
>
> I didn't want to mess with the definition of "primary graphics card",
I think "primary" is roughly defined as "where the firmware shows the
boot display on". No idea how the kernel tries to figure that. Using
ACPI? Figuring which device vga ioport access is routed to?
> I think this series could solve that problem as well, without
> customizing on what architecture what kind of card should be considered
> primary / secondary.
>
> > Either way I've a feeling that it would be better to just get
> > virtio-gpu-pci recgonized as primary card rather then doing
> > this moving a gpu from one list to the next trickery, which
> > is likely to break.
How? Seems there is a vga_set_default_device() which the virtio-gpu
kernel driver could use to promote itself. But I have my doubts this is
a good idea to put that kind of policy into the linux kernel driver.
The X-Server has a better view of the system, after scanning for all
display adapters. Having it pick some "secondary" display device in
case there isn't one tagged as "primary" looks reasonable to me,
especially in case there is a single secondary device only.
cheers,
Gerd
More information about the xorg-devel
mailing list