intel-virtual-output: Copy existing CRTC information

If we fail to disable the remote output during initialisation, copy the
current configuration in order to try and keep the bookkeeping in order.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2014-05-05 14:49:31 +01:00
parent 194f9332d3
commit 464ef44ab1

View File

@@ -560,6 +560,15 @@ static int clone_update_modes__randr(struct clone *clone)
if (disable_crtc(clone->dst.dpy, from_res, from_info->crtc)) {
clone->dst.rr_crtc = 0;
clone->dst.mode.id = 0;
} else {
XRRCrtcInfo *c = XRRGetCrtcInfo(clone->dst.dpy, from_res, from_info->crtc);
if (c) {
clone->dst.x = c->x;
clone->dst.y = c->y;
clone->dst.rotation = c->rotation;
clone->dst.mode.id = c->mode;
XRRFreeCrtcInfo(c);
}
}
}