[PATCH weston 1/2] pci: add PCI helpers to detect primary GPUs

Sannu K sannumail4foss at gmail.com
Sat Oct 27 11:38:55 PDT 2012

On Sat, Oct 27, 2012 at 6:24 PM, David Herrmann
<dh.herrmann at googlemail.com> wrote:
> This adds one global helper which returns a string describing the primary
> PCI GPU. This string can later be used to compare with drmGetBusid() to
> check whether a given DRM GPU is the primary GPU.

What do you mean by the term "Primary GPU"? Is it the GPU that is
currently used for acceleration (consider the case where there is
Intel and nVidia GPU and currently nVidia GPU is used for doing the 3D
stuff - should I call nVidia GPU primary)?

> +               ++num;
> +               if (!pci_device_is_boot_vga(dev))
> +                       continue;
> +

Is it reasonable to generalize boot GPU as Primary GPU? In a system
with 2 GPUs (say nvidia and intel), Intel GPU is used at boot time and
once there is a need for more power nvidia GPU is used and Intel's is
switched off. Will this case happen in practice and valid (if GPU
switching support is made available)? In this case which GPU is
considered primary GPU? If Intel (as it was boot VGA) - why this when
nvidia is currently getting used for 3D stuff?

Why VGA is only considered (I am not sure if VGA is used to denote all
displays)? There are lot of systems without VGA adapter only with HDMI

Thanks and Regards,
Sannu K

More information about the wayland-devel mailing list