[igt-dev] [PATCH i-g-t 2/4] tests: Use igt_display_require
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Oct 4 13:21:26 UTC 2018
Remaining tests that have been overlooked and don't need any
invasive changes to limit the skipping to only the relevant parts.
Cc: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
lib/igt_chamelium.c | 2 +-
tests/kms_atomic_interruptible.c | 4 ++--
tests/kms_force_connector_basic.c | 2 +-
tests/kms_getfb.c | 2 +-
tests/kms_plane_alpha_blend.c | 2 +-
tests/perf_pmu.c | 2 +-
tests/pm_backlight.c | 2 +-
tests/prime_mmap_kms.c | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index b8418e13e7bf..f7e9f851a964 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -1544,7 +1544,7 @@ static void chamelium_exit_handler(int sig)
/**
* chamelium_init:
* @chamelium: The Chamelium instance to use
- * @drm_fd: a display initialized with #igt_display_init
+ * @drm_fd: a display initialized with #igt_display_require
*
* Sets up a connection with a chamelium, using the URL specified in the
* Chamelium configuration. This must be called first before trying to use the
diff --git a/tests/kms_atomic_interruptible.c b/tests/kms_atomic_interruptible.c
index 8e9d4cb69c4d..be688638973f 100644
--- a/tests/kms_atomic_interruptible.c
+++ b/tests/kms_atomic_interruptible.c
@@ -85,8 +85,8 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t
/*
* Make sure we start with everything disabled to force a real modeset.
- * igt_display_init only sets sw state, and assumes the first test doesn't care
- * about hw state.
+ * igt_display_require only sets sw state, and assumes the first test
+ * doesn't care about hw state.
*/
igt_display_commit2(display, COMMIT_ATOMIC);
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index e9325dec9305..b8246e669939 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
/* attempt to use the display */
kmstest_set_vt_graphics_mode();
- igt_display_init(&display, drm_fd);
+ igt_display_require(&display, drm_fd);
igt_display_commit(&display);
igt_display_fini(&display);
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 07ffd79c4613..ca0b01c05e5c 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -116,7 +116,7 @@ static uint32_t get_any_prop_id(int fd)
{
igt_display_t display;
- igt_display_init(&display, fd);
+ igt_display_require(&display, fd);
for (int i = 0; i < display.n_outputs; i++) {
igt_output_t *output = &display.outputs[i];
if (output->props[IGT_CONNECTOR_DPMS] != 0)
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 81c8cb916a63..2194e26d536f 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -558,7 +558,7 @@ igt_main
data.gfx_fd = drm_open_driver(DRIVER_ANY);
igt_require_pipe_crc(data.gfx_fd);
- igt_display_init(&data.display, data.gfx_fd);
+ igt_display_require(&data.display, data.gfx_fd);
igt_require(data.display.is_atomic);
}
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index b34bc66ce2c4..21292bf3a2fe 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -811,7 +811,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e)
igt_skip_on(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
kmstest_set_vt_graphics_mode();
- igt_display_init(&data.display, gem_fd);
+ igt_display_require(&data.display, gem_fd);
/**
* We will use the display to render event forwarind so need to
diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index 32808cdf6ca4..054300f6e2e1 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -214,7 +214,7 @@ igt_main
* try to enable all.
*/
kmstest_set_vt_graphics_mode();
- igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+ igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
/* should be ../../cardX-$output */
igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
diff --git a/tests/prime_mmap_kms.c b/tests/prime_mmap_kms.c
index faace4afd478..fdc37214d96d 100644
--- a/tests/prime_mmap_kms.c
+++ b/tests/prime_mmap_kms.c
@@ -248,7 +248,7 @@ igt_main
igt_require_pipe_crc(gpu.drm_fd);
- igt_display_init(&gpu.display, gpu.drm_fd);
+ igt_display_require(&gpu.display, gpu.drm_fd);
}
igt_subtest("buffer-sharing")
--
2.19.0.rc2
More information about the igt-dev
mailing list