* [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test
@ 2018-10-11 14:18 Ramalingam C
2018-10-11 14:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Ramalingam C @ 2018-10-11 14:18 UTC (permalink / raw)
To: igt-dev, daniel
Pretty simple test:
- picks the hdcp capable output
- chooses the PIPE and apply modeset
- apply a FB and wait for the flip completion.
- clears the content protection property
- verifies that it clears
- sets the content protection property to desired
- verifies that it transitions to enabled
- incase of timeout three reattempts are implemented
- clear the content protection property and modeset on the crtc
Does this in separate sub-test for both legacy and atomic for
each connector with valid pipe.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
lib/igt_kms.c | 1 +
lib/igt_kms.h | 1 +
tests/Makefile.sources | 1 +
tests/kms_content_protection.c | 269 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
5 files changed, 273 insertions(+)
create mode 100644 tests/kms_content_protection.c
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 62d8468415c6..4231996c65ca 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -194,6 +194,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_CRTC_ID] = "CRTC_ID",
[IGT_CONNECTOR_DPMS] = "DPMS",
[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
+ [IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
};
/*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 3a12f2782eed..aa068e58e607 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -120,6 +120,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_CRTC_ID,
IGT_CONNECTOR_DPMS,
IGT_CONNECTOR_BROADCAST_RGB,
+ IGT_CONNECTOR_CONTENT_PROTECTION,
IGT_NUM_CONNECTOR_PROPS
};
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c84933f1d971..5af68a61df51 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -174,6 +174,7 @@ TESTS_progs = \
kms_chv_cursor_fail \
kms_color \
kms_concurrent \
+ kms_content_protection\
kms_crtc_background_color \
kms_cursor_crc \
kms_cursor_legacy \
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
new file mode 100644
index 000000000000..fcc22d0b3b42
--- /dev/null
+++ b/tests/kms_content_protection.c
@@ -0,0 +1,269 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include <poll.h>
+#include "igt.h"
+
+IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
+
+typedef struct {
+ int drm_fd;
+ igt_display_t display;
+} data_t;
+
+static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
+ unsigned int tv_usec, void *data)
+{
+ igt_debug("Flip event received.\n");
+}
+
+static int wait_flip_event(data_t *data)
+{
+ int rc;
+ drmEventContext evctx;
+ struct pollfd pfd;
+
+ evctx.version = 2;
+ evctx.vblank_handler = NULL;
+ evctx.page_flip_handler = flip_handler;
+
+ pfd.fd = data->drm_fd;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
+
+ rc = poll(&pfd, 1, 1000);
+ switch (rc) {
+ case 0:
+ igt_info("Poll timeout. 1Sec.\n");
+ rc = -ETIMEDOUT;
+ break;
+ case 1:
+ rc = drmHandleEvent(data->drm_fd, &evctx);
+ igt_assert_eq(rc, 0);
+ rc = 0;
+ break;
+ default:
+ igt_info("Unexpected poll rc %d\n", rc);
+ rc = -1;
+ break;
+ }
+
+ return rc;
+}
+
+static bool
+wait_for_prop_value(igt_output_t *output, uint64_t expected,
+ uint32_t timeout_mSec)
+{
+ uint64_t val;
+ int i;
+
+ for (i = 0; i < timeout_mSec; i++) {
+ val = igt_output_get_prop(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION);
+ if (val == expected)
+ return true;
+ usleep(1000);
+ }
+ igt_info("prop_value mismatch %ld != %ld\n", val, expected);
+
+ return false;
+}
+
+static void
+commit_display_and_wait_for_flip(data_t *data, igt_display_t *display,
+ enum igt_commit_style s)
+{
+ int ret;
+ uint32_t flag;
+
+ if (s == COMMIT_ATOMIC) {
+ flag = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET;
+ igt_display_commit_atomic(display, flag, NULL);
+
+ ret = wait_flip_event(data);
+ igt_assert_f(!ret, "wait_flip_event failed. %d\n", ret);
+ } else {
+ igt_display_commit2(display, s);
+
+ /* Wait for 50mSec */
+ usleep(50 * 1000);
+ }
+}
+
+static void
+test_pipe_output(data_t *data, 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));
+
+ igt_output_override_mode(output, &mode);
+ igt_output_set_pipe(output, pipe);
+
+ 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);
+ 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);
+
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_display_commit2(display, s);
+
+ igt_plane_set_fb(primary, &red);
+
+ /* Wait for Flip completion before starting the HDCP authentication */
+ commit_display_and_wait_for_flip(data, display, s);
+
+ do {
+ igt_output_set_prop_value(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION, 0);
+ igt_display_commit2(display, s);
+
+ /* 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);
+
+ /* 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);
+ }
+
+ if (!ret && --retry)
+ igt_debug("Retry (%d/2) ...\n", 3 - retry);
+ } while (retry && !ret);
+
+ igt_assert_f(ret, "Content Protection not enabled\n");
+
+ igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
+ igt_plane_set_fb(primary, &red);
+ igt_display_commit2(display, s);
+
+ /* Wait for HDCP to be disabled, before crtc off */
+ wait_for_prop_value(output, 0, 1000);
+
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
+{
+ int i;
+
+ for (i = 0; i < display->n_outputs; i++)
+ if (display->outputs[i].pending_pipe == pipe)
+ return false;
+
+ return true;
+}
+
+static void
+test_content_protection_on_output(data_t *data, igt_output_t *output)
+{
+ igt_display_t *display = &data->display;
+ enum pipe pipe;
+ char test_name[50];
+
+ for_each_pipe_static(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;
+
+ sprintf(test_name, "HDCP_%s_PIPE-%s_legacy",
+ output->name,
+ kmstest_pipe_name(pipe));
+ igt_subtest(test_name)
+ test_pipe_output(data, pipe, output, COMMIT_LEGACY);
+
+ if (!display->is_atomic)
+ break;
+
+ sprintf(test_name, "HDCP_%s_PIPE-%s_atomic",
+ output->name,
+ kmstest_pipe_name(pipe));
+ igt_subtest(test_name)
+ test_pipe_output(data, pipe, output, COMMIT_ATOMIC);
+
+ /*
+ * 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;
+ }
+}
+
+igt_main
+{
+ data_t data = {};
+ igt_output_t *output;
+ int valid_tests = 0, i;
+
+ igt_fixture {
+ igt_skip_on_simulation();
+
+ data.drm_fd = drm_open_driver(DRIVER_ANY);
+
+ igt_display_init(&data.display, data.drm_fd);
+ }
+
+ for (i = 0; i < data.display.n_outputs; i++)
+ for_each_if((output = &(data.display.outputs[i]),
+ igt_output_is_connected(output))) {
+
+ if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
+ continue;
+
+ test_content_protection_on_output(&data, output);
+ valid_tests++;
+ }
+
+ if (!valid_tests)
+ igt_info("No Connector supports content proteciton\n");
+
+ igt_fixture
+ igt_display_fini(&data.display);
+}
diff --git a/tests/meson.build b/tests/meson.build
index 17deb945ec95..a74de4ff0ece 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -149,6 +149,7 @@ test_progs = [
'kms_chv_cursor_fail',
'kms_color',
'kms_concurrent',
+ 'kms_content_protection',
'kms_crtc_background_color',
'kms_cursor_crc',
'kms_cursor_legacy',
--
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] 11+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for kms_content_protection: Add Content Protection test
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
@ 2018-10-11 14:34 ` Patchwork
2018-10-11 15:03 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-11 14:34 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test
URL : https://patchwork.freedesktop.org/series/50869/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
54cb1aeb4e50dea9f3abae632e317875d147c4ab tests: Add chamelium formats subtests to vc4 test lists
230/254 testcase check: vgem_basic OK 0.08 s
231/254 testcase check: vgem_slow OK 0.07 s
232/254 testcase check: prime_nv_api OK 0.09 s
233/254 testcase check: prime_nv_pcopy OK 0.10 s
234/254 testcase check: prime_nv_test OK 0.10 s
235/254 testcase check: kms_chamelium OK 0.07 s
236/254 testcase check: gem_eio OK 0.08 s
237/254 testcase check: gem_mocs_settings OK 0.06 s
238/254 testcase check: perf_pmu OK 0.08 s
239/254 testcase check: testdisplay OK 0.08 s
240/254 testcase check: amdgpu/amd_basic OK 0.09 s
241/254 testcase check: amdgpu/amd_cs_nop OK 0.07 s
242/254 testcase check: amdgpu/amd_prime OK 0.07 s
243/254 runner OK 1.32 s
244/254 assembler: test/mov OK 0.02 s
245/254 assembler: test/frc OK 0.02 s
246/254 assembler: test/regtype OK 0.02 s
247/254 assembler: test/rndd OK 0.02 s
248/254 assembler: test/rndu OK 0.01 s
249/254 assembler: test/rnde OK 0.01 s
250/254 assembler: test/rnde-intsrc OK 0.02 s
251/254 assembler: test/rndz OK 0.01 s
252/254 assembler: test/lzd OK 0.02 s
253/254 assembler: test/not OK 0.01 s
254/254 assembler: test/immediate OK 0.01 s
OK: 253
FAIL: 1
SKIP: 0
TIMEOUT: 0
The output from the failed tests:
167/254 testcase check: kms_content_protection FAIL 0.07 s
--- command ---
/home/cidrm/igt-gpu-tools/tests/igt_command_line.sh kms_content_protection
--- stdout ---
tests/kms_content_protection:
Checking invalid option handling...
Checking valid option handling...
Checking subtest enumeration...
FAIL: tests/kms_content_protection
-------
Full log written to /home/cidrm/igt-gpu-tools/build/meson-logs/testlog.txt
FAILED: meson-test
/usr/bin/python3 -u /usr/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
2018-10-11 14:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-10-11 15:03 ` Daniel Vetter
2018-10-12 13:53 ` C, Ramalingam
2018-10-12 14:02 ` [igt-dev] [PATCH i-g-t v2] " Ramalingam C
` (5 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Daniel Vetter @ 2018-10-11 15:03 UTC (permalink / raw)
To: Ramalingam C; +Cc: IGT development
On Thu, Oct 11, 2018 at 4:20 PM Ramalingam C <ramalingam.c@intel.com> wrote:
>
> Pretty simple test:
> - picks the hdcp capable output
> - chooses the PIPE and apply modeset
> - apply a FB and wait for the flip completion.
> - clears the content protection property
> - verifies that it clears
> - sets the content protection property to desired
> - verifies that it transitions to enabled
> - incase of timeout three reattempts are implemented
> - clear the content protection property and modeset on the crtc
>
> Does this in separate sub-test for both legacy and atomic for
> each connector with valid pipe.
>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Some high-level comments:
- Code outside of igt_fixture/subtest can't depend upon hw state. This
should be caught when you run make check.
- subtest names must be static and not depend upon the machine config.
So no output names in there. Also, perhaps drop the pipe since you
seem to bail out as soon as you've found a pipe for your connector.
- The event only complicates your test logic. A blocking atomic commit
should be much easier.
- As discussed on irc, we need some igt_require/skip here to not run
when the sink doesn't do hdcp.
I think there's some more detail polishing here, but should be good at
least to get going.
-Daniel
> ---
> lib/igt_kms.c | 1 +
> lib/igt_kms.h | 1 +
> tests/Makefile.sources | 1 +
> tests/kms_content_protection.c | 269 +++++++++++++++++++++++++++++++++++++++++
> tests/meson.build | 1 +
> 5 files changed, 273 insertions(+)
> create mode 100644 tests/kms_content_protection.c
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 62d8468415c6..4231996c65ca 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -194,6 +194,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
> [IGT_CONNECTOR_CRTC_ID] = "CRTC_ID",
> [IGT_CONNECTOR_DPMS] = "DPMS",
> [IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
> + [IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
> };
>
> /*
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 3a12f2782eed..aa068e58e607 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -120,6 +120,7 @@ enum igt_atomic_connector_properties {
> IGT_CONNECTOR_CRTC_ID,
> IGT_CONNECTOR_DPMS,
> IGT_CONNECTOR_BROADCAST_RGB,
> + IGT_CONNECTOR_CONTENT_PROTECTION,
> IGT_NUM_CONNECTOR_PROPS
> };
>
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index c84933f1d971..5af68a61df51 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -174,6 +174,7 @@ TESTS_progs = \
> kms_chv_cursor_fail \
> kms_color \
> kms_concurrent \
> + kms_content_protection\
> kms_crtc_background_color \
> kms_cursor_crc \
> kms_cursor_legacy \
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> new file mode 100644
> index 000000000000..fcc22d0b3b42
> --- /dev/null
> +++ b/tests/kms_content_protection.c
> @@ -0,0 +1,269 @@
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +#include <poll.h>
> +#include "igt.h"
> +
> +IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
> +
> +typedef struct {
> + int drm_fd;
> + igt_display_t display;
> +} data_t;
> +
> +static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
> + unsigned int tv_usec, void *data)
> +{
> + igt_debug("Flip event received.\n");
> +}
> +
> +static int wait_flip_event(data_t *data)
> +{
> + int rc;
> + drmEventContext evctx;
> + struct pollfd pfd;
> +
> + evctx.version = 2;
> + evctx.vblank_handler = NULL;
> + evctx.page_flip_handler = flip_handler;
> +
> + pfd.fd = data->drm_fd;
> + pfd.events = POLLIN;
> + pfd.revents = 0;
> +
> + rc = poll(&pfd, 1, 1000);
> + switch (rc) {
> + case 0:
> + igt_info("Poll timeout. 1Sec.\n");
> + rc = -ETIMEDOUT;
> + break;
> + case 1:
> + rc = drmHandleEvent(data->drm_fd, &evctx);
> + igt_assert_eq(rc, 0);
> + rc = 0;
> + break;
> + default:
> + igt_info("Unexpected poll rc %d\n", rc);
> + rc = -1;
> + break;
> + }
> +
> + return rc;
> +}
> +
> +static bool
> +wait_for_prop_value(igt_output_t *output, uint64_t expected,
> + uint32_t timeout_mSec)
> +{
> + uint64_t val;
> + int i;
> +
> + for (i = 0; i < timeout_mSec; i++) {
> + val = igt_output_get_prop(output,
> + IGT_CONNECTOR_CONTENT_PROTECTION);
> + if (val == expected)
> + return true;
> + usleep(1000);
> + }
> + igt_info("prop_value mismatch %ld != %ld\n", val, expected);
> +
> + return false;
> +}
> +
> +static void
> +commit_display_and_wait_for_flip(data_t *data, igt_display_t *display,
> + enum igt_commit_style s)
> +{
> + int ret;
> + uint32_t flag;
> +
> + if (s == COMMIT_ATOMIC) {
> + flag = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET;
> + igt_display_commit_atomic(display, flag, NULL);
> +
> + ret = wait_flip_event(data);
> + igt_assert_f(!ret, "wait_flip_event failed. %d\n", ret);
> + } else {
> + igt_display_commit2(display, s);
> +
> + /* Wait for 50mSec */
> + usleep(50 * 1000);
> + }
> +}
> +
> +static void
> +test_pipe_output(data_t *data, 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));
> +
> + igt_output_override_mode(output, &mode);
> + igt_output_set_pipe(output, pipe);
> +
> + 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);
> + 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);
> +
> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> + igt_display_commit2(display, s);
> +
> + igt_plane_set_fb(primary, &red);
> +
> + /* Wait for Flip completion before starting the HDCP authentication */
> + commit_display_and_wait_for_flip(data, display, s);
> +
> + do {
> + igt_output_set_prop_value(output,
> + IGT_CONNECTOR_CONTENT_PROTECTION, 0);
> + igt_display_commit2(display, s);
> +
> + /* 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);
> +
> + /* 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);
> + }
> +
> + if (!ret && --retry)
> + igt_debug("Retry (%d/2) ...\n", 3 - retry);
> + } while (retry && !ret);
> +
> + igt_assert_f(ret, "Content Protection not enabled\n");
> +
> + igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
> + igt_plane_set_fb(primary, &red);
> + igt_display_commit2(display, s);
> +
> + /* Wait for HDCP to be disabled, before crtc off */
> + wait_for_prop_value(output, 0, 1000);
> +
> + igt_plane_set_fb(primary, NULL);
> + igt_output_set_pipe(output, PIPE_NONE);
> +}
> +
> +static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
> +{
> + int i;
> +
> + for (i = 0; i < display->n_outputs; i++)
> + if (display->outputs[i].pending_pipe == pipe)
> + return false;
> +
> + return true;
> +}
> +
> +static void
> +test_content_protection_on_output(data_t *data, igt_output_t *output)
> +{
> + igt_display_t *display = &data->display;
> + enum pipe pipe;
> + char test_name[50];
> +
> + for_each_pipe_static(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;
> +
> + sprintf(test_name, "HDCP_%s_PIPE-%s_legacy",
> + output->name,
> + kmstest_pipe_name(pipe));
> + igt_subtest(test_name)
> + test_pipe_output(data, pipe, output, COMMIT_LEGACY);
> +
> + if (!display->is_atomic)
> + break;
> +
> + sprintf(test_name, "HDCP_%s_PIPE-%s_atomic",
> + output->name,
> + kmstest_pipe_name(pipe));
> + igt_subtest(test_name)
> + test_pipe_output(data, pipe, output, COMMIT_ATOMIC);
> +
> + /*
> + * 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;
> + }
> +}
> +
> +igt_main
> +{
> + data_t data = {};
> + igt_output_t *output;
> + int valid_tests = 0, i;
> +
> + igt_fixture {
> + igt_skip_on_simulation();
> +
> + data.drm_fd = drm_open_driver(DRIVER_ANY);
> +
> + igt_display_init(&data.display, data.drm_fd);
> + }
> +
> + for (i = 0; i < data.display.n_outputs; i++)
> + for_each_if((output = &(data.display.outputs[i]),
> + igt_output_is_connected(output))) {
> +
> + if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
> + continue;
> +
> + test_content_protection_on_output(&data, output);
> + valid_tests++;
> + }
> +
> + if (!valid_tests)
> + igt_info("No Connector supports content proteciton\n");
> +
> + igt_fixture
> + igt_display_fini(&data.display);
> +}
> diff --git a/tests/meson.build b/tests/meson.build
> index 17deb945ec95..a74de4ff0ece 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -149,6 +149,7 @@ test_progs = [
> 'kms_chv_cursor_fail',
> 'kms_color',
> 'kms_concurrent',
> + 'kms_content_protection',
> 'kms_crtc_background_color',
> 'kms_cursor_crc',
> 'kms_cursor_legacy',
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test
2018-10-11 15:03 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
@ 2018-10-12 13:53 ` C, Ramalingam
0 siblings, 0 replies; 11+ messages in thread
From: C, Ramalingam @ 2018-10-12 13:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: IGT development
On 10/11/2018 8:33 PM, Daniel Vetter wrote:
> On Thu, Oct 11, 2018 at 4:20 PM Ramalingam C <ramalingam.c@intel.com> wrote:
>> Pretty simple test:
>> - picks the hdcp capable output
>> - chooses the PIPE and apply modeset
>> - apply a FB and wait for the flip completion.
>> - clears the content protection property
>> - verifies that it clears
>> - sets the content protection property to desired
>> - verifies that it transitions to enabled
>> - incase of timeout three reattempts are implemented
>> - clear the content protection property and modeset on the crtc
>>
>> Does this in separate sub-test for both legacy and atomic for
>> each connector with valid pipe.
>>
>> Signed-off-by: Sean Paul <seanpaul@chromium.org>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Some high-level comments:
>
> - Code outside of igt_fixture/subtest can't depend upon hw state. This
> should be caught when you run make check.
> - subtest names must be static and not depend upon the machine config.
> So no output names in there. Also, perhaps drop the pipe since you
> seem to bail out as soon as you've found a pipe for your connector.
Sure. adopting these points in the v2.
> - The event only complicates your test logic. A blocking atomic commit
> should be much easier.
That will help till the flip request submission right? Need the flip
completion indication. so in v2 still retaining the events.
> - As discussed on irc, we need some igt_require/skip here to not run
> when the sink doesn't do hdcp.
As we discussed we need the aux/i2c transfer for this purpose. Keeping
it for v3. focusing the subtest reorganizing in v2.
-Ram
>
> I think there's some more detail polishing here, but should be good at
> least to get going.
> -Daniel
>
>> ---
>> lib/igt_kms.c | 1 +
>> lib/igt_kms.h | 1 +
>> tests/Makefile.sources | 1 +
>> tests/kms_content_protection.c | 269 +++++++++++++++++++++++++++++++++++++++++
>> tests/meson.build | 1 +
>> 5 files changed, 273 insertions(+)
>> create mode 100644 tests/kms_content_protection.c
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>> index 62d8468415c6..4231996c65ca 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -194,6 +194,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
>> [IGT_CONNECTOR_CRTC_ID] = "CRTC_ID",
>> [IGT_CONNECTOR_DPMS] = "DPMS",
>> [IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
>> + [IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
>> };
>>
>> /*
>> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
>> index 3a12f2782eed..aa068e58e607 100644
>> --- a/lib/igt_kms.h
>> +++ b/lib/igt_kms.h
>> @@ -120,6 +120,7 @@ enum igt_atomic_connector_properties {
>> IGT_CONNECTOR_CRTC_ID,
>> IGT_CONNECTOR_DPMS,
>> IGT_CONNECTOR_BROADCAST_RGB,
>> + IGT_CONNECTOR_CONTENT_PROTECTION,
>> IGT_NUM_CONNECTOR_PROPS
>> };
>>
>> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
>> index c84933f1d971..5af68a61df51 100644
>> --- a/tests/Makefile.sources
>> +++ b/tests/Makefile.sources
>> @@ -174,6 +174,7 @@ TESTS_progs = \
>> kms_chv_cursor_fail \
>> kms_color \
>> kms_concurrent \
>> + kms_content_protection\
>> kms_crtc_background_color \
>> kms_cursor_crc \
>> kms_cursor_legacy \
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> new file mode 100644
>> index 000000000000..fcc22d0b3b42
>> --- /dev/null
>> +++ b/tests/kms_content_protection.c
>> @@ -0,0 +1,269 @@
>> +/*
>> + * Copyright © 2018 Intel Corporation
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the next
>> + * paragraph) shall be included in all copies or substantial portions of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>> + * IN THE SOFTWARE.
>> + *
>> + */
>> +
>> +#include <poll.h>
>> +#include "igt.h"
>> +
>> +IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
>> +
>> +typedef struct {
>> + int drm_fd;
>> + igt_display_t display;
>> +} data_t;
>> +
>> +static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
>> + unsigned int tv_usec, void *data)
>> +{
>> + igt_debug("Flip event received.\n");
>> +}
>> +
>> +static int wait_flip_event(data_t *data)
>> +{
>> + int rc;
>> + drmEventContext evctx;
>> + struct pollfd pfd;
>> +
>> + evctx.version = 2;
>> + evctx.vblank_handler = NULL;
>> + evctx.page_flip_handler = flip_handler;
>> +
>> + pfd.fd = data->drm_fd;
>> + pfd.events = POLLIN;
>> + pfd.revents = 0;
>> +
>> + rc = poll(&pfd, 1, 1000);
>> + switch (rc) {
>> + case 0:
>> + igt_info("Poll timeout. 1Sec.\n");
>> + rc = -ETIMEDOUT;
>> + break;
>> + case 1:
>> + rc = drmHandleEvent(data->drm_fd, &evctx);
>> + igt_assert_eq(rc, 0);
>> + rc = 0;
>> + break;
>> + default:
>> + igt_info("Unexpected poll rc %d\n", rc);
>> + rc = -1;
>> + break;
>> + }
>> +
>> + return rc;
>> +}
>> +
>> +static bool
>> +wait_for_prop_value(igt_output_t *output, uint64_t expected,
>> + uint32_t timeout_mSec)
>> +{
>> + uint64_t val;
>> + int i;
>> +
>> + for (i = 0; i < timeout_mSec; i++) {
>> + val = igt_output_get_prop(output,
>> + IGT_CONNECTOR_CONTENT_PROTECTION);
>> + if (val == expected)
>> + return true;
>> + usleep(1000);
>> + }
>> + igt_info("prop_value mismatch %ld != %ld\n", val, expected);
>> +
>> + return false;
>> +}
>> +
>> +static void
>> +commit_display_and_wait_for_flip(data_t *data, igt_display_t *display,
>> + enum igt_commit_style s)
>> +{
>> + int ret;
>> + uint32_t flag;
>> +
>> + if (s == COMMIT_ATOMIC) {
>> + flag = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET;
>> + igt_display_commit_atomic(display, flag, NULL);
>> +
>> + ret = wait_flip_event(data);
>> + igt_assert_f(!ret, "wait_flip_event failed. %d\n", ret);
>> + } else {
>> + igt_display_commit2(display, s);
>> +
>> + /* Wait for 50mSec */
>> + usleep(50 * 1000);
>> + }
>> +}
>> +
>> +static void
>> +test_pipe_output(data_t *data, 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));
>> +
>> + igt_output_override_mode(output, &mode);
>> + igt_output_set_pipe(output, pipe);
>> +
>> + 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);
>> + 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);
>> +
>> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>> + igt_display_commit2(display, s);
>> +
>> + igt_plane_set_fb(primary, &red);
>> +
>> + /* Wait for Flip completion before starting the HDCP authentication */
>> + commit_display_and_wait_for_flip(data, display, s);
>> +
>> + do {
>> + igt_output_set_prop_value(output,
>> + IGT_CONNECTOR_CONTENT_PROTECTION, 0);
>> + igt_display_commit2(display, s);
>> +
>> + /* 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);
>> +
>> + /* 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);
>> + }
>> +
>> + if (!ret && --retry)
>> + igt_debug("Retry (%d/2) ...\n", 3 - retry);
>> + } while (retry && !ret);
>> +
>> + igt_assert_f(ret, "Content Protection not enabled\n");
>> +
>> + igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
>> + igt_plane_set_fb(primary, &red);
>> + igt_display_commit2(display, s);
>> +
>> + /* Wait for HDCP to be disabled, before crtc off */
>> + wait_for_prop_value(output, 0, 1000);
>> +
>> + igt_plane_set_fb(primary, NULL);
>> + igt_output_set_pipe(output, PIPE_NONE);
>> +}
>> +
>> +static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
>> +{
>> + int i;
>> +
>> + for (i = 0; i < display->n_outputs; i++)
>> + if (display->outputs[i].pending_pipe == pipe)
>> + return false;
>> +
>> + return true;
>> +}
>> +
>> +static void
>> +test_content_protection_on_output(data_t *data, igt_output_t *output)
>> +{
>> + igt_display_t *display = &data->display;
>> + enum pipe pipe;
>> + char test_name[50];
>> +
>> + for_each_pipe_static(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;
>> +
>> + sprintf(test_name, "HDCP_%s_PIPE-%s_legacy",
>> + output->name,
>> + kmstest_pipe_name(pipe));
>> + igt_subtest(test_name)
>> + test_pipe_output(data, pipe, output, COMMIT_LEGACY);
>> +
>> + if (!display->is_atomic)
>> + break;
>> +
>> + sprintf(test_name, "HDCP_%s_PIPE-%s_atomic",
>> + output->name,
>> + kmstest_pipe_name(pipe));
>> + igt_subtest(test_name)
>> + test_pipe_output(data, pipe, output, COMMIT_ATOMIC);
>> +
>> + /*
>> + * 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;
>> + }
>> +}
>> +
>> +igt_main
>> +{
>> + data_t data = {};
>> + igt_output_t *output;
>> + int valid_tests = 0, i;
>> +
>> + igt_fixture {
>> + igt_skip_on_simulation();
>> +
>> + data.drm_fd = drm_open_driver(DRIVER_ANY);
>> +
>> + igt_display_init(&data.display, data.drm_fd);
>> + }
>> +
>> + for (i = 0; i < data.display.n_outputs; i++)
>> + for_each_if((output = &(data.display.outputs[i]),
>> + igt_output_is_connected(output))) {
>> +
>> + if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
>> + continue;
>> +
>> + test_content_protection_on_output(&data, output);
>> + valid_tests++;
>> + }
>> +
>> + if (!valid_tests)
>> + igt_info("No Connector supports content proteciton\n");
>> +
>> + igt_fixture
>> + igt_display_fini(&data.display);
>> +}
>> diff --git a/tests/meson.build b/tests/meson.build
>> index 17deb945ec95..a74de4ff0ece 100644
>> --- a/tests/meson.build
>> +++ b/tests/meson.build
>> @@ -149,6 +149,7 @@ test_progs = [
>> 'kms_chv_cursor_fail',
>> 'kms_color',
>> 'kms_concurrent',
>> + 'kms_content_protection',
>> 'kms_crtc_background_color',
>> 'kms_cursor_crc',
>> 'kms_cursor_legacy',
>> --
>> 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] 11+ messages in thread
* [igt-dev] [PATCH i-g-t v2] kms_content_protection: Add Content Protection test
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
2018-10-11 14:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-11 15:03 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
@ 2018-10-12 14:02 ` Ramalingam C
2018-10-17 11:53 ` [igt-dev] [PATCH i-g-t v3] " Ramalingam C
2018-10-12 16:36 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_content_protection: Add Content Protection test (rev2) Patchwork
` (4 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Ramalingam C @ 2018-10-12 14:02 UTC (permalink / raw)
To: igt-dev, daniel, thatslyude
Pretty simple test:
- picks the hdcp capable output with suitable pipe and apply modeset.
- apply a FB and wait for the flip completion.
- clears the content protection property
- verifies that it clears
- sets the content protection property to desired
- verifies that it transitions to enabled
- incase of timeout three reattempts are implemented
- clear the content protection property and modeset on the crtc
v2:
dynamic subtests are dropped [Daniel]
Above steps are repeated on all HDCP capable connectors for both
legacy and atomic subtests.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
lib/igt_kms.c | 1 +
lib/igt_kms.h | 1 +
tests/Makefile.sources | 1 +
tests/kms_content_protection.c | 282 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
5 files changed, 286 insertions(+)
create mode 100644 tests/kms_content_protection.c
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 62d8468415c6..4231996c65ca 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -194,6 +194,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_CRTC_ID] = "CRTC_ID",
[IGT_CONNECTOR_DPMS] = "DPMS",
[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
+ [IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
};
/*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 3a12f2782eed..aa068e58e607 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -120,6 +120,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_CRTC_ID,
IGT_CONNECTOR_DPMS,
IGT_CONNECTOR_BROADCAST_RGB,
+ IGT_CONNECTOR_CONTENT_PROTECTION,
IGT_NUM_CONNECTOR_PROPS
};
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c84933f1d971..5af68a61df51 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -174,6 +174,7 @@ TESTS_progs = \
kms_chv_cursor_fail \
kms_color \
kms_concurrent \
+ kms_content_protection\
kms_crtc_background_color \
kms_cursor_crc \
kms_cursor_legacy \
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
new file mode 100644
index 000000000000..6afc4e26bcb2
--- /dev/null
+++ b/tests/kms_content_protection.c
@@ -0,0 +1,282 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include <poll.h>
+#include "igt.h"
+
+IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
+
+typedef struct {
+ int drm_fd;
+ igt_display_t display;
+} data_t;
+
+static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
+ unsigned int tv_usec, void *data)
+{
+ igt_debug("Flip event received.\n");
+}
+
+static int wait_flip_event(data_t *data)
+{
+ int rc;
+ drmEventContext evctx;
+ struct pollfd pfd;
+
+ evctx.version = 2;
+ evctx.vblank_handler = NULL;
+ evctx.page_flip_handler = flip_handler;
+
+ pfd.fd = data->drm_fd;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
+
+ rc = poll(&pfd, 1, 1000);
+ switch (rc) {
+ case 0:
+ igt_info("Poll timeout. 1Sec.\n");
+ rc = -ETIMEDOUT;
+ break;
+ case 1:
+ rc = drmHandleEvent(data->drm_fd, &evctx);
+ igt_assert_eq(rc, 0);
+ rc = 0;
+ break;
+ default:
+ igt_info("Unexpected poll rc %d\n", rc);
+ rc = -1;
+ break;
+ }
+
+ return rc;
+}
+
+static bool
+wait_for_prop_value(igt_output_t *output, uint64_t expected,
+ uint32_t timeout_mSec)
+{
+ uint64_t val;
+ int i;
+
+ for (i = 0; i < timeout_mSec; i++) {
+ val = igt_output_get_prop(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION);
+ if (val == expected)
+ return true;
+ usleep(1000);
+ }
+ igt_info("prop_value mismatch %ld != %ld\n", val, expected);
+
+ return false;
+}
+
+static void
+commit_display_and_wait_for_flip(data_t *data, igt_display_t *display,
+ enum igt_commit_style s)
+{
+ int ret;
+ uint32_t flag;
+
+ if (s == COMMIT_ATOMIC) {
+ flag = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET;
+ igt_display_commit_atomic(display, flag, NULL);
+
+ ret = wait_flip_event(data);
+ igt_assert_f(!ret, "wait_flip_event failed. %d\n", ret);
+ } else {
+ igt_display_commit2(display, s);
+
+ /* Wait for 50mSec */
+ usleep(50 * 1000);
+ }
+}
+
+static void
+test_pipe_output(data_t *data, 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));
+
+ igt_output_override_mode(output, &mode);
+ igt_output_set_pipe(output, pipe);
+
+ 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);
+ 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);
+
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_display_commit2(display, s);
+
+ igt_plane_set_fb(primary, &red);
+
+ /* Wait for Flip completion before starting the HDCP authentication */
+ commit_display_and_wait_for_flip(data, display, s);
+
+ do {
+ igt_output_set_prop_value(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION, 0);
+ igt_display_commit2(display, s);
+
+ /* 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);
+
+ /* 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);
+ }
+
+ if (!ret && --retry)
+ igt_debug("Retry (%d/2) ...\n", 3 - retry);
+ } while (retry && !ret);
+
+ igt_assert_f(ret, "Content Protection not enabled\n");
+
+ igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
+ igt_plane_set_fb(primary, &red);
+ igt_display_commit2(display, s);
+
+ /* Wait for HDCP to be disabled, before crtc off */
+ wait_for_prop_value(output, 0, 1000);
+
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
+{
+ int i;
+
+ for (i = 0; i < display->n_outputs; i++)
+ if (display->outputs[i].pending_pipe == pipe)
+ return false;
+
+ return true;
+}
+
+static void
+test_content_protection_on_output(data_t *data, igt_output_t *output,
+ enum igt_commit_style s)
+{
+ igt_display_t *display = &data->display;
+ enum pipe pipe;
+
+ 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;
+
+ /* To indicate the connector and pipe under test */
+ igt_debug("CP Test execution on %s:PIPE-%s\n", output->name,
+ kmstest_pipe_name(pipe));
+
+ test_pipe_output(data, pipe, output, s);
+
+ /*
+ * 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_content_protection(data_t *data, 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;
+
+ /*
+ * TODO: Skip the connector if the connected sink is
+ * not capable of HDCP, to avoid false alarm of hdcp
+ * failure on this connector.
+ * Possibly do a aux or I2C Transfer to detect the
+ * sink's HDCP capability. Other possibility is run the
+ * kms_content_protection on the connectors where known
+ * HDCP sinks are connected.
+ */
+
+ test_content_protection_on_output(data, output, s);
+ valid_tests++;
+ }
+
+ igt_require_f(valid_tests, "No connector found with HDCP capability\n");
+}
+
+igt_main
+{
+ data_t data = {};
+
+ igt_fixture {
+ igt_skip_on_simulation();
+
+ data.drm_fd = drm_open_driver(DRIVER_ANY);
+
+ igt_display_init(&data.display, data.drm_fd);
+ }
+
+ igt_subtest("legacy")
+ test_content_protection(&data, COMMIT_LEGACY);
+
+ igt_subtest("atomic") {
+ igt_require(data.display.is_atomic);
+ test_content_protection(&data, COMMIT_ATOMIC);
+ }
+
+ igt_fixture
+ igt_display_fini(&data.display);
+}
diff --git a/tests/meson.build b/tests/meson.build
index 17deb945ec95..a74de4ff0ece 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -149,6 +149,7 @@ test_progs = [
'kms_chv_cursor_fail',
'kms_color',
'kms_concurrent',
+ 'kms_content_protection',
'kms_crtc_background_color',
'kms_cursor_crc',
'kms_cursor_legacy',
--
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] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for kms_content_protection: Add Content Protection test (rev2)
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
` (2 preceding siblings ...)
2018-10-12 14:02 ` [igt-dev] [PATCH i-g-t v2] " Ramalingam C
@ 2018-10-12 16:36 ` Patchwork
2018-10-12 19:10 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-12 16:36 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test (rev2)
URL : https://patchwork.freedesktop.org/series/50869/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4973 -> IGTPW_1947 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50869/revisions/2/mbox/
== Known issues ==
Here are the changes found in IGTPW_1947 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload:
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
igt@drv_selftest@live_gem:
{fi-apl-guc}: NOTRUN -> INCOMPLETE (fdo#106693)
igt@kms_frontbuffer_tracking@basic:
fi-icl-u2: SKIP -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-cfl-8109u: PASS -> DMESG-WARN (fdo#106107)
==== Possible fixes ====
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#106107 https://bugs.freedesktop.org/show_bug.cgi?id=106107
fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
== Participating hosts (43 -> 40) ==
Additional (4): fi-skl-guc fi-icl-u fi-gdg-551 fi-apl-guc
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-glk-j4005 fi-pnv-d510
== Build changes ==
* IGT: IGT_4673 -> IGTPW_1947
CI_DRM_4973: 60ba18212b324d02e961232953f190612d7a6ca3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1947: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1947/
IGT_4673: 54cb1aeb4e50dea9f3abae632e317875d147c4ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_content_protection@atomic
+igt@kms_content_protection@legacy
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1947/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for kms_content_protection: Add Content Protection test (rev2)
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
` (3 preceding siblings ...)
2018-10-12 16:36 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_content_protection: Add Content Protection test (rev2) Patchwork
@ 2018-10-12 19:10 ` Patchwork
2018-10-17 13:17 ` [igt-dev] ✗ Fi.CI.BAT: failure for kms_content_protection: Add Content Protection test (rev3) Patchwork
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-12 19:10 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test (rev2)
URL : https://patchwork.freedesktop.org/series/50869/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4673_full -> IGTPW_1947_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1947_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1947_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50869/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1947_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_color@pipe-b-ctm-max:
shard-apl: PASS -> DMESG-WARN +18
{igt@kms_content_protection@atomic}:
shard-kbl: NOTRUN -> DMESG-FAIL +1
shard-hsw: NOTRUN -> DMESG-FAIL +1
shard-apl: NOTRUN -> DMESG-FAIL +1
{igt@kms_content_protection@legacy}:
shard-glk: NOTRUN -> DMESG-FAIL +1
igt@kms_cursor_crc@cursor-64x21-onscreen:
shard-kbl: PASS -> DMESG-WARN +15
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c-frame-sequence:
shard-glk: PASS -> DMESG-WARN +94
igt@kms_vblank@pipe-a-ts-continuation-modeset:
shard-apl: PASS -> DMESG-FAIL +1
igt@kms_vblank@pipe-b-query-busy:
shard-hsw: PASS -> DMESG-WARN +169
==== Warnings ====
igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
shard-glk: FAIL (fdo#103166) -> DMESG-WARN +1
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1947_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_await@wide-contexts:
shard-apl: PASS -> FAIL (fdo#106680)
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-apl: PASS -> FAIL (fdo#106641)
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-apl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_cursor_crc@cursor-256x256-dpms:
shard-glk: PASS -> FAIL (fdo#103232) +4
igt@kms_cursor_crc@cursor-256x85-sliding:
shard-kbl: PASS -> FAIL (fdo#103232) +1
shard-apl: PASS -> FAIL (fdo#103232) +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
shard-kbl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
shard-glk: PASS -> FAIL (fdo#103167) +7
igt@kms_plane@plane-position-covered-pipe-c-planes:
shard-glk: PASS -> DMESG-FAIL (fdo#103166)
shard-kbl: PASS -> FAIL (fdo#103166)
igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
shard-glk: PASS -> FAIL (fdo#108145) +1
shard-kbl: PASS -> FAIL (fdo#108145)
shard-apl: PASS -> FAIL (fdo#108145)
igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
shard-glk: PASS -> DMESG-FAIL (fdo#108145)
igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
shard-kbl: NOTRUN -> FAIL (fdo#108146)
igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
shard-apl: PASS -> FAIL (fdo#103166) +1
igt@kms_rotation_crc@primary-rotation-180:
shard-snb: PASS -> FAIL (fdo#103925)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
igt@perf@polling:
shard-hsw: PASS -> FAIL (fdo#102252)
igt@testdisplay:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
==== Possible fixes ====
igt@gem_exec_basic@readonly-bsd:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@gem_mmap@bad-object:
shard-apl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS
igt@kms_addfb_basic@bo-too-small-due-to-tiling:
shard-snb: DMESG-WARN (fdo#107469) -> PASS +4
igt@kms_chv_cursor_fail@pipe-c-128x128-right-edge:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS
igt@kms_color@pipe-c-legacy-gamma:
shard-kbl: FAIL (fdo#104782) -> PASS
shard-apl: FAIL (fdo#104782) -> PASS
igt@kms_cursor_crc@cursor-128x128-random:
shard-apl: FAIL (fdo#103232) -> PASS +1
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
shard-glk: FAIL (fdo#103167) -> PASS +5
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
shard-kbl: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
shard-glk: FAIL (fdo#108145) -> PASS
igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
shard-apl: FAIL (fdo#108145) -> PASS
igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
shard-apl: FAIL (fdo#103166) -> PASS +2
igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
shard-kbl: FAIL (fdo#103166) -> PASS
igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
shard-glk: FAIL (fdo#103166) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
igt@perf_pmu@rc6-runtime-pm:
shard-apl: FAIL (fdo#105010) -> PASS
igt@perf_pmu@rc6-runtime-pm-long:
shard-kbl: FAIL (fdo#105010) -> PASS
==== Warnings ====
igt@kms_setmode@basic:
shard-glk: FAIL (fdo#99912) -> DMESG-FAIL (fdo#99912)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
fdo#107469 https://bugs.freedesktop.org/show_bug.cgi?id=107469
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* IGT: IGT_4673 -> IGTPW_1947
* Linux: CI_DRM_4958 -> CI_DRM_4973
CI_DRM_4958: 9990e1665029dc2ef4a9c0632b8a2f516263e595 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4973: 60ba18212b324d02e961232953f190612d7a6ca3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1947: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1947/
IGT_4673: 54cb1aeb4e50dea9f3abae632e317875d147c4ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1947/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t v3] kms_content_protection: Add Content Protection test
2018-10-12 14:02 ` [igt-dev] [PATCH i-g-t v2] " Ramalingam C
@ 2018-10-17 11:53 ` Ramalingam C
0 siblings, 0 replies; 11+ messages in thread
From: Ramalingam C @ 2018-10-17 11:53 UTC (permalink / raw)
To: igt-dev, daniel.vetter
Pretty simple test:
- picks the hdcp capable output with suitable pipe and apply modeset.
- checks the connected sink's hdcp capability through debugfs
- apply a FB and wait for the flip completion.
- clears the content protection property
- verifies that it clears
- sets the content protection property to desired
- verifies that it transitions to enabled
- incase of timeout three reattempts are implemented
- clear the content protection property and modeset on the crtc
Above steps are repeated on all HDCP capable connectors for both
legacy and atomic subtests.
v2:
dynamic subtests are dropped [Daniel]
v3:
debugfs is used to detect the sink's hdcp capability [Daniel]
data structure is made as global variable.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
lib/igt_kms.c | 1 +
lib/igt_kms.h | 1 +
tests/Makefile.sources | 1 +
tests/kms_content_protection.c | 323 +++++++++++++++++++++++++++++++++++++++++
tests/meson.build | 1 +
5 files changed, 327 insertions(+)
create mode 100644 tests/kms_content_protection.c
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 62d8468415c6..4231996c65ca 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -194,6 +194,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_CRTC_ID] = "CRTC_ID",
[IGT_CONNECTOR_DPMS] = "DPMS",
[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
+ [IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
};
/*
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 3a12f2782eed..aa068e58e607 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -120,6 +120,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_CRTC_ID,
IGT_CONNECTOR_DPMS,
IGT_CONNECTOR_BROADCAST_RGB,
+ IGT_CONNECTOR_CONTENT_PROTECTION,
IGT_NUM_CONNECTOR_PROPS
};
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c84933f1d971..5af68a61df51 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -174,6 +174,7 @@ TESTS_progs = \
kms_chv_cursor_fail \
kms_color \
kms_concurrent \
+ kms_content_protection\
kms_crtc_background_color \
kms_cursor_crc \
kms_cursor_legacy \
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
new file mode 100644
index 000000000000..fc20cba89947
--- /dev/null
+++ b/tests/kms_content_protection.c
@@ -0,0 +1,323 @@
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include <poll.h>
+#include "igt.h"
+#include "igt_sysfs.h"
+
+IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
+
+struct data {
+ int drm_fd;
+ int debugfs;
+ igt_display_t display;
+} data;
+
+
+static void flip_handler(int fd, unsigned int sequence, unsigned int tv_sec,
+ unsigned int tv_usec, void *_data)
+{
+ igt_debug("Flip event received.\n");
+}
+
+static int wait_flip_event(void)
+{
+ int rc;
+ drmEventContext evctx;
+ struct pollfd pfd;
+
+ evctx.version = 2;
+ evctx.vblank_handler = NULL;
+ evctx.page_flip_handler = flip_handler;
+
+ pfd.fd = data.drm_fd;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
+
+ rc = poll(&pfd, 1, 1000);
+ switch (rc) {
+ case 0:
+ igt_info("Poll timeout. 1Sec.\n");
+ rc = -ETIMEDOUT;
+ break;
+ case 1:
+ rc = drmHandleEvent(data.drm_fd, &evctx);
+ igt_assert_eq(rc, 0);
+ rc = 0;
+ break;
+ default:
+ igt_info("Unexpected poll rc %d\n", rc);
+ rc = -1;
+ break;
+ }
+
+ return rc;
+}
+
+static bool
+wait_for_prop_value(igt_output_t *output, uint64_t expected,
+ uint32_t timeout_mSec)
+{
+ uint64_t val;
+ int i;
+
+ for (i = 0; i < timeout_mSec; i++) {
+ val = igt_output_get_prop(output,
+ IGT_CONNECTOR_CONTENT_PROTECTION);
+ if (val == expected)
+ return true;
+ usleep(1000);
+ }
+ igt_info("prop_value mismatch %ld != %ld\n", val, expected);
+
+ return false;
+}
+
+static void
+commit_display_and_wait_for_flip(enum igt_commit_style s)
+{
+ int ret;
+ uint32_t flag;
+
+ if (s == COMMIT_ATOMIC) {
+ flag = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_ALLOW_MODESET;
+ igt_display_commit_atomic(&data.display, flag, NULL);
+
+ ret = wait_flip_event();
+ igt_assert_f(!ret, "wait_flip_event failed. %d\n", ret);
+ } else {
+ igt_display_commit2(&data.display, s);
+
+ /* Wait for 50mSec */
+ usleep(50 * 1000);
+ }
+}
+
+static void
+test_cp_enable_disable(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));
+
+ igt_output_override_mode(output, &mode);
+ igt_output_set_pipe(output, pipe);
+
+ 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);
+ 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);
+
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_display_commit2(display, s);
+
+ igt_plane_set_fb(primary, &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);
+
+ /* 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);
+
+ /* 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);
+ }
+
+ if (!ret && --retry)
+ igt_debug("Retry (%d/2) ...\n", 3 - retry);
+ } while (retry && !ret);
+
+ igt_assert_f(ret, "Content Protection not enabled\n");
+
+ igt_output_set_prop_value(output, IGT_CONNECTOR_CONTENT_PROTECTION, 0);
+ igt_plane_set_fb(primary, &red);
+ igt_display_commit2(display, s);
+
+ /* Wait for HDCP to be disabled, before crtc off */
+ wait_for_prop_value(output, 0, 1000);
+
+ igt_plane_set_fb(primary, NULL);
+ igt_output_set_pipe(output, PIPE_NONE);
+}
+
+static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
+{
+ int i;
+
+ for (i = 0; i < display->n_outputs; i++)
+ if (display->outputs[i].pending_pipe == pipe)
+ return false;
+
+ return true;
+}
+
+static void
+test_content_protection_on_output(igt_output_t *output,
+ enum igt_commit_style s)
+{
+ igt_display_t *display = &data.display;
+ enum pipe pipe;
+
+ 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;
+
+ /* To indicate the connector and pipe under test */
+ igt_info("CP Test execution on %s:PIPE-%s\n", output->name,
+ kmstest_pipe_name(pipe));
+
+ test_cp_enable_disable(pipe, output, s);
+
+ /*
+ * 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 __debugfs_read(const char *param, char *buf, int len)
+{
+ len = igt_debugfs_simple_read(data.debugfs, param, buf, len);
+ if (len < 0)
+ igt_assert_eq(len, -ENODEV);
+}
+
+#define debugfs_read(p, arr) __debugfs_read(p, arr, sizeof(arr))
+
+#define MAX_SINK_HDCP_CAP_BUF_LEN 1000
+static bool sink_hdcp_capable(igt_output_t *output)
+{
+ char buf[MAX_SINK_HDCP_CAP_BUF_LEN];
+ char name[100], sink_cap[100];
+ char *ptr, *ptr2;
+
+ sprintf(name, "%s", output->name);
+ debugfs_read("i915_sinks_hdcp_capabilities", buf);
+
+ /* Locating the string for output */
+ ptr = strstr(buf, name);
+ if (!ptr)
+ return false;
+
+ /* Extracting the cap of the sink on output alone */
+ ptr2 = strchr(ptr, '\n');
+ if (ptr2)
+ strncpy(sink_cap, ptr, strlen(ptr)-strlen(ptr2));
+ else
+ strcpy(sink_cap, ptr);
+
+ igt_debug("Sink HDCP capability: %s\n", sink_cap);
+
+ return strstr(sink_cap, "HDCP1.4");
+}
+
+
+static void
+test_content_protection(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;
+
+ if (!sink_hdcp_capable(output))
+ continue;
+ /*
+ * TODO: Skip the connector if the connected sink is
+ * not capable of HDCP, to avoid false alarm of hdcp
+ * failure on this connector.
+ * Possibly do a aux or I2C Transfer to detect the
+ * sink's HDCP capability. Other possibility is run the
+ * kms_content_protection on the connectors where known
+ * HDCP sinks are connected.
+ */
+
+ test_content_protection_on_output(output, s);
+ valid_tests++;
+ }
+
+ igt_require_f(valid_tests, "No connector found with HDCP capability\n");
+}
+
+igt_main
+{
+ igt_fixture {
+ igt_skip_on_simulation();
+
+ data.drm_fd = drm_open_driver(DRIVER_ANY);
+
+ igt_display_init(&data.display, data.drm_fd);
+
+ data.debugfs = igt_debugfs_dir(data.drm_fd);
+ }
+
+ igt_subtest("legacy")
+ test_content_protection(COMMIT_LEGACY);
+
+ igt_subtest("atomic") {
+ igt_require(data.display.is_atomic);
+ test_content_protection(COMMIT_ATOMIC);
+ }
+
+ igt_fixture
+ igt_display_fini(&data.display);
+}
diff --git a/tests/meson.build b/tests/meson.build
index 17deb945ec95..a74de4ff0ece 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -149,6 +149,7 @@ test_progs = [
'kms_chv_cursor_fail',
'kms_color',
'kms_concurrent',
+ 'kms_content_protection',
'kms_crtc_background_color',
'kms_cursor_crc',
'kms_cursor_legacy',
--
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] 11+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for kms_content_protection: Add Content Protection test (rev3)
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
` (4 preceding siblings ...)
2018-10-12 19:10 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-10-17 13:17 ` Patchwork
2018-10-17 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-10-17 18:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-17 13:17 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test (rev3)
URL : https://patchwork.freedesktop.org/series/50869/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4994 -> IGTPW_1957 =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1957 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1957, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50869/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1957:
=== IGT changes ===
==== Possible regressions ====
igt@gem_mmap_gtt@basic-wc:
fi-blb-e6850: PASS -> FAIL
== Known issues ==
Here are the changes found in IGTPW_1957 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_chamelium@dp-edid-read:
fi-kbl-7500u: PASS -> WARN (fdo#102672)
igt@kms_flip@basic-flip-vs-dpms:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-cfl-8109u: INCOMPLETE (fdo#108126, fdo#107187) -> PASS
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#107139, fdo#105128) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-WARN (fdo#102614) -> PASS
fi-icl-u2: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#103191, fdo#107362) -> PASS
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107187 https://bugs.freedesktop.org/show_bug.cgi?id=107187
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126
== Participating hosts (46 -> 40) ==
Additional (1): fi-icl-u
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-kbl-7560u
== Build changes ==
* IGT: IGT_4682 -> IGTPW_1957
CI_DRM_4994: a587d260a1db3d6660c4148a5b3055f525bc7938 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1957: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1957/
IGT_4682: 0ac43db33e116b546e5704fe0b4dde21f391e09c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_content_protection@atomic
+igt@kms_content_protection@legacy
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1957/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for kms_content_protection: Add Content Protection test (rev3)
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
` (5 preceding siblings ...)
2018-10-17 13:17 ` [igt-dev] ✗ Fi.CI.BAT: failure for kms_content_protection: Add Content Protection test (rev3) Patchwork
@ 2018-10-17 15:21 ` Patchwork
2018-10-17 18:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-17 15:21 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test (rev3)
URL : https://patchwork.freedesktop.org/series/50869/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4994 -> IGTPW_1961 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50869/revisions/3/mbox/
== Known issues ==
Here are the changes found in IGTPW_1961 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#106685)
igt@kms_flip@basic-flip-vs-modeset:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998) +1
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: PASS -> FAIL (fdo#103167)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-cfl-8109u: INCOMPLETE (fdo#107187, fdo#108126) -> PASS
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#105128, fdo#107139) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-WARN (fdo#102614) -> PASS
fi-icl-u2: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#103191, fdo#107362) -> PASS
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#106685 https://bugs.freedesktop.org/show_bug.cgi?id=106685
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107187 https://bugs.freedesktop.org/show_bug.cgi?id=107187
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126
== Participating hosts (46 -> 43) ==
Additional (1): fi-icl-u
Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* IGT: IGT_4682 -> IGTPW_1961
CI_DRM_4994: a587d260a1db3d6660c4148a5b3055f525bc7938 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1961: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1961/
IGT_4682: 0ac43db33e116b546e5704fe0b4dde21f391e09c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_content_protection@atomic
+igt@kms_content_protection@legacy
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1961/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for kms_content_protection: Add Content Protection test (rev3)
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
` (6 preceding siblings ...)
2018-10-17 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2018-10-17 18:20 ` Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-17 18:20 UTC (permalink / raw)
To: Ramalingam C; +Cc: igt-dev
== Series Details ==
Series: kms_content_protection: Add Content Protection test (rev3)
URL : https://patchwork.freedesktop.org/series/50869/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4682_full -> IGTPW_1961_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1961_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1961_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50869/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1961_full:
=== IGT changes ===
==== Possible regressions ====
{igt@kms_content_protection@atomic}:
shard-kbl: NOTRUN -> FAIL +1
shard-hsw: NOTRUN -> FAIL +1
shard-apl: NOTRUN -> FAIL +1
{igt@kms_content_protection@legacy}:
shard-glk: NOTRUN -> FAIL +1
==== Warnings ====
igt@kms_plane@plane-position-hole-dpms-pipe-a-planes:
shard-snb: SKIP -> PASS +5
== Known issues ==
Here are the changes found in IGTPW_1961_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-glk: PASS -> INCOMPLETE (fdo#103359, fdo#106886, k.org#198133)
igt@gem_exec_schedule@pi-ringfull-bsd:
shard-glk: NOTRUN -> FAIL (fdo#103158) +2
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: PASS -> INCOMPLETE (fdo#106023, fdo#103665)
igt@gem_pwrite_pread@snooped-pwrite-blt-cpu_mmap-correctness:
shard-snb: NOTRUN -> INCOMPLETE (fdo#105411)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-glk: NOTRUN -> FAIL (fdo#106641)
igt@kms_busy@extended-modeset-hang-newfb-render-b:
shard-hsw: NOTRUN -> DMESG-WARN (fdo#107956) +4
igt@kms_busy@extended-modeset-hang-newfb-render-c:
shard-kbl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
shard-snb: NOTRUN -> DMESG-WARN (fdo#107956) +3
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
shard-hsw: PASS -> DMESG-WARN (fdo#107956)
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-glk: NOTRUN -> DMESG-WARN (fdo#107956) +4
igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
shard-glk: PASS -> FAIL (fdo#108145)
igt@kms_cursor_crc@cursor-128x42-onscreen:
shard-kbl: PASS -> FAIL (fdo#103232) +1
igt@kms_cursor_crc@cursor-256x85-random:
shard-apl: PASS -> FAIL (fdo#103232) +4
igt@kms_cursor_crc@cursor-64x64-suspend:
shard-glk: PASS -> FAIL (fdo#103232) +1
igt@kms_cursor_crc@cursor-size-change:
shard-glk: NOTRUN -> FAIL (fdo#103232) +2
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: NOTRUN -> FAIL (fdo#105363)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
shard-kbl: PASS -> FAIL (fdo#103167) +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
shard-apl: PASS -> FAIL (fdo#103167) +3
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
shard-glk: PASS -> FAIL (fdo#103167) +7
igt@kms_frontbuffer_tracking@fbc-1p-rte:
shard-kbl: PASS -> FAIL (fdo#103167, fdo#105682)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
shard-glk: NOTRUN -> FAIL (fdo#103167) +7
igt@kms_plane@plane-position-covered-pipe-a-planes:
shard-glk: NOTRUN -> FAIL (fdo#103166) +5
igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
shard-glk: NOTRUN -> FAIL (fdo#108146)
igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
shard-glk: NOTRUN -> FAIL (fdo#108145) +4
igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
shard-kbl: PASS -> FAIL (fdo#103166)
shard-apl: PASS -> FAIL (fdo#103166) +1
igt@kms_setmode@basic:
shard-hsw: NOTRUN -> FAIL (fdo#99912)
==== Possible fixes ====
igt@kms_available_modes_crc@available_mode_test_crc:
shard-apl: FAIL (fdo#106641) -> PASS
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
shard-hsw: DMESG-WARN (fdo#107956) -> PASS
igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
shard-glk: FAIL (fdo#108145) -> PASS
igt@kms_cursor_crc@cursor-128x128-onscreen:
shard-kbl: FAIL (fdo#103232) -> PASS +1
shard-apl: FAIL (fdo#103232) -> PASS +1
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-apl: FAIL (fdo#103191, fdo#103232) -> PASS +1
shard-kbl: FAIL (fdo#103191, fdo#103232) -> PASS
igt@kms_cursor_crc@cursor-256x256-dpms:
shard-glk: FAIL (fdo#103232) -> PASS +1
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-kbl: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
shard-glk: FAIL (fdo#103167) -> PASS +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
shard-apl: FAIL (fdo#103167) -> PASS +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-kbl: FAIL (fdo#103167) -> PASS +1
igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
shard-apl: FAIL (fdo#103166) -> PASS +1
shard-kbl: FAIL (fdo#103166) -> PASS
igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
shard-apl: DMESG-FAIL (fdo#103166, fdo#103558, fdo#105602) -> PASS +1
igt@kms_rotation_crc@sprite-rotation-90-pos-100-0:
shard-apl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS +15
igt@perf_pmu@semaphore-wait-vecs0:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
==== Warnings ====
igt@kms_plane@pixel-format-pipe-c-planes:
shard-apl: DMESG-FAIL (fdo#103166, fdo#103558, fdo#105602) -> FAIL (fdo#103166)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* IGT: IGT_4682 -> IGTPW_1961
* Linux: CI_DRM_4990 -> CI_DRM_4994
CI_DRM_4990: 0bd34d92e9a27784cb988a300619f497ca0e99ec @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4994: a587d260a1db3d6660c4148a5b3055f525bc7938 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1961: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1961/
IGT_4682: 0ac43db33e116b546e5704fe0b4dde21f391e09c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1961/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-10-17 18:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 14:18 [igt-dev] [PATCH i-g-t] kms_content_protection: Add Content Protection test Ramalingam C
2018-10-11 14:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-11 15:03 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2018-10-12 13:53 ` C, Ramalingam
2018-10-12 14:02 ` [igt-dev] [PATCH i-g-t v2] " Ramalingam C
2018-10-17 11:53 ` [igt-dev] [PATCH i-g-t v3] " Ramalingam C
2018-10-12 16:36 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_content_protection: Add Content Protection test (rev2) Patchwork
2018-10-12 19:10 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-10-17 13:17 ` [igt-dev] ✗ Fi.CI.BAT: failure for kms_content_protection: Add Content Protection test (rev3) Patchwork
2018-10-17 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-10-17 18:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.