From a55bbe3b598616ef4464e50cb9364c8cdf0b513a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 14 Mar 2014 15:47:20 +0000 Subject: [PATCH] intel-virtual-output: Disable panning before setting mode on CRTC For whatever reason, presumably to do with the switch between CRTCs, we need to disable the panning before setting the mode in order for our desired CRTC position to take effect. Reported-by: Jeff Katz Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76146 Signed-off-by: Chris Wilson --- tools/virtual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virtual.c b/tools/virtual.c index 9e267bea..cf383156 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -1252,6 +1252,10 @@ err: dst->x, dst->y, dst->mode.width, dst->mode.height, dst->rotation, (long)rr_crtc, dst->mode.id)); + 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")); + (void)ret; + ret = XRRSetCrtcConfig(dst->dpy, res, rr_crtc, CurrentTime, dst->x, dst->y, dst->mode.id, dst->rotation, &dst->rr_output, 1); @@ -1259,10 +1263,6 @@ err: 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")); - (void)ret; - if (EXTRA_DBG) { XRRCrtcInfo *c; XRRPanning *p;