Skip to contentSkip to conversation

tests/kms_plane_multiple: CRC based atomic correctness test

PATCH In review Mika Kahola 2 participants 3 messages Nov 8, 2016 – Nov 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 tests/kms_plane_multiple: CRC based atomic correctness test

This is a testcase with multiple planes. The idea here is the following

- draw a uniform frame with blue color
- grab crc for reference
- put planes randomly on top with the same blue color
- punch holes with black color into the primary framebuffer
- ideally the planes should cover these holes so that the output is the identical to reference crc
- composite all with one ioctl call
- grab crc and verify that the reference crc is equal
- repeat this for several iterations to maximize coverage

v7: Unify reference crc grabbing for atomic and legacy tests (Maarten)

v6: Rename test_planes() to prepare_planes() (Maarten)
When grabbing reference crc, keep framebuffer and crc enabled for atomic mode setting. (Maarten)
Fix crc collection for legacy modesetting (Maarten)

v5: Remove limit for max number of iterations and add possibility to
loop forever (Daniel)
Remove IN_RANGE() macro (Maarten)
Remove log file and show random number seed on screen instead (Maarten) Split legacy and atomic plane tests on own functions (Maarten) remove test_atomic() function and pass test mode info as parameter (Maarten)
Use bigger rectangle size (256x256) for non-cursor planes and smaller (128x128) size for cursor plane (Maarten)

v4: For atomic test enable crc capturing before entering into a
iteration loop. After each iteration, check that page flip didn't take no more than 1 vblank, fetch all crc's and check the values.

Introduce new command line parameter for the number of iterations. The test run from 1 to 256 iterations.

v3: Cleanup by removing separate plane array
For atomic, pass DRM_MODE_PAGE_FLIP_EVENT
Grab crc by using igt_pipe_crc_get_crc instead of igt_pipe_crc_collect_crc Rename nplanes variable to max_planes
To optimize test execution, run iterations after the modeset

v2: Keep a logfile on random number seeds per subtest that are not skipped
due to unmet test requirements

---
 tests/Makefile.sources     |   1 +
 tests/kms_plane_multiple.c | 494 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 495 insertions(+)
 create mode 100644 tests/kms_plane_multiple.c
tests/Makefile.sources +1 -0
index 6d081c3..ffd59c1 100644
@@ -105,6 +105,7 @@ TESTS_progs_M = \
 	kms_pipe_color \
 	kms_pipe_crc_basic \
 	kms_plane \
+	kms_plane_multiple \
 	kms_properties \
 	kms_psr_sink_crc \
 	kms_render \
tests/kms_plane_multiple.c new file +494 -0

494 lines not on this page · raw message

Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v7 1/1
#1 lore raw

Op 08-11-16 om 14:56 schreef Mika Kahola:

Quoted 43 lines

This is a testcase with multiple planes. The idea here is the following

- draw a uniform frame with blue color
- grab crc for reference
- put planes randomly on top with the same blue color
- punch holes with black color into the primary framebuffer
- ideally the planes should cover these holes so that the output is the identical to reference crc
- composite all with one ioctl call
- grab crc and verify that the reference crc is equal
- repeat this for several iterations to maximize coverage

v7: Unify reference crc grabbing for atomic and legacy tests (Maarten)

v6: Rename test_planes() to prepare_planes() (Maarten)
When grabbing reference crc, keep framebuffer and crc enabled for atomic mode setting. (Maarten)
Fix crc collection for legacy modesetting (Maarten)

v5: Remove limit for max number of iterations and add possibility to
loop forever (Daniel)
Remove IN_RANGE() macro (Maarten)
Remove log file and show random number seed on screen instead (Maarten) Split legacy and atomic plane tests on own functions (Maarten) remove test_atomic() function and pass test mode info as parameter (Maarten)
Use bigger rectangle size (256x256) for non-cursor planes and smaller (128x128) size for cursor plane (Maarten)

v4: For atomic test enable crc capturing before entering into a
iteration loop. After each iteration, check that page flip didn't take no more than 1 vblank, fetch all crc's and check the values.

Introduce new command line parameter for the number of iterations. The test run from 1 to 256 iterations.

v3: Cleanup by removing separate plane array
For atomic, pass DRM_MODE_PAGE_FLIP_EVENT
Grab crc by using igt_pipe_crc_get_crc instead of igt_pipe_crc_collect_crc Rename nplanes variable to max_planes
To optimize test execution, run iterations after the modeset

Quoted 4 lines

v2: Keep a logfile on random number seeds per subtest that are not skipped
due to unmet test requirements

Looks good.

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

#2 lore raw

Thanks for the review!

Cheers,
Mika

Quoted 52 lines

-----Original Message-----
From: Maarten Lankhorst [mailto:[email protected]]
Sent: Wednesday, November 16, 2016 11:48 AM
To: Kahola, Mika <[email protected]>; [email protected]
Cc: Latvala, Petri <[email protected]>; [email protected]
Subject: Re: [PATCH i-g-t v7] tests/kms_plane_multiple: CRC based atomic correctness test

Op 08-11-16 om 14:56 schreef Mika Kahola:

Quoted 43 lines

This is a testcase with multiple planes. The idea here is the following

- draw a uniform frame with blue color
- grab crc for reference
- put planes randomly on top with the same blue color
- punch holes with black color into the primary framebuffer
- ideally the planes should cover these holes so that the output is the identical to reference crc
- composite all with one ioctl call
- grab crc and verify that the reference crc is equal
- repeat this for several iterations to maximize coverage

v7: Unify reference crc grabbing for atomic and legacy tests (Maarten)

v6: Rename test_planes() to prepare_planes() (Maarten)
When grabbing reference crc, keep framebuffer and crc enabled for atomic mode setting. (Maarten)
Fix crc collection for legacy modesetting (Maarten)

v5: Remove limit for max number of iterations and add possibility to
loop forever (Daniel)
Remove IN_RANGE() macro (Maarten)
Remove log file and show random number seed on screen instead (Maarten) Split legacy and atomic plane tests on own functions (Maarten) remove test_atomic() function and pass test mode info as parameter (Maarten)
Use bigger rectangle size (256x256) for non-cursor planes and smaller (128x128) size for cursor plane (Maarten)

v4: For atomic test enable crc capturing before entering into a
iteration loop. After each iteration, check that page flip didn't take no more than 1 vblank, fetch all crc's and check the values.

Introduce new command line parameter for the number of iterations. The test run from 1 to 256 iterations.

v3: Cleanup by removing separate plane array
For atomic, pass DRM_MODE_PAGE_FLIP_EVENT
Grab crc by using igt_pipe_crc_get_crc instead of igt_pipe_crc_collect_crc Rename nplanes variable to max_planes
To optimize test execution, run iterations after the modeset

Quoted 7 lines
Quoted 4 lines

v2: Keep a logfile on random number seeds per subtest that are not skipped
due to unmet test requirements

Looks good.

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