randr: fix xserver crash when xrandr setprovideroutputsource

xrandr --setprovideroutputsource <screen> <gpu screen>
Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU:
Assertion `new->isGPU' failed.

GPUScreen is not allowed to be sink output.

Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Qiang Yu 2017-01-10 18:51:55 +08:00 committed by Peter Hutterer
parent 1012510620
commit 555e0a42d1
1 changed files with 3 additions and 0 deletions

View File

@ -338,6 +338,9 @@ ProcRRSetProviderOutputSource(ClientPtr client)
pScreen = provider->pScreen;
pScrPriv = rrGetScrPriv(pScreen);
if (!pScreen->isGPU)
return BadValue;
pScrPriv->rrProviderSetOutputSource(pScreen, provider, source_provider);
RRInitPrimeSyncProps(pScreen);