diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-07 09:19:27 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-01-26 16:23:10 -0800 |
commit | df1b401f57ad4b4925bad66684445b476562f26f (patch) | |
tree | 43a575c1e0b71d15dbaee395bef4cb5327b663d7 /randr/rroutput.c | |
parent | 62fcd364ac8c71a2db1db84b17b17cade6832492 (diff) |
randr: attempt to fix primary on slave output (v2)
If the user wants to set one of the slave devices as
the primary output, we shouldn't fail to do so,
we were returning BadMatch which was tripping up
gnome-settings-daemon and bad things ensues.
Fix all the places we use primaryOutput to work
out primaryCrtc and take it into a/c when slave
gpus are in use.
v2: review from Aaron, fix indent, unhide has_primary from
macro. I left the int vs Bool alone to be consistent with
code below, a future patch could fix both.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r-- | randr/rroutput.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c index 5d46faca1..548e07d1d 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -541,7 +541,11 @@ ProcRRSetOutputPrimary(ClientPtr client) if (stuff->output) { VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); - if (output->pScreen != pWin->drawable.pScreen) { + if (!output->pScreen->isGPU && output->pScreen != pWin->drawable.pScreen) { + client->errorValue = stuff->window; + return BadMatch; + } + if (output->pScreen->isGPU && output->pScreen->current_master != pWin->drawable.pScreen) { client->errorValue = stuff->window; return BadMatch; } |