[PATCH xserver v3] autobind GPUs to the screen

Eric Anholt eric at anholt.net
Fri Mar 17 20:58:10 UTC 2017


Hans de Goede <hdegoede at redhat.com> writes:

> From: Dave Airlie <airlied at redhat.com>
>
> This is a modified version of a patch we've been carry-ing in Fedora and

"carrying"

> RHEL for years now. This patch automatically adds secondary GPUs to the
> master as output sink / offload source making e.g. the use of
> slave-outputs just work, with requiring the user to manually run
> "xrandr --setprovideroutputsource" before he can hookup an external
> monitor to his hybrid graphics laptop.
>
> There is one problem with this patch, which is why it was not upstreamed
> before. What to do when a secondary GPU gets detected really is a policy
> decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
> as such should be under control of the Desktop Environment.
>
> Unconditionally adding autobinding support to the xserver will result
> in races between the DE dealing with the hotplug of a secondary GPU
> and the server itself dealing with it.

Will there actually be races?  In the current patch, at least, doesn't
the new GPU get autoconfigured before the randr change notification goes
out?

> However we've waited for years for any Desktop Environments to actually
> start doing some sort of autoconfiguration of secondary GPUs and there
> is still not a single DE dealing with this, so I believe that it is
> time to upstream this now.
>
> To avoid potential future problems if any DEs get support for doing
> secondary GPU configuration themselves, the new autobind functionality
> is made optional. Since no DEs currently support doing this themselves it
> is enabled by default. When DEs grow support for doing this themselves
> they can disable the servers autobinding through the servers cmdline or a
> xorg.conf snippet.

I think this is a sensible default.  It also helped with getting X up on
my VC4 + CLCD platform.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170317/5232db0e/attachment.sig>


More information about the xorg-devel mailing list