summaryrefslogtreecommitdiff
path: root/tests/kms_draw_crc.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2016-02-26 11:27:20 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2016-03-03 16:57:48 -0300
commitd8bf28f0cbe990d5b1906c686cdaa76c74b1cffd (patch)
tree44609a602e07119633c51a6e2b01c4f9568b4c50 /tests/kms_draw_crc.c
parent9751e602b7e10310b011586fe16d7eea2cfb9026 (diff)
tests: fix CRTC assignment for a few tests
All the tests I wrote always assumed that every connector supported CRTC 0. This is not the case for BSW and possibly others, so fix the tests before the CI reports more failures. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/kms_draw_crc.c')
-rw-r--r--tests/kms_draw_crc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index 3f801749..9539fe45 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -58,25 +58,26 @@ struct modeset_params ms;
static void find_modeset_params(void)
{
int i;
- uint32_t connector_id = 0, crtc_id;
+ uint32_t crtc_id;
+ drmModeConnectorPtr connector = NULL;
drmModeModeInfoPtr mode = NULL;
for (i = 0; i < drm_res->count_connectors; i++) {
drmModeConnectorPtr c = drm_connectors[i];
if (c->count_modes) {
- connector_id = c->connector_id;
+ connector = c;
mode = &c->modes[0];
break;
}
}
- igt_require(connector_id);
+ igt_require(connector);
- crtc_id = drm_res->crtcs[0];
- igt_assert(crtc_id);
+ crtc_id = kmstest_find_crtc_for_connector(drm_fd, drm_res, connector,
+ 0);
igt_assert(mode);
- ms.connector_id = connector_id;
+ ms.connector_id = connector->connector_id;
ms.crtc_id = crtc_id;
ms.mode = mode;