From db4f83ca5da29673ab9210e4322156518047130d Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 1 Dec 2015 11:24:19 +0100 Subject: lib/kms+tests: Use cached connector state Speeds up testcases except for those where we want to exercise the probing itself. The only exceptions left where we do a full probe are - pm_rpm: We use it to make sure the kernel doesn't get things wrong with power domains, so we really want to exercise the full probe paths. And there the only place really is the specific validation done with the data gathered by get_drm_info. - kmstest_force_ functions: Newer kernels should be better at re-probing state when the force sysfs fields change, but better safe than sorry. v2: I also consolidated the start_n_modes and start_connectors while at it - move one of the fixup hunks to this patch that accidentally got misplaced (Thomas). Cc: Thomas Wood Signed-off-by: Daniel Vetter --- tests/testdisplay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/testdisplay.c') diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 28875b2d..74e60b6f 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -132,7 +132,8 @@ static void dump_connectors_fd(int drmfd) for (i = 0; i < mode_resources->count_connectors; i++) { drmModeConnector *connector; - connector = drmModeGetConnector(drmfd, mode_resources->connectors[i]); + connector = drmModeGetConnectorCurrent(drmfd, + mode_resources->connectors[i]); if (!connector) { igt_warn("could not get connector %i: %s\n", mode_resources->connectors[i], strerror(errno)); continue; -- cgit v1.2.3