summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2016-04-29 14:01:30 +1000
committerAdam Jackson <ajax@redhat.com>2016-05-04 15:33:10 -0400
commitfc1f61b75c9712e24ff665f95d62771f39eba1c7 (patch)
treeed6b3ff30afa3495ee99351ec45a895c153f6825 /randr
parent2d0f151c6195ba94d0320b55227a108e6301a74c (diff)
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>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrprovider.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index bbb8e51b3..5329f410b 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -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);