Skip to contentSkip to conversation

tests/kms_rotate_crc: Test to verify rotation of planes through CRC

PATCH Superseded [email protected] 2 participants 2 messages Feb 6, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_rotate_crc: Test to verify rotation of planes through CRC

From: Sagar Kamble <[email protected]>

This test will verify 180 degree rotation of CRTC and sprite planes by grabbing CRC for already rotated image and comparing with CRC calculated after triggering rotation through DRM property.

---
 tests/Makefile.sources |   1 +
 tests/kms_rotate_crc.c | 543 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 544 insertions(+)
 create mode 100644 tests/kms_rotate_crc.c
tests/Makefile.sources +1 -0
index a8c0c96..c19fc88 100644
@@ -59,6 +59,7 @@ TESTS_progs_M = \
 	kms_flip \
 	kms_pipe_crc_basic \
 	kms_render \
+	kms_rotate_crc \
 	kms_setmode \
 	pm_lpsp \
 	pm_pc8 \
tests/kms_rotate_crc.c new file +543 -0

543 lines not on this page · raw message

Signature · 1 line
1.8.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw
Quoted 8 lines · On Thu, Feb 06, 2014 at 08:34:31PM +0530, [email protected] wrote:

From: Sagar Kamble <[email protected]>

This test will verify 180 degree rotation of CRTC and sprite planes by grabbing CRC for already rotated image and comparing with CRC calculated after triggering rotation through DRM property.

Minor style nit: The tested-by tag is to credit testing done by non-authors. This is especially important if testing requires a special machine/setup (e.g. the one from a bug reporter) - adding the mail helps in contacting the right people again if a commit breaks something.

Adding your own mail is redundant since it's assumed that developers test their own stuff ;-)

Two more general comments below.

[snip]

tests/kms_rotate_crc.c line 521

Quoted 3 lines
tests/kms_rotate_crc.c new file +3 -0
+igt_main
+{
+	data_t data = {};

igt_fixture/subtest use longjmps, so putting stack variables into the same function as those is ill-defined. bkm is to add them as global variables right above igt_main.

tests/kms_rotate_crc.c line 522

Quoted 1 line
tests/kms_rotate_crc.c new file +1 -0
+	fp = fopen("rotate.log", "w+"); 

Please log data to stdout using printf and friends. That way test runners can easily redirect test output or capture it themselve for storage into a db. Maybe we need an official igt_log, Jeff McGee somewhat proposed this already. Also anything not related to enumerating the subtests must be put into igt_fictures.

Quoted 29 lines
tests/kms_rotate_crc.c new file +21 -0
+
+	igt_skip_on_simulation();
+
+	igt_fixture {
+		data.drm_fd = drm_open_any();
+		igt_set_vt_graphics_mode();
+
+		igt_debugfs_init(&data.debugfs);
+		igt_pipe_crc_check(&data.debugfs);
+
+		display_init(&data);
+	}
+
+	run_test(&data);
+
+	igt_fixture {
+		display_fini(&data);
+	}
+
+	fclose(fp);
+}
Signature · 7 lines
1.8.5


_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch