randr/provider: only allow slave gpu to be offload sources.

The other way around makes no sense.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2016-04-29 14:01:30 +10:00 committed by Adam Jackson
parent 2d0f151c61
commit fc1f61b75c

View File

@ -325,6 +325,8 @@ ProcRRSetProviderOffloadSink(ClientPtr client)
VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess);
if (!(provider->capabilities & RR_Capability_SourceOffload))
return BadValue;
if (!provider->pScreen->isGPU)
return BadValue;
if (stuff->sink_provider) {
VERIFY_RR_PROVIDER(stuff->sink_provider, sink_provider, DixReadAccess);