intel-virtual-output: Disable remote display if SetCrtcConfig fails
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jan 2014 12:25:34 +0000 (12:25 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jan 2014 12:33:47 +0000 (12:33 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tools/virtual.c

index 25571c4..73475e9 100644 (file)
@@ -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"));