diff options
author | Anshuman Gupta <anshuman.gupta@intel.com> | 2019-09-23 16:34:31 +0530 |
---|---|---|
committer | Ramalingam C <ramalingam.c@intel.com> | 2019-09-26 13:46:46 +0530 |
commit | 3dbaca74df003e5f3adef570a0b29b296a653f9c (patch) | |
tree | 934440bee4dec659b0bde19e6f5be5f7a4f7acc7 /tests/kms_content_protection.c | |
parent | 82326332f7af336d390e00ae87187bc207fd33dd (diff) |
kms_content_protection: Set CP prop to UNDESIRED at igt exit.
It requires to set the CP property to UNDESIRED at
igt exit in order to avoid any noise related to HDCP
failures. This will make sure that HDCP failures error
will not taint other IGT test.
Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Diffstat (limited to 'tests/kms_content_protection.c')
-rw-r--r-- | tests/kms_content_protection.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c index e676b60b..fce4b591 100644 --- a/tests/kms_content_protection.c +++ b/tests/kms_content_protection.c @@ -617,6 +617,26 @@ test_content_protection(enum igt_commit_style s, int content_type) igt_require_f(valid_tests, "No connector found with HDCP capability\n"); } +static void test_content_protection_cleanup(void) +{ + igt_display_t *display = &data.display; + igt_output_t *output; + uint64_t val; + + for_each_connected_output(display, output) { + if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION]) + continue; + + val = igt_output_get_prop(output, + IGT_CONNECTOR_CONTENT_PROTECTION); + if (val == CP_UNDESIRED) + continue; + + igt_info("CP Prop being UNDESIRED on %s\n", output->name); + test_cp_disable(output, COMMIT_ATOMIC); + } +} + igt_main { igt_fixture { @@ -692,6 +712,8 @@ igt_main test_content_protection(COMMIT_ATOMIC, HDCP_CONTENT_TYPE_0); } - igt_fixture + igt_fixture { + test_content_protection_cleanup(); igt_display_fini(&data.display); + } } |