intel-virtual-output: Clone remote EDID for virtual outputs

References: https://bugs.freedesktop.org/show_bug.cgi?id=72020
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-11-26 09:41:42 +00:00
parent 63a964d6d0
commit 36ac68bedd
1 changed files with 18 additions and 0 deletions

View File

@ -417,6 +417,23 @@ static XRRModeInfo *lookup_mode(XRRScreenResources *res, int id)
return NULL;
}
static void clone_update_edid(struct clone *clone)
{
unsigned long nitems, after;
unsigned char *data;
int format;
Atom type;
if (XRRGetOutputProperty(clone->dst.dpy, clone->dst.rr_output,
XInternAtom(clone->dst.dpy, "EDID", False),
0, 100, False, False, AnyPropertyType,
&type, &format, &nitems, &after, &data) == Success) {
XRRChangeOutputProperty(clone->src.dpy, clone->src.rr_output,
XInternAtom(clone->src.dpy, "EDID", False),
type, format, PropModeReplace, data, nitems);
}
}
static int clone_update_modes__randr(struct clone *clone)
{
XRRScreenResources *from_res = NULL, *to_res = NULL;
@ -534,6 +551,7 @@ static int clone_update_modes__randr(struct clone *clone)
XRRAddOutputMode(clone->src.dpy, clone->src.rr_output, id);
}
clone_update_edid(clone);
XUngrabServer(clone->src.dpy);
done:
ret = 0;