* [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 16:23 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
@ 2019-02-07 16:23 ` Ramalingam C
2019-02-07 17:03 ` Daniel Vetter
0 siblings, 1 reply; 10+ messages in thread
From: Ramalingam C @ 2019-02-07 16:23 UTC (permalink / raw)
To: igt-dev, daniel
As we have two different patch for commitng the HDCP request
1. DDI_enable (during the modeset)
2. update_pipe (during fastset execution)
Currently our kms_content_protection covers only fastset path.
So this test adds the coverage for the HDCP during the modeset by
performing DPMS off-on and check for HDCP status.
But with respect to HDCP we allow few retries from userspace before
reporting the failure. So only first attempt at kernel will be on
modeset path, next retries will become fastset commiting of HDCP.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
tests/kms_content_protection.c | 79 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index f6b441d891e5..895e9e8d8b11 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -306,6 +306,80 @@ test_content_protection(enum igt_commit_style s)
igt_require_f(valid_tests, "No connector found with HDCP capability\n");
}
+static void test_cp_dpms_on_output(igt_output_t *output,
+ enum igt_commit_style s)
+{
+ igt_display_t *display = &data.display;
+ igt_plane_t *primary;
+ enum pipe pipe;
+ bool ret;
+
+ for_each_pipe(display, pipe) {
+ if (!igt_pipe_connector_valid(pipe, output))
+ continue;
+
+ /*
+ * If previous subtest of connector failed, pipe
+ * attached to that connector is not released.
+ * Because of that we have to choose the non
+ * attached pipe for this subtest.
+ */
+ if (!igt_pipe_is_free(display, pipe))
+ continue;
+
+ modeset_with_fb(pipe, output, s);
+ test_cp_enable_with_retry(output, s, 3);
+
+ igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
+ igt_display_commit2(display, s);
+
+ igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 1);
+ igt_display_commit2(display, s);
+
+ ret = wait_for_prop_value(output, 2, 18000);
+ if (!ret)
+ test_cp_enable_with_retry(output, s, 2);
+
+ test_cp_disable(output, s);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
+
+ /*
+ * Testing a output with a pipe is enough for HDCP
+ * testing. No ROI in testing the connector with other
+ * pipes. So Break the loop on pipe.
+ */
+ break;
+ }
+}
+
+static void test_cp_dpms(enum igt_commit_style s)
+{
+ igt_display_t *display = &data.display;
+ igt_output_t *output;
+ int valid_tests = 0;
+
+ for_each_connected_output(display, output) {
+ if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
+ continue;
+
+ igt_info("CP Test execution on %s\n", output->name);
+ if (!sink_hdcp_capable(output)) {
+ igt_info("\tSkip %s (Sink has no HDCP support)\n",
+ output->name);
+ continue;
+ }
+
+ test_cp_dpms_on_output(output, s);
+ valid_tests++;
+ }
+
+ igt_require_f(valid_tests, "No connector found with HDCP capability\n");
+}
+
igt_main
{
igt_fixture {
@@ -324,6 +398,11 @@ igt_main
test_content_protection(COMMIT_ATOMIC);
}
+ igt_subtest("atomic-dpms") {
+ igt_require(data.display.is_atomic);
+ test_cp_dpms(COMMIT_ATOMIC);
+ }
+
igt_fixture
igt_display_fini(&data.display);
}
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 16:23 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
@ 2019-02-07 17:03 ` Daniel Vetter
2019-02-07 18:58 ` C, Ramalingam
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2019-02-07 17:03 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev, daniel
On Thu, Feb 07, 2019 at 09:53:21PM +0530, Ramalingam C wrote:
> As we have two different patch for commitng the HDCP request
> 1. DDI_enable (during the modeset)
> 2. update_pipe (during fastset execution)
>
> Currently our kms_content_protection covers only fastset path.
> So this test adds the coverage for the HDCP during the modeset by
> performing DPMS off-on and check for HDCP status.
>
> But with respect to HDCP we allow few retries from userspace before
> reporting the failure. So only first attempt at kernel will be on
> modeset path, next retries will become fastset commiting of HDCP.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
> tests/kms_content_protection.c | 79 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 79 insertions(+)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index f6b441d891e5..895e9e8d8b11 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -306,6 +306,80 @@ test_content_protection(enum igt_commit_style s)
> igt_require_f(valid_tests, "No connector found with HDCP capability\n");
> }
>
> +static void test_cp_dpms_on_output(igt_output_t *output,
> + enum igt_commit_style s)
> +{
> + igt_display_t *display = &data.display;
> + igt_plane_t *primary;
> + enum pipe pipe;
> + bool ret;
> +
> + for_each_pipe(display, pipe) {
> + if (!igt_pipe_connector_valid(pipe, output))
> + continue;
> +
> + /*
> + * If previous subtest of connector failed, pipe
> + * attached to that connector is not released.
> + * Because of that we have to choose the non
> + * attached pipe for this subtest.
> + */
> + if (!igt_pipe_is_free(display, pipe))
> + continue;
> +
> + modeset_with_fb(pipe, output, s);
> + test_cp_enable_with_retry(output, s, 3);
> +
> + igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
> + igt_display_commit2(display, s);
> +
> + igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 1);
> + igt_display_commit2(display, s);
> +
> + ret = wait_for_prop_value(output, 2, 18000);
> + if (!ret)
> + test_cp_enable_with_retry(output, s, 2);
> +
> + test_cp_disable(output, s);
> +
> + primary = igt_output_get_plane_type(output,
> + DRM_PLANE_TYPE_PRIMARY);
> + igt_plane_set_fb(primary, NULL);
> + igt_output_set_pipe(output, PIPE_NONE);
> +
> + /*
> + * Testing a output with a pipe is enough for HDCP
> + * testing. No ROI in testing the connector with other
> + * pipes. So Break the loop on pipe.
> + */
> + break;
> + }
> +}
> +
> +static void test_cp_dpms(enum igt_commit_style s)
> +{
> + igt_display_t *display = &data.display;
> + igt_output_t *output;
> + int valid_tests = 0;
> +
> + for_each_connected_output(display, output) {
> + if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> + continue;
> +
> + igt_info("CP Test execution on %s\n", output->name);
> + if (!sink_hdcp_capable(output)) {
> + igt_info("\tSkip %s (Sink has no HDCP support)\n",
> + output->name);
> + continue;
> + }
> +
> + test_cp_dpms_on_output(output, s);
> + valid_tests++;
> + }
> +
> + igt_require_f(valid_tests, "No connector found with HDCP capability\n");
> +}
> +
> igt_main
> {
> igt_fixture {
> @@ -324,6 +398,11 @@ igt_main
> test_content_protection(COMMIT_ATOMIC);
> }
>
> + igt_subtest("atomic-dpms") {
> + igt_require(data.display.is_atomic);
> + test_cp_dpms(COMMIT_ATOMIC);
Hm instead of duplicating a bunch of things I'd add a new flag paramater
to test_content_protection (0 for all existing tests), so that we can
reuse the code with the same flow, and only do the dpms when a TEST_DPMS
flag is set.
-Daniel
> + }
> +
> igt_fixture
> igt_display_fini(&data.display);
> }
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 17:03 ` Daniel Vetter
@ 2019-02-07 18:58 ` C, Ramalingam
0 siblings, 0 replies; 10+ messages in thread
From: C, Ramalingam @ 2019-02-07 18:58 UTC (permalink / raw)
To: Daniel Vetter; +Cc: igt-dev
On 2/7/2019 10:33 PM, Daniel Vetter wrote:
> On Thu, Feb 07, 2019 at 09:53:21PM +0530, Ramalingam C wrote:
>> As we have two different patch for commitng the HDCP request
>> 1. DDI_enable (during the modeset)
>> 2. update_pipe (during fastset execution)
>>
>> Currently our kms_content_protection covers only fastset path.
>> So this test adds the coverage for the HDCP during the modeset by
>> performing DPMS off-on and check for HDCP status.
>>
>> But with respect to HDCP we allow few retries from userspace before
>> reporting the failure. So only first attempt at kernel will be on
>> modeset path, next retries will become fastset commiting of HDCP.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>> tests/kms_content_protection.c | 79 ++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 79 insertions(+)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index f6b441d891e5..895e9e8d8b11 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -306,6 +306,80 @@ test_content_protection(enum igt_commit_style s)
>> igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>> }
>>
>> +static void test_cp_dpms_on_output(igt_output_t *output,
>> + enum igt_commit_style s)
>> +{
>> + igt_display_t *display = &data.display;
>> + igt_plane_t *primary;
>> + enum pipe pipe;
>> + bool ret;
>> +
>> + for_each_pipe(display, pipe) {
>> + if (!igt_pipe_connector_valid(pipe, output))
>> + continue;
>> +
>> + /*
>> + * If previous subtest of connector failed, pipe
>> + * attached to that connector is not released.
>> + * Because of that we have to choose the non
>> + * attached pipe for this subtest.
>> + */
>> + if (!igt_pipe_is_free(display, pipe))
>> + continue;
>> +
>> + modeset_with_fb(pipe, output, s);
>> + test_cp_enable_with_retry(output, s, 3);
>> +
>> + igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
>> + igt_display_commit2(display, s);
>> +
>> + igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 1);
>> + igt_display_commit2(display, s);
>> +
>> + ret = wait_for_prop_value(output, 2, 18000);
>> + if (!ret)
>> + test_cp_enable_with_retry(output, s, 2);
>> +
>> + test_cp_disable(output, s);
>> +
>> + primary = igt_output_get_plane_type(output,
>> + DRM_PLANE_TYPE_PRIMARY);
>> + igt_plane_set_fb(primary, NULL);
>> + igt_output_set_pipe(output, PIPE_NONE);
>> +
>> + /*
>> + * Testing a output with a pipe is enough for HDCP
>> + * testing. No ROI in testing the connector with other
>> + * pipes. So Break the loop on pipe.
>> + */
>> + break;
>> + }
>> +}
>> +
>> +static void test_cp_dpms(enum igt_commit_style s)
>> +{
>> + igt_display_t *display = &data.display;
>> + igt_output_t *output;
>> + int valid_tests = 0;
>> +
>> + for_each_connected_output(display, output) {
>> + if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
>> + continue;
>> +
>> + igt_info("CP Test execution on %s\n", output->name);
>> + if (!sink_hdcp_capable(output)) {
>> + igt_info("\tSkip %s (Sink has no HDCP support)\n",
>> + output->name);
>> + continue;
>> + }
>> +
>> + test_cp_dpms_on_output(output, s);
>> + valid_tests++;
>> + }
>> +
>> + igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>> +}
>> +
>> igt_main
>> {
>> igt_fixture {
>> @@ -324,6 +398,11 @@ igt_main
>> test_content_protection(COMMIT_ATOMIC);
>> }
>>
>> + igt_subtest("atomic-dpms") {
>> + igt_require(data.display.is_atomic);
>> + test_cp_dpms(COMMIT_ATOMIC);
> Hm instead of duplicating a bunch of things I'd add a new flag paramater
> to test_content_protection (0 for all existing tests), so that we can
> reuse the code with the same flow, and only do the dpms when a TEST_DPMS
> flag is set.
Ok. sounds good idea. I will do that.
-Ram
> -Daniel
>
>> + }
>> +
>> igt_fixture
>> igt_display_fini(&data.display);
>> }
>> --
>> 2.7.4
>>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps
@ 2019-02-07 19:31 Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ramalingam C @ 2019-02-07 19:31 UTC (permalink / raw)
To: igt-dev, daniel
Modularizing the CP test steps for the convenience of reusing it for
other subtests.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
tests/kms_content_protection.c | 99 +++++++++++++++++++++++++-----------------
1 file changed, 60 insertions(+), 39 deletions(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 50ae82862949..f6b441d891e5 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -33,6 +33,7 @@ IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
struct data {
int drm_fd;
igt_display_t display;
+ struct igt_fb red, green;
} data;
@@ -116,16 +117,12 @@ commit_display_and_wait_for_flip(enum igt_commit_style s)
}
}
-static void
-test_cp_enable_disable(const enum pipe pipe, igt_output_t *output,
- enum igt_commit_style s)
+static void modeset_with_fb(const enum pipe pipe, igt_output_t *output,
+ enum igt_commit_style s)
{
igt_display_t *display = &data.display;
drmModeModeInfo mode;
igt_plane_t *primary;
- struct igt_fb red, green;
- bool ret;
- int retry = 3;
igt_assert(kmstest_get_connector_default_mode(
display->drm_fd, output->config.connector, &mode));
@@ -135,58 +132,75 @@ test_cp_enable_disable(const enum pipe pipe, igt_output_t *output,
igt_create_color_fb(display->drm_fd, mode.hdisplay, mode.vdisplay,
DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
- 1.f, 0.f, 0.f, &red);
+ 1.f, 0.f, 0.f, &data.red);
igt_create_color_fb(display->drm_fd, mode.hdisplay, mode.vdisplay,
DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
- 0.f, 1.f, 0.f, &green);
+ 0.f, 1.f, 0.f, &data.green);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_display_commit2(display, s);
-
- igt_plane_set_fb(primary, &red);
+ igt_plane_set_fb(primary, &data.red);
/* Wait for Flip completion before starting the HDCP authentication */
commit_display_and_wait_for_flip(s);
+}
- do {
- igt_output_set_prop_value(output,
- IGT_CONNECTOR_CONTENT_PROTECTION, 0);
- igt_display_commit2(display, s);
+static bool test_cp_enable(igt_output_t *output, enum igt_commit_style s)
+{
+ igt_display_t *display = &data.display;
+ igt_plane_t *primary;
+ bool ret;
+
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- /* Wait for HDCP to be disabled for fresh start. */
- ret = wait_for_prop_value(output, 0, 1000);
- igt_assert_f(ret, "Content Protection not cleared\n");
+ igt_output_set_prop_value(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION, 1);
+ igt_display_commit2(display, s);
- igt_output_set_prop_value(output,
- IGT_CONNECTOR_CONTENT_PROTECTION, 1);
+ /* Wait for 18000mSec (3 authentication * 6Sec) */
+ ret = wait_for_prop_value(output, 2, 18000);
+ if (ret) {
+ igt_plane_set_fb(primary, &data.green);
igt_display_commit2(display, s);
+ }
- /* Wait for 18000mSec (3 authentication * 6Sec) */
- ret = wait_for_prop_value(output, 2, 18000);
- if (ret) {
- igt_plane_set_fb(primary, &green);
- igt_display_commit2(display, s);
- }
+ return ret;
+}
- if (!ret && --retry)
- igt_debug("Retry (%d/2) ...\n", 3 - retry);
- } while (retry && !ret);
+static void test_cp_disable(igt_output_t *output, enum igt_commit_style s)
+{
+ igt_display_t *display = &data.display;
+ igt_plane_t *primary;
+ bool ret;
+
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
/*
* Even on HDCP enable failed scenario, IGT should exit leaving the
* "content protection" at "UNDESIRED".
*/
igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
- igt_plane_set_fb(primary, &red);
+ igt_plane_set_fb(primary, &data.red);
igt_display_commit2(display, s);
- igt_assert_f(ret, "Content Protection not enabled\n");
-
/* Wait for HDCP to be disabled, before crtc off */
- wait_for_prop_value(output, 0, 1000);
+ ret = wait_for_prop_value(output, 0, 1000);
+ igt_assert_f(ret, "Content Protection not cleared\n");
+}
+
+static void test_cp_enable_with_retry(igt_output_t *output,
+ enum igt_commit_style s, int retry)
+{
+ bool ret;
- igt_plane_set_fb(primary, NULL);
- igt_output_set_pipe(output, PIPE_NONE);
+ do {
+ test_cp_disable(output, s);
+ ret = test_cp_enable(output, s);
+
+ if (!ret && --retry)
+ igt_debug("Retry (%d/2) ...\n", 3 - retry);
+ } while (retry && !ret);
+ igt_assert_f(ret, "Content Protection not enabled\n");
}
static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
@@ -200,11 +214,12 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
return true;
}
-static void
-test_content_protection_on_output(igt_output_t *output,
- enum igt_commit_style s)
+
+static void test_content_protection_on_output(igt_output_t *output,
+ enum igt_commit_style s)
{
igt_display_t *display = &data.display;
+ igt_plane_t *primary;
enum pipe pipe;
for_each_pipe(display, pipe) {
@@ -220,7 +235,14 @@ test_content_protection_on_output(igt_output_t *output,
if (!igt_pipe_is_free(display, pipe))
continue;
- test_cp_enable_disable(pipe, output, s);
+ modeset_with_fb(pipe, output, s);
+ test_cp_enable_with_retry(output, s, 3);
+ test_cp_disable(output, s);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
/*
* Testing a output with a pipe is enough for HDCP
@@ -229,7 +251,6 @@ test_content_protection_on_output(igt_output_t *output,
*/
break;
}
-
}
static void __debugfs_read(int fd, const char *param, char *buf, int len)
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
@ 2019-02-07 19:31 ` Ramalingam C
2019-02-07 19:38 ` [igt-dev] [PATCH i-g-t v3 " Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
2019-02-07 19:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2) Patchwork
2 siblings, 1 reply; 10+ messages in thread
From: Ramalingam C @ 2019-02-07 19:31 UTC (permalink / raw)
To: igt-dev, daniel
As we have two different patch for commitng the HDCP request
1. DDI_enable (during the modeset)
2. update_pipe (during fastset execution)
Currently our kms_content_protection covers only fastset path.
So this test adds the coverage for the HDCP during the modeset by
performing DPMS off-on and check for HDCP status.
But with respect to HDCP we allow few retries from userspace before
reporting the failure. So only first attempt at kernel will be on
modeset path, next retries will become fastset commiting of HDCP.
v2:
dpms test is added within existing implementation with a flag [Daniel]
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
tests/kms_content_protection.c | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index f6b441d891e5..e2d5134421aa 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -216,7 +216,8 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
static void test_content_protection_on_output(igt_output_t *output,
- enum igt_commit_style s)
+ enum igt_commit_style s,
+ bool dpms_test)
{
igt_display_t *display = &data.display;
igt_plane_t *primary;
@@ -237,8 +238,20 @@ static void test_content_protection_on_output(igt_output_t *output,
modeset_with_fb(pipe, output, s);
test_cp_enable_with_retry(output, s, 3);
- test_cp_disable(output, s);
+ if (dpms_test) {
+ igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
+ igt_display_commit2(display, s);
+
+ igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 1);
+ igt_display_commit2(display, s);
+
+ ret = wait_for_prop_value(output, 2, 18000);
+ if (!ret)
+ test_cp_enable_with_retry(output, s, 2);
+ }
+
+ test_cp_disable(output, s);
primary = igt_output_get_plane_type(output,
DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
@@ -282,7 +295,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
static void
-test_content_protection(enum igt_commit_style s)
+test_content_protection(enum igt_commit_style s, bool dpms_test)
{
igt_display_t *display = &data.display;
igt_output_t *output;
@@ -299,7 +312,7 @@ test_content_protection(enum igt_commit_style s)
continue;
}
- test_content_protection_on_output(output, s);
+ test_content_protection_on_output(output, s, dpms_test);
valid_tests++;
}
@@ -317,11 +330,16 @@ igt_main
}
igt_subtest("legacy")
- test_content_protection(COMMIT_LEGACY);
+ test_content_protection(COMMIT_LEGACY, false);
igt_subtest("atomic") {
igt_require(data.display.is_atomic);
- test_content_protection(COMMIT_ATOMIC);
+ test_content_protection(COMMIT_ATOMIC, false);
+ }
+
+ igt_subtest("atomic-dpms") {
+ igt_require(data.display.is_atomic);
+ test_content_protection(COMMIT_ATOMIC, true);
}
igt_fixture
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
@ 2019-02-07 19:31 ` Ramalingam C
2019-02-08 9:20 ` Daniel Vetter
2019-02-07 19:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2) Patchwork
2 siblings, 1 reply; 10+ messages in thread
From: Ramalingam C @ 2019-02-07 19:31 UTC (permalink / raw)
To: igt-dev, daniel
Once the HDCP is enabled, kernel will run the link integrity check(LIC)
atleast once in 2Secs based on the HDCP versions.
So to confirm the link integrity check is passed, we oberve that HDCP
state remains ENABLED for next 4Secs.
v2:
Rebased.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
tests/kms_content_protection.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index e2d5134421aa..234ba08fae0d 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -214,6 +214,14 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
return true;
}
+static void test_cp_lic(igt_output_t *output)
+{
+ bool ret;
+
+ /* Wait for 4Secs (min 2 cycles of Link Integrity Check) */
+ ret = wait_for_prop_value(output, 1, 4 * 1000);
+ igt_assert_f(!ret, "Content Protection LIC Failed\n");
+}
static void test_content_protection_on_output(igt_output_t *output,
enum igt_commit_style s,
@@ -238,6 +246,7 @@ static void test_content_protection_on_output(igt_output_t *output,
modeset_with_fb(pipe, output, s);
test_cp_enable_with_retry(output, s, 3);
+ test_cp_lic(output);
if (dpms_test) {
igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t v3 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
@ 2019-02-07 19:38 ` Ramalingam C
2019-02-08 9:19 ` Daniel Vetter
0 siblings, 1 reply; 10+ messages in thread
From: Ramalingam C @ 2019-02-07 19:38 UTC (permalink / raw)
To: igt-dev, daniel
As we have two different patch for commitng the HDCP request
1. DDI_enable (during the modeset)
2. update_pipe (during fastset execution)
Currently our kms_content_protection covers only fastset path.
So this test adds the coverage for the HDCP during the modeset by
performing DPMS off-on and check for HDCP status.
But with respect to HDCP we allow few retries from userspace before
reporting the failure. So only first attempt at kernel will be on
modeset path, next retries will become fastset commiting of HDCP.
v2:
dpms test is added within existing implementation with a flag [Daniel]
v3:
ret declared.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
tests/kms_content_protection.c | 33 +++++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index f6b441d891e5..7d82c733b378 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -216,11 +216,13 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
static void test_content_protection_on_output(igt_output_t *output,
- enum igt_commit_style s)
+ enum igt_commit_style s,
+ bool dpms_test)
{
igt_display_t *display = &data.display;
igt_plane_t *primary;
enum pipe pipe;
+ bool ret;
for_each_pipe(display, pipe) {
if (!igt_pipe_connector_valid(pipe, output))
@@ -237,8 +239,22 @@ static void test_content_protection_on_output(igt_output_t *output,
modeset_with_fb(pipe, output, s);
test_cp_enable_with_retry(output, s, 3);
- test_cp_disable(output, s);
+ if (dpms_test) {
+ igt_pipe_set_prop_value(display, pipe,
+ IGT_CRTC_ACTIVE, 0);
+ igt_display_commit2(display, s);
+
+ igt_pipe_set_prop_value(display, pipe,
+ IGT_CRTC_ACTIVE, 1);
+ igt_display_commit2(display, s);
+
+ ret = wait_for_prop_value(output, 2, 18000);
+ if (!ret)
+ test_cp_enable_with_retry(output, s, 2);
+ }
+
+ test_cp_disable(output, s);
primary = igt_output_get_plane_type(output,
DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
@@ -282,7 +298,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
static void
-test_content_protection(enum igt_commit_style s)
+test_content_protection(enum igt_commit_style s, bool dpms_test)
{
igt_display_t *display = &data.display;
igt_output_t *output;
@@ -299,7 +315,7 @@ test_content_protection(enum igt_commit_style s)
continue;
}
- test_content_protection_on_output(output, s);
+ test_content_protection_on_output(output, s, dpms_test);
valid_tests++;
}
@@ -317,11 +333,16 @@ igt_main
}
igt_subtest("legacy")
- test_content_protection(COMMIT_LEGACY);
+ test_content_protection(COMMIT_LEGACY, false);
igt_subtest("atomic") {
igt_require(data.display.is_atomic);
- test_content_protection(COMMIT_ATOMIC);
+ test_content_protection(COMMIT_ATOMIC, false);
+ }
+
+ igt_subtest("atomic-dpms") {
+ igt_require(data.display.is_atomic);
+ test_content_protection(COMMIT_ATOMIC, true);
}
igt_fixture
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2)
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
@ 2019-02-07 19:49 ` Patchwork
2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-02-07 19:49 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2)
URL : https://patchwork.freedesktop.org/series/56361/
State : failure
== Summary ==
Applying: kms_content_protection: modularizing the CP test steps
Applying: kms_content_protection: Test CP along with modeset
Applying: kms_content_protection: Confirm that LIC is passed
Patch failed at 0003 kms_content_protection: Confirm that LIC is passed
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v3 2/3] kms_content_protection: Test CP along with modeset
2019-02-07 19:38 ` [igt-dev] [PATCH i-g-t v3 " Ramalingam C
@ 2019-02-08 9:19 ` Daniel Vetter
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2019-02-08 9:19 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev, daniel
On Fri, Feb 08, 2019 at 01:08:57AM +0530, Ramalingam C wrote:
> As we have two different patch for commitng the HDCP request
> 1. DDI_enable (during the modeset)
> 2. update_pipe (during fastset execution)
>
> Currently our kms_content_protection covers only fastset path.
> So this test adds the coverage for the HDCP during the modeset by
> performing DPMS off-on and check for HDCP status.
>
> But with respect to HDCP we allow few retries from userspace before
> reporting the failure. So only first attempt at kernel will be on
> modeset path, next retries will become fastset commiting of HDCP.
>
> v2:
> dpms test is added within existing implementation with a flag [Daniel]
> v3:
> ret declared.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/kms_content_protection.c | 33 +++++++++++++++++++++++++++------
> 1 file changed, 27 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index f6b441d891e5..7d82c733b378 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -216,11 +216,13 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
>
>
> static void test_content_protection_on_output(igt_output_t *output,
> - enum igt_commit_style s)
> + enum igt_commit_style s,
> + bool dpms_test)
> {
> igt_display_t *display = &data.display;
> igt_plane_t *primary;
> enum pipe pipe;
> + bool ret;
>
> for_each_pipe(display, pipe) {
> if (!igt_pipe_connector_valid(pipe, output))
> @@ -237,8 +239,22 @@ static void test_content_protection_on_output(igt_output_t *output,
>
> modeset_with_fb(pipe, output, s);
> test_cp_enable_with_retry(output, s, 3);
> - test_cp_disable(output, s);
>
> + if (dpms_test) {
> + igt_pipe_set_prop_value(display, pipe,
> + IGT_CRTC_ACTIVE, 0);
> + igt_display_commit2(display, s);
> +
> + igt_pipe_set_prop_value(display, pipe,
> + IGT_CRTC_ACTIVE, 1);
> + igt_display_commit2(display, s);
> +
> + ret = wait_for_prop_value(output, 2, 18000);
> + if (!ret)
> + test_cp_enable_with_retry(output, s, 2);
> + }
> +
> + test_cp_disable(output, s);
> primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> igt_plane_set_fb(primary, NULL);
> @@ -282,7 +298,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
>
>
> static void
> -test_content_protection(enum igt_commit_style s)
> +test_content_protection(enum igt_commit_style s, bool dpms_test)
> {
> igt_display_t *display = &data.display;
> igt_output_t *output;
> @@ -299,7 +315,7 @@ test_content_protection(enum igt_commit_style s)
> continue;
> }
>
> - test_content_protection_on_output(output, s);
> + test_content_protection_on_output(output, s, dpms_test);
> valid_tests++;
> }
>
> @@ -317,11 +333,16 @@ igt_main
> }
>
> igt_subtest("legacy")
> - test_content_protection(COMMIT_LEGACY);
> + test_content_protection(COMMIT_LEGACY, false);
>
> igt_subtest("atomic") {
> igt_require(data.display.is_atomic);
> - test_content_protection(COMMIT_ATOMIC);
> + test_content_protection(COMMIT_ATOMIC, false);
> + }
> +
> + igt_subtest("atomic-dpms") {
> + igt_require(data.display.is_atomic);
> + test_content_protection(COMMIT_ATOMIC, true);
> }
>
> igt_fixture
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
@ 2019-02-08 9:20 ` Daniel Vetter
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2019-02-08 9:20 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev, daniel
On Fri, Feb 08, 2019 at 01:01:39AM +0530, Ramalingam C wrote:
> Once the HDCP is enabled, kernel will run the link integrity check(LIC)
> atleast once in 2Secs based on the HDCP versions.
>
> So to confirm the link integrity check is passed, we oberve that HDCP
> state remains ENABLED for next 4Secs.
>
> v2:
> Rebased.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Somehow my reply in the previous discussion didn't make it out to the
list.
> ---
> tests/kms_content_protection.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index e2d5134421aa..234ba08fae0d 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -214,6 +214,14 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
> return true;
> }
>
> +static void test_cp_lic(igt_output_t *output)
> +{
> + bool ret;
> +
> + /* Wait for 4Secs (min 2 cycles of Link Integrity Check) */
> + ret = wait_for_prop_value(output, 1, 4 * 1000);
> + igt_assert_f(!ret, "Content Protection LIC Failed\n");
> +}
With your explanation, makes sense now.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
It would be nice though to follow up with a patch to replace all the magic
numbers with some local #defines, e.g.
#define LOCAL_CONTENT_PROTECTION_DESIRED 1
Similar for others. That way we don't depend upon the header and stuff,
and the code becomes a lot less confusing.
-Daniel
>
> static void test_content_protection_on_output(igt_output_t *output,
> enum igt_commit_style s,
> @@ -238,6 +246,7 @@ static void test_content_protection_on_output(igt_output_t *output,
>
> modeset_with_fb(pipe, output, s);
> test_cp_enable_with_retry(output, s, 3);
> + test_cp_lic(output);
>
> if (dpms_test) {
> igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-02-08 9:20 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
2019-02-07 19:38 ` [igt-dev] [PATCH i-g-t v3 " Ramalingam C
2019-02-08 9:19 ` Daniel Vetter
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
2019-02-08 9:20 ` Daniel Vetter
2019-02-07 19:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-02-07 16:23 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
2019-02-07 16:23 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
2019-02-07 17:03 ` Daniel Vetter
2019-02-07 18:58 ` C, Ramalingam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox