diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-14 09:17:36 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-14 11:38:19 +0000 |
commit | f47f192f2240d19ede0a3a59b7970e4f563f3195 (patch) | |
tree | 9a3a7efc20592d0dd273cada57e0f504a86c0ea6 /tools | |
parent | 0ad54325e94c4fd144c9fbcba25c3d167b6c5e18 (diff) |
intel-virtual-output: Include extra debug information for modesets
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtual.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tools/virtual.c b/tools/virtual.c index 1783c66f..0dfd3082 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -67,8 +67,10 @@ #if 0 #define DBG(x) printf x +#define EXTRA_DBG 1 #else #define DBG(x) +#define EXTRA_DBG 0 #endif #define FORCE_FULL_REDRAW 0 @@ -1254,9 +1256,32 @@ 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; + + c = XRRGetCrtcInfo(dst->dpy, res, rr_crtc); + if (c) { + DBG(("%s-%s: x=%d, y=%d, rotation=%d, mode=%ld\n", + DisplayString(dst->dpy), dst->name, + c->x, c->y, c->rotation, c->mode)); + XRRFreeCrtcInfo(c); + } + + p = XRRGetPanning(dst->dpy, res, rr_crtc); + if (p) { + DBG(("%s-%s: panning (%d, %d)x(%d, %d), tracking (%d, %d)x(%d, %d), border (%d, %d),(%d, %d)\n", + DisplayString(dst->dpy), dst->name, + p->left, p->top, p->width, p->height, + p->track_left, p->track_top, p->track_width, p->track_height, + p->border_left, p->border_top, p->border_right, p->border_bottom)); + XRRFreePanning(p); + } + } dst->rr_crtc = rr_crtc; - (void)ret; } free_res: XRRFreeScreenResources(res); |