Skip to contentSkip to conversation

tests: Add kms_atomic_interruptible test, v4.

PATCH New Maarten Lankhorst 1 participant 1 message Sep 12, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: Add kms_atomic_interruptible test, v4.

This tests the various parts of atomic that I want to make interruptible. Running with --debug shows the stats from __igt_sigiter_continue, which can be used to make sure that we don't fall over.

The default igt kms helpers use drmIoctl, which is not intercepted by igt_while_interruptible. Only igt_ioctl is. This means we have to call the ioctls manually here.

Changes since v1:
- Implement interruptible DPMS checking too.
- Use igt_ioctl + igt_while_interruptible, instead of the signal helper shotgun.
Changes since v2:
- Bump whitespace to get rid of the weird double } at same indent.
- Use more newlines in the call to the atomic ioctl.
Changes since v3:
- Fix copyright on year. (Adrinael)
- Use do_ioctl instead of do_or_die(igt_ioctl) (ickle).
- Add test description. (Adrinael)

Cc Daniel Stone <[email protected]>
[mlankhorst: Document sleep values (Adrinael)]
---
 lib/igt_kms.c                    |   3 +-
 lib/igt_kms.h                    |   1 +
 tests/Makefile.sources           |   1 +
 tests/kms_atomic_interruptible.c | 331 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 335 insertions(+), 1 deletion(-)
 create mode 100644 tests/kms_atomic_interruptible.c
lib/igt_kms.c +2 -1
index 72fde792ba89..7bcafc072f70 100644
@@ -186,7 +186,8 @@ const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
 
 const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
 	"scaling mode",
-	"CRTC_ID"
+	"CRTC_ID",
+	"DPMS"
 };
 
 /*
lib/igt_kms.h +1 -0
index e5dc329b161e..3d1061fa08c8 100644
@@ -114,6 +114,7 @@ extern const char *igt_crtc_prop_names[];
 enum igt_atomic_connector_properties {
        IGT_CONNECTOR_SCALING_MODE = 0,
        IGT_CONNECTOR_CRTC_ID,
+       IGT_CONNECTOR_DPMS,
        IGT_NUM_CONNECTOR_PROPS
 };
 
tests/Makefile.sources +1 -0
index 0f4e39af10a1..cf542df181a8 100644
@@ -172,6 +172,7 @@ TESTS_progs = \
 	kms_3d \
 	kms_addfb_basic \
 	kms_atomic \
+	kms_atomic_interruptible \
 	kms_atomic_transition \
 	kms_busy \
 	kms_ccs \
tests/kms_atomic_interruptible.c new file +331 -0

331 lines not on this page · raw message

Signature · 6 lines
2.14.1

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