xf86-video-intel: 4 commits - src/sna/sna_display.c tools/virtual.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 20 04:34:34 PST 2014
src/sna/sna_display.c | 5 +++--
tools/virtual.c | 38 +++++++++++++++++++++++++++++++++-----
2 files changed, 36 insertions(+), 7 deletions(-)
New commits:
commit 04ee452439d14e2f8941e989823cb81fb62858e7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 20 12:19:25 2014 +0000
sna: Increase limit on number of possible outputs
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 000d9ab..f274869 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -838,7 +838,7 @@ sna_crtc_apply(xf86CrtcPtr crtc)
struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
struct drm_mode_crtc arg;
- uint32_t output_ids[16];
+ uint32_t output_ids[32];
int output_count = 0;
int i;
@@ -861,7 +861,8 @@ sna_crtc_apply(xf86CrtcPtr crtc)
(uint32_t)output->possible_crtcs,
(uint32_t)output->possible_clones));
output_ids[output_count] = to_connector_id(output);
- output_count++;
+ if (++output_count == ARRAY_SIZE(output_ids))
+ return false;
}
VG_CLEAR(arg);
commit 637e7c2186ccde65bed74dfd28f53a2a808e4101
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 20 12:33:19 2014 +0000
intel-virtual-output: Print error events for debugging
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index 73475e9..050bf1f 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -205,6 +205,12 @@ static int
_check_error_handler(Display *display,
XErrorEvent *event)
{
+ DBG(("X11 error from display %s, serial=%ld, error=%d, req=%d.%d\n",
+ DisplayString(display),
+ event->serial,
+ event->error_code,
+ event->request_code,
+ event->minor_code));
_x_error_occurred = 1;
return False; /* ignored */
}
commit 92e9bf82b22ca59ac0009a6a4a641a1056c34bf4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 20 12:25:34 2014 +0000
intel-virtual-output: Disable remote display if SetCrtcConfig fails
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index 25571c4..73475e9 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1190,6 +1190,8 @@ err:
dst->x, dst->y, dst->mode.id, dst->rotation,
&dst->rr_output, 1);
DBG(("%s-%s: XRRSetCrtcConfig %s\n", DisplayString(dst->dpy), dst->name, ret ? "failed" : "success"));
+ if (ret)
+ goto err;
ret = XRRSetPanning(dst->dpy, res, rr_crtc, memset(&panning, 0, sizeof(panning)));
DBG(("%s-%s: XRRSetPanning %s\n", DisplayString(dst->dpy), dst->name, ret ? "failed" : "success"));
commit 3138d06893b3380473cfab60ee19e80cb3b61192
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 20 10:38:23 2014 +0000
intel-virtual-output: Clone modes onto remote display
If the user adds a mode to the VIRTUAL display and then attempts to use
it, add that mode to the remote display.
Reported-by: Christoph Bessei <admin at schwarzwald-falke.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73816
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index f0915a4..25571c4 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -533,6 +533,8 @@ static int clone_update_modes__randr(struct clone *clone)
old = &to_res->modes[j];
if (mode_equal(mode, old)) {
id = old->id;
+ DBG(("%s(%s-%s): reusing mode %ld: %s\n", __func__,
+ DisplayString(clone->src.dpy), clone->src.name, id, mode->name));
break;
}
}
@@ -1120,9 +1122,27 @@ err:
}
}
if (dst->mode.id == 0) {
- DBG(("%s: failed to find suitable mode for %s\n",
- DisplayString(dst->dpy), dst->name));
- goto err;
+ XRRModeInfo m;
+ char buf[256];
+ RRMode id;
+
+ /* XXX User names must be unique! */
+ m = src->mode;
+ m.nameLength = snprintf(buf, sizeof(buf),
+ "%s.%ld-%s", src->name, (long)src->mode.id, src->mode.name);
+ m.name = buf;
+
+ id = XRRCreateMode(dst->dpy, dst->window, &m);
+ if (id) {
+ DBG(("%s(%s-%s): adding mode %ld: %s\n", __func__,
+ DisplayString(dst->dpy), dst->name, (long)id, src->mode.name));
+ XRRAddOutputMode(dst->dpy, dst->rr_output, id);
+ dst->mode.id = id;
+ } else {
+ DBG(("%s: failed to find suitable mode for %s\n",
+ DisplayString(dst->dpy), dst->name));
+ goto err;
+ }
}
rr_crtc = dst->rr_crtc;
@@ -1161,10 +1181,10 @@ err:
goto err;
}
- DBG(("%s: enabling output '%s' (%d,%d)x(%d,%d), rotation %d, on CRTC:%ld\n",
+ DBG(("%s: enabling output '%s' (%d,%d)x(%d,%d), rotation %d, on CRTC:%ld, using mode %ld\n",
DisplayString(dst->dpy), dst->name,
dst->x, dst->y, dst->mode.width, dst->mode.height,
- dst->rotation, (long)rr_crtc));
+ dst->rotation, (long)rr_crtc, dst->mode.id));
ret = XRRSetCrtcConfig(dst->dpy, res, rr_crtc, CurrentTime,
dst->x, dst->y, dst->mode.id, dst->rotation,
More information about the xorg-commit
mailing list