xf86-video-intel: tools/virtual.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Mar 14 17:00:06 CET 2014
tools/virtual.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 8cc1f005c69786243ac69f6505087071787e6f87
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Mar 14 15:55:41 2014 +0000
intel-virtual-output: Iterate over remote outputs in the same order as listed
If we walk the output lists in the same order as they are listed by
RandR, we are more likely to hit favourable priority sorting. E.g. the
user is likely to setup the outputs in the same order as listed, meaning
fewer CRTC transitions etc.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index cf38315..c994574 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -2163,6 +2163,20 @@ static struct display *last_display(struct context *ctx)
return &ctx->display[ctx->ndisplay-1];
}
+static void reverse_clone_list(struct display *display)
+{
+ struct clone *list = NULL;
+
+ while (display->clone) {
+ struct clone *clone = display->clone;
+ display->clone = clone->next;
+ clone->next = list;
+ list = clone;
+ }
+
+ display->clone = list;
+}
+
static int last_display_add_clones__randr(struct context *ctx)
{
struct display *display = last_display(ctx);
@@ -2236,6 +2250,8 @@ static int last_display_add_clones__randr(struct context *ctx)
XRRFreeOutputInfo(o);
}
XRRFreeScreenResources(res);
+
+ reverse_clone_list(display);
return 0;
}
@@ -2309,6 +2325,8 @@ static int last_display_add_clones__xinerama(struct context *ctx)
ctx->active = clone;
}
XFree(xi);
+
+ reverse_clone_list(display);
return 0;
}
More information about the xorg-commit
mailing list