xserver-multidpi/hw/xfree86
Dave Airlie 078277e4d9 xf86: autobind GPUs to the screen
This is a modified version of a patch we've been carry-ing in Fedora and
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.

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.

Signed-off-by: Dave Airlie <airlied@gmail.com>
[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
---
Changes in v2:
-Make the default enabled instead of installing a xorg.conf
 snippet which enables it unconditionally

Changes in v3:
-Handle GPUScreen autoconfig in randr/rrprovider.c, looking at
 rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c
 looking at xf86CrtcConfig->provider. This fixes the autoconfig not
 working with the nvidia binary driver
2019-08-07 12:26:59 +02:00
..
common xf86: autobind GPUs to the screen 2019-08-07 12:26:59 +02:00
ddc Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
dixmods Fix NO_UNDEFINED build with statically linked fb 2019-08-04 10:28:51 -07:00
doc xfree86: Remove -flippixels 2018-09-27 16:50:22 +00:00
dri hw/xfree86: unvalidated lengths 2017-10-10 23:33:44 +02:00
dri2 xf86: dri2: Use va_gl as VDPAU driver for Intel i965 GPUs 2019-08-06 16:25:39 +02:00
drivers modesetting: Disable pageflipping when using a swcursor 2019-08-06 17:22:02 +02:00
exa meson: Install man pages 2018-03-27 10:28:33 -04:00
fbdevhw xfree86: ensure the readlink buffer is null-terminated 2018-10-17 09:41:15 +10:00
glamor_egl glamor: Make Xv extension initialize at depth 30. 2018-02-27 10:18:06 -05:00
i2c Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
int10 meson: Silence -Wformat-nonliteral for x86emu 2017-10-20 13:15:35 -04:00
loader xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
man xf86: autobind GPUs to the screen 2019-08-07 12:26:59 +02:00
modes xf86: set status to connected for monitors enabled in conf 2019-04-02 19:20:07 +00:00
os-support Fixed ioperm calls in hwEnableIO 2019-05-12 19:50:06 +00:00
parser xfree86: Remove NoTrapSignals 2018-09-12 20:47:15 +00:00
ramdac ramdac: Remove core ramdac code 2019-01-30 21:08:48 +00:00
shadowfb meson: Fix linkage of loadable modules for PE/COFF 2017-10-12 15:22:04 -04:00
utils gtf: Warning fix 2018-04-05 14:18:16 -04:00
vbe meson: Build libvbe.so 2017-04-27 15:19:45 -04:00
vgahw xfree86: Remove -flippixels 2018-09-27 16:50:22 +00:00
x86emu x86emu: Teach the debug code about varargs 2018-01-16 16:08:38 -05:00
xkb Move statically linked xorgxkb files from dixmods to a separate directory 2017-06-27 12:42:06 -04:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
meson.build xfree86: Link fb statically 2019-07-23 14:24:00 -04:00
sdksyms.sh sdksyms.sh: don't embed the build path 2019-08-05 22:19:57 +00:00
xorg-wrapper.c suid: Include sysmacros.h to fix build after glibc-2.25 2017-09-25 13:04:25 -04:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: Remove NoTrapSignals 2018-09-12 20:47:15 +00:00