summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-11-02 12:57:40 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-11-03 17:38:55 -0700
commit9c29be40bcb139ba57927fde954f66dcc4f0e6c8 (patch)
tree2060a3a1ce91031b42bca5152d7bbde4cd25f0b7 /tests
parent3afb7b22d6388d13e7af293baa98cad6c3226aec (diff)
testdisplay: find planes for each pipe
Fixes a bug where we were masking against the wrong value.
Diffstat (limited to 'tests')
-rw-r--r--tests/testdisplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 45ab0cd5..e58461af 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -164,6 +164,7 @@ struct connector {
drmModeEncoder *encoder;
drmModeConnector *connector;
int crtc;
+ int pipe;
};
static void dump_mode(drmModeModeInfo *mode)
@@ -371,6 +372,7 @@ static void connector_find_preferred_mode(struct connector *c)
break;
}
c->crtc = resources->crtcs[i];
+ c->pipe = i;
resources->crtcs[i] = 0;
c->connector = connector;
}
@@ -675,7 +677,7 @@ connector_find_plane(struct connector *c)
continue;
}
- if (ovr->possible_crtcs & (1<<i)) {
+ if (ovr->possible_crtcs & (1 << c->pipe)) {
id = ovr->plane_id;
drmModeFreePlane(ovr);
break;