summaryrefslogtreecommitdiff
path: root/randr/randrstr.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-08-17 09:49:24 +1000
committerHans de Goede <hdegoede@redhat.com>2019-08-07 12:26:59 +0200
commit078277e4d92f05a90c4715d61b89b9d9d38d68ea (patch)
tree95087ae8210e016e111594e64cd4a47a5fc927ca /randr/randrstr.h
parentfbd2bb9dd047a206b9c8cfaca62079c8d866c617 (diff)
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
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r--randr/randrstr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 2cede92e3..c6edae2dc 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -1042,6 +1042,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
extern _X_EXPORT void
RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+extern _X_EXPORT void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
+
/* rrproviderproperty.c */
extern _X_EXPORT void