[igt-dev] [PATCH i-g-t] tests/kms_vblank.c: Skip vblank tests for virtual_hw mode

Sumera Priyadarsini sylphrenadin at gmail.com
Fri Feb 19 09:41:20 UTC 2021


Currently, while running the VKMS module in virtual harware
(vblank-less) mode, majority of tests fail due to vblank tests
failing, making it difficult to test other parts like crc and
writeback for the VKMS module.

Skip all vblank tests in kms_vblank.c when vblank does not exist
as a feature.

Signed-off-by: Sumera Priyadarsini <sylphrenadin at gmail.com>
---
 tests/kms_vblank.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index e561e41d..636f13b7 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -515,12 +515,19 @@ igt_main
 {
 	int fd;
 	data_t data;
+	drmVBlank dummy_vbl;
+	int ret;
 
 	igt_fixture {
 		fd = drm_open_driver_master(DRIVER_ANY);
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, fd);
 		igt_display_require_output(&data.display);
+
+		memset(&dummy_vbl, 0, sizeof(drmVBlank));
+		dummy_vbl.request.type = DRM_VBLANK_RELATIVE;
+		ret = drmWaitVBlank(fd, &dummy_vbl);
+		igt_skip_on(ret != 0 && errno == EOPNOTSUPP);
 	}
 
 	igt_describe("Negative test for vblank request");
-- 
2.25.1



More information about the igt-dev mailing list