* [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
@ 2018-07-14 22:19 ` Dhinakaran Pandiyan
2018-07-16 17:35 ` Rodrigo Vivi
2018-07-14 22:19 ` [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib Dhinakaran Pandiyan
` (5 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-14 22:19 UTC (permalink / raw)
To: igt-dev
Change the function arguments to not rely on test specific data as
the following patches change kms_frontbuffer_tracking to reuse PSR
functions.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
tests/kms_psr.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index aace884c..ded8346a 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -195,21 +195,21 @@ static bool sink_support(data_t *data)
return strstr(buf, "Sink_Support: yes\n");
}
-static bool psr_active(data_t *data, bool check_active)
+static bool psr_active(int fd, bool check_active)
{
bool active;
char buf[512];
- igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
+ igt_debugfs_read(fd, "i915_edp_psr_status", buf);
active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
(strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
return check_active ? active : !active;
}
-static bool wait_psr_entry(data_t *data)
+static bool wait_psr_entry(int fd)
{
- return igt_wait((psr_active(data, true)), 500, 1);
+ return igt_wait((psr_active(fd, true)), 500, 1);
}
static inline void manual(const char *expected)
@@ -237,7 +237,7 @@ static void run_test(data_t *data)
manual("screen GREEN");
/* Confirm screen stays Green after PSR got active */
- igt_assert(wait_psr_entry(data));
+ igt_assert(wait_psr_entry(data->drm_fd));
manual("screen GREEN");
/* Setting a secondary fb/plane */
@@ -250,7 +250,7 @@ static void run_test(data_t *data)
else
manual("GREEN background with WHITE box");
- igt_assert(wait_psr_entry(data));
+ igt_assert(wait_psr_entry(data->drm_fd));
switch (data->op) {
case PAGE_FLIP:
/* Only in use when testing primary plane */
@@ -298,7 +298,7 @@ static void run_test(data_t *data)
expected = "screen GREEN";
break;
}
- igt_assert(psr_active(data, false));
+ igt_assert(psr_active(data->drm_fd, false));
manual(expected);
}
@@ -408,13 +408,13 @@ igt_main
igt_subtest("basic") {
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
test_cleanup(&data);
}
igt_subtest("no_drrs") {
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
igt_assert(drrs_disabled(&data));
test_cleanup(&data);
}
@@ -423,7 +423,7 @@ igt_main
igt_subtest_f("primary_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -433,7 +433,7 @@ igt_main
igt_subtest_f("sprite_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_OVERLAY);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -443,7 +443,7 @@ igt_main
igt_subtest_f("cursor_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -452,7 +452,7 @@ igt_main
igt_subtest_f("dpms") {
data.op = RENDER;
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
dpms_off_on(&data);
run_test(&data);
test_cleanup(&data);
@@ -461,10 +461,10 @@ igt_main
igt_subtest_f("suspend") {
data.op = PLANE_ONOFF;
setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
SUSPEND_TEST_NONE);
- igt_assert(wait_psr_entry(&data));
+ igt_assert(wait_psr_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib
2018-07-14 22:19 ` [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib Dhinakaran Pandiyan
@ 2018-07-16 17:35 ` Rodrigo Vivi
0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:35 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
On Sat, Jul 14, 2018 at 03:19:12PM -0700, Dhinakaran Pandiyan wrote:
> Change the function arguments to not rely on test specific data as
> the following patches change kms_frontbuffer_tracking to reuse PSR
> functions.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> tests/kms_psr.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index aace884c..ded8346a 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -195,21 +195,21 @@ static bool sink_support(data_t *data)
> return strstr(buf, "Sink_Support: yes\n");
> }
>
> -static bool psr_active(data_t *data, bool check_active)
> +static bool psr_active(int fd, bool check_active)
> {
> bool active;
> char buf[512];
>
> - igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
> + igt_debugfs_read(fd, "i915_edp_psr_status", buf);
>
> active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> return check_active ? active : !active;
> }
>
> -static bool wait_psr_entry(data_t *data)
> +static bool wait_psr_entry(int fd)
> {
> - return igt_wait((psr_active(data, true)), 500, 1);
> + return igt_wait((psr_active(fd, true)), 500, 1);
> }
>
> static inline void manual(const char *expected)
> @@ -237,7 +237,7 @@ static void run_test(data_t *data)
> manual("screen GREEN");
>
> /* Confirm screen stays Green after PSR got active */
> - igt_assert(wait_psr_entry(data));
> + igt_assert(wait_psr_entry(data->drm_fd));
> manual("screen GREEN");
>
> /* Setting a secondary fb/plane */
> @@ -250,7 +250,7 @@ static void run_test(data_t *data)
> else
> manual("GREEN background with WHITE box");
>
> - igt_assert(wait_psr_entry(data));
> + igt_assert(wait_psr_entry(data->drm_fd));
> switch (data->op) {
> case PAGE_FLIP:
> /* Only in use when testing primary plane */
> @@ -298,7 +298,7 @@ static void run_test(data_t *data)
> expected = "screen GREEN";
> break;
> }
> - igt_assert(psr_active(data, false));
> + igt_assert(psr_active(data->drm_fd, false));
> manual(expected);
> }
>
> @@ -408,13 +408,13 @@ igt_main
>
> igt_subtest("basic") {
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> test_cleanup(&data);
> }
>
> igt_subtest("no_drrs") {
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> igt_assert(drrs_disabled(&data));
> test_cleanup(&data);
> }
> @@ -423,7 +423,7 @@ igt_main
> igt_subtest_f("primary_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -433,7 +433,7 @@ igt_main
> igt_subtest_f("sprite_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_OVERLAY);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -443,7 +443,7 @@ igt_main
> igt_subtest_f("cursor_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -452,7 +452,7 @@ igt_main
> igt_subtest_f("dpms") {
> data.op = RENDER;
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> dpms_off_on(&data);
> run_test(&data);
> test_cleanup(&data);
> @@ -461,10 +461,10 @@ igt_main
> igt_subtest_f("suspend") {
> data.op = PLANE_ONOFF;
> setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
> - igt_assert(wait_psr_entry(&data));
> + igt_assert(wait_psr_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
2018-07-14 22:19 ` [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib Dhinakaran Pandiyan
@ 2018-07-14 22:19 ` Dhinakaran Pandiyan
2018-07-16 17:38 ` Rodrigo Vivi
2018-07-14 22:19 ` [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR Dhinakaran Pandiyan
` (4 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-14 22:19 UTC (permalink / raw)
To: igt-dev
kms_frontbuffer_tracking and kms_psr test PSR in different ways, let'
fix that by creating common library functions.
Also, rename wait_psr_entry to psr_wait_entry.
v2: Include the new file in meson.build
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
lib/Makefile.sources | 2 ++
lib/igt_psr.c | 40 ++++++++++++++++++++++++++++++++++++++++
lib/igt_psr.h | 34 ++++++++++++++++++++++++++++++++++
lib/meson.build | 1 +
tests/kms_psr.c | 38 +++++++++++---------------------------
5 files changed, 88 insertions(+), 27 deletions(-)
create mode 100644 lib/igt_psr.c
create mode 100644 lib/igt_psr.h
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 042c1d3b..14356c94 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -103,6 +103,8 @@ lib_source_list = \
igt_kmod.h \
igt_syncobj.c \
igt_syncobj.h \
+ igt_psr.c \
+ igt_psr.h \
$(NULL)
.PHONY: version.h.tmp
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
new file mode 100644
index 00000000..c979b0b5
--- /dev/null
+++ b/lib/igt_psr.c
@@ -0,0 +1,40 @@
+/*
+ * 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 "igt_psr.h"
+
+bool psr_active(int fd, bool check_active)
+{
+ bool active;
+ char buf[512];
+
+ igt_debugfs_read(fd, "i915_edp_psr_status", buf);
+ active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
+ (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
+ return check_active ? active : !active;
+}
+
+bool psr_wait_entry(int fd)
+{
+ return igt_wait(psr_active(fd, true), 500, 1);
+}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
new file mode 100644
index 00000000..980f85e0
--- /dev/null
+++ b/lib/igt_psr.h
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+#ifndef IGT_PSR_H
+#define IGT_PSR_H
+
+#include "igt_debugfs.h"
+#include "igt_core.h"
+#include "igt_aux.h"
+
+bool psr_wait_entry(int fd);
+bool psr_active(int fd, bool check_active);
+
+#endif
diff --git a/lib/meson.build b/lib/meson.build
index 939167f9..74a5f61e 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -48,6 +48,7 @@ lib_sources = [
'uwildmat/uwildmat.c',
'igt_kmod.c',
'igt_vc4.c',
+ 'igt_psr.c',
]
lib_deps = [
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index ded8346a..1ed1f232 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -24,6 +24,7 @@
#include "igt.h"
#include "igt_sysfs.h"
+#include "igt_psr.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@@ -195,23 +196,6 @@ static bool sink_support(data_t *data)
return strstr(buf, "Sink_Support: yes\n");
}
-static bool psr_active(int fd, bool check_active)
-{
- bool active;
- char buf[512];
-
- igt_debugfs_read(fd, "i915_edp_psr_status", buf);
-
- active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
- (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
- return check_active ? active : !active;
-}
-
-static bool wait_psr_entry(int fd)
-{
- return igt_wait((psr_active(fd, true)), 500, 1);
-}
-
static inline void manual(const char *expected)
{
igt_debug_manual_check("all", expected);
@@ -237,7 +221,7 @@ static void run_test(data_t *data)
manual("screen GREEN");
/* Confirm screen stays Green after PSR got active */
- igt_assert(wait_psr_entry(data->drm_fd));
+ igt_assert(psr_wait_entry(data->drm_fd));
manual("screen GREEN");
/* Setting a secondary fb/plane */
@@ -250,7 +234,7 @@ static void run_test(data_t *data)
else
manual("GREEN background with WHITE box");
- igt_assert(wait_psr_entry(data->drm_fd));
+ igt_assert(psr_wait_entry(data->drm_fd));
switch (data->op) {
case PAGE_FLIP:
/* Only in use when testing primary plane */
@@ -408,13 +392,13 @@ igt_main
igt_subtest("basic") {
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
test_cleanup(&data);
}
igt_subtest("no_drrs") {
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
igt_assert(drrs_disabled(&data));
test_cleanup(&data);
}
@@ -423,7 +407,7 @@ igt_main
igt_subtest_f("primary_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -433,7 +417,7 @@ igt_main
igt_subtest_f("sprite_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_OVERLAY);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -443,7 +427,7 @@ igt_main
igt_subtest_f("cursor_%s", op_str(op)) {
data.op = op;
setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
@@ -452,7 +436,7 @@ igt_main
igt_subtest_f("dpms") {
data.op = RENDER;
setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
dpms_off_on(&data);
run_test(&data);
test_cleanup(&data);
@@ -461,10 +445,10 @@ igt_main
igt_subtest_f("suspend") {
data.op = PLANE_ONOFF;
setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
SUSPEND_TEST_NONE);
- igt_assert(wait_psr_entry(data.drm_fd));
+ igt_assert(psr_wait_entry(data.drm_fd));
run_test(&data);
test_cleanup(&data);
}
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib
2018-07-14 22:19 ` [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib Dhinakaran Pandiyan
@ 2018-07-16 17:38 ` Rodrigo Vivi
0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:38 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
On Sat, Jul 14, 2018 at 03:19:13PM -0700, Dhinakaran Pandiyan wrote:
> kms_frontbuffer_tracking and kms_psr test PSR in different ways, let'
> fix that by creating common library functions.
>
> Also, rename wait_psr_entry to psr_wait_entry.
>
> v2: Include the new file in meson.build
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
maybe we could already move the kms_frontbuffer_tracking to use this
library on the same patch... but anyways it is cleaner this way, so:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> lib/Makefile.sources | 2 ++
> lib/igt_psr.c | 40 ++++++++++++++++++++++++++++++++++++++++
> lib/igt_psr.h | 34 ++++++++++++++++++++++++++++++++++
> lib/meson.build | 1 +
> tests/kms_psr.c | 38 +++++++++++---------------------------
> 5 files changed, 88 insertions(+), 27 deletions(-)
> create mode 100644 lib/igt_psr.c
> create mode 100644 lib/igt_psr.h
>
> diff --git a/lib/Makefile.sources b/lib/Makefile.sources
> index 042c1d3b..14356c94 100644
> --- a/lib/Makefile.sources
> +++ b/lib/Makefile.sources
> @@ -103,6 +103,8 @@ lib_source_list = \
> igt_kmod.h \
> igt_syncobj.c \
> igt_syncobj.h \
> + igt_psr.c \
> + igt_psr.h \
> $(NULL)
>
> .PHONY: version.h.tmp
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> new file mode 100644
> index 00000000..c979b0b5
> --- /dev/null
> +++ b/lib/igt_psr.c
> @@ -0,0 +1,40 @@
> +/*
> + * 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 "igt_psr.h"
> +
> +bool psr_active(int fd, bool check_active)
> +{
> + bool active;
> + char buf[512];
> +
> + igt_debugfs_read(fd, "i915_edp_psr_status", buf);
> + active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> + (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> + return check_active ? active : !active;
> +}
> +
> +bool psr_wait_entry(int fd)
> +{
> + return igt_wait(psr_active(fd, true), 500, 1);
> +}
> diff --git a/lib/igt_psr.h b/lib/igt_psr.h
> new file mode 100644
> index 00000000..980f85e0
> --- /dev/null
> +++ b/lib/igt_psr.h
> @@ -0,0 +1,34 @@
> +/*
> + * 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.
> + */
> +
> +#ifndef IGT_PSR_H
> +#define IGT_PSR_H
> +
> +#include "igt_debugfs.h"
> +#include "igt_core.h"
> +#include "igt_aux.h"
> +
> +bool psr_wait_entry(int fd);
> +bool psr_active(int fd, bool check_active);
> +
> +#endif
> diff --git a/lib/meson.build b/lib/meson.build
> index 939167f9..74a5f61e 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -48,6 +48,7 @@ lib_sources = [
> 'uwildmat/uwildmat.c',
> 'igt_kmod.c',
> 'igt_vc4.c',
> + 'igt_psr.c',
> ]
>
> lib_deps = [
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index ded8346a..1ed1f232 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -24,6 +24,7 @@
>
> #include "igt.h"
> #include "igt_sysfs.h"
> +#include "igt_psr.h"
> #include <errno.h>
> #include <stdbool.h>
> #include <stdio.h>
> @@ -195,23 +196,6 @@ static bool sink_support(data_t *data)
> return strstr(buf, "Sink_Support: yes\n");
> }
>
> -static bool psr_active(int fd, bool check_active)
> -{
> - bool active;
> - char buf[512];
> -
> - igt_debugfs_read(fd, "i915_edp_psr_status", buf);
> -
> - active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
> - (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
> - return check_active ? active : !active;
> -}
> -
> -static bool wait_psr_entry(int fd)
> -{
> - return igt_wait((psr_active(fd, true)), 500, 1);
> -}
> -
> static inline void manual(const char *expected)
> {
> igt_debug_manual_check("all", expected);
> @@ -237,7 +221,7 @@ static void run_test(data_t *data)
> manual("screen GREEN");
>
> /* Confirm screen stays Green after PSR got active */
> - igt_assert(wait_psr_entry(data->drm_fd));
> + igt_assert(psr_wait_entry(data->drm_fd));
> manual("screen GREEN");
>
> /* Setting a secondary fb/plane */
> @@ -250,7 +234,7 @@ static void run_test(data_t *data)
> else
> manual("GREEN background with WHITE box");
>
> - igt_assert(wait_psr_entry(data->drm_fd));
> + igt_assert(psr_wait_entry(data->drm_fd));
> switch (data->op) {
> case PAGE_FLIP:
> /* Only in use when testing primary plane */
> @@ -408,13 +392,13 @@ igt_main
>
> igt_subtest("basic") {
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> test_cleanup(&data);
> }
>
> igt_subtest("no_drrs") {
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> igt_assert(drrs_disabled(&data));
> test_cleanup(&data);
> }
> @@ -423,7 +407,7 @@ igt_main
> igt_subtest_f("primary_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -433,7 +417,7 @@ igt_main
> igt_subtest_f("sprite_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_OVERLAY);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -443,7 +427,7 @@ igt_main
> igt_subtest_f("cursor_%s", op_str(op)) {
> data.op = op;
> setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> @@ -452,7 +436,7 @@ igt_main
> igt_subtest_f("dpms") {
> data.op = RENDER;
> setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> dpms_off_on(&data);
> run_test(&data);
> test_cleanup(&data);
> @@ -461,10 +445,10 @@ igt_main
> igt_subtest_f("suspend") {
> data.op = PLANE_ONOFF;
> setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
> - igt_assert(wait_psr_entry(data.drm_fd));
> + igt_assert(psr_wait_entry(data.drm_fd));
> run_test(&data);
> test_cleanup(&data);
> }
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR.
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
2018-07-14 22:19 ` [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib Dhinakaran Pandiyan
2018-07-14 22:19 ` [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib Dhinakaran Pandiyan
@ 2018-07-14 22:19 ` Dhinakaran Pandiyan
2018-07-16 17:39 ` Rodrigo Vivi
2018-07-14 22:19 ` [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450 Dhinakaran Pandiyan
` (3 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-14 22:19 UTC (permalink / raw)
To: igt-dev
kms_frontbuffer_tracking should test PSR the same way that kms_psr does.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
tests/kms_frontbuffer_tracking.c | 42 ++++----------------------------
1 file changed, 5 insertions(+), 37 deletions(-)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 116a95bc..1dfd7c1c 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -26,6 +26,7 @@
#include "igt.h"
#include "igt_sysfs.h"
+#include "igt_psr.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -756,22 +757,6 @@ static bool fbc_is_enabled(int lvl)
return strstr(buf, "FBC enabled\n");
}
-static bool psr_is_enabled(void)
-{
- char buf[256];
-
- debugfs_read("i915_edp_psr_status", buf);
- return strstr(buf, "\nHW Enabled & Active bit: yes\n");
-}
-
-static void psr_print_status(void)
-{
- char buf[256];
-
- debugfs_read("i915_edp_psr_status", buf);
- igt_info("PSR status:\n%s\n", buf);
-}
-
static void drrs_set(unsigned int val)
{
char buf[2];
@@ -949,16 +934,6 @@ static bool fbc_wait_until_enabled(void)
return igt_wait(fbc_is_enabled(IGT_LOG_DEBUG), 2000, 1);
}
-static bool psr_wait_until_enabled(void)
-{
- return igt_wait(psr_is_enabled(), 5000, 1);
-}
-
-static bool psr_wait_until_disabled(void)
-{
- return igt_wait(!psr_is_enabled(), 5000, 1);
-}
-
static bool drrs_wait_until_rr_switch_to_low(void)
{
return igt_wait(is_drrs_low(), 5000, 1);
@@ -1659,17 +1634,10 @@ static void do_status_assertions(int flags)
igt_assert(!fbc_wait_until_enabled());
}
- if (flags & ASSERT_PSR_ENABLED) {
- if (!psr_wait_until_enabled()) {
- psr_print_status();
- igt_assert_f(psr_is_enabled(), "PSR still disabled\n");
- }
- } else if (flags & ASSERT_PSR_DISABLED) {
- if (!psr_wait_until_disabled()) {
- psr_print_status();
- igt_assert_f(!psr_is_enabled(), "PSR still enabled\n");
- }
- }
+ if (flags & ASSERT_PSR_ENABLED)
+ igt_assert_f(psr_wait_entry(drm.fd), "PSR still disabled\n");
+ else if (flags & ASSERT_PSR_DISABLED)
+ igt_assert_f(psr_active(drm.fd, false), "PSR still enabled\n");
}
static void __do_assertions(const struct test_mode *t, int flags,
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR.
2018-07-14 22:19 ` [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR Dhinakaran Pandiyan
@ 2018-07-16 17:39 ` Rodrigo Vivi
0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:39 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
On Sat, Jul 14, 2018 at 03:19:14PM -0700, Dhinakaran Pandiyan wrote:
> kms_frontbuffer_tracking should test PSR the same way that kms_psr does.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> tests/kms_frontbuffer_tracking.c | 42 ++++----------------------------
> 1 file changed, 5 insertions(+), 37 deletions(-)
>
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 116a95bc..1dfd7c1c 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -26,6 +26,7 @@
>
> #include "igt.h"
> #include "igt_sysfs.h"
> +#include "igt_psr.h"
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> @@ -756,22 +757,6 @@ static bool fbc_is_enabled(int lvl)
> return strstr(buf, "FBC enabled\n");
> }
>
> -static bool psr_is_enabled(void)
> -{
> - char buf[256];
> -
> - debugfs_read("i915_edp_psr_status", buf);
> - return strstr(buf, "\nHW Enabled & Active bit: yes\n");
> -}
> -
> -static void psr_print_status(void)
> -{
> - char buf[256];
> -
> - debugfs_read("i915_edp_psr_status", buf);
> - igt_info("PSR status:\n%s\n", buf);
> -}
> -
> static void drrs_set(unsigned int val)
> {
> char buf[2];
> @@ -949,16 +934,6 @@ static bool fbc_wait_until_enabled(void)
> return igt_wait(fbc_is_enabled(IGT_LOG_DEBUG), 2000, 1);
> }
>
> -static bool psr_wait_until_enabled(void)
> -{
> - return igt_wait(psr_is_enabled(), 5000, 1);
> -}
> -
> -static bool psr_wait_until_disabled(void)
> -{
> - return igt_wait(!psr_is_enabled(), 5000, 1);
> -}
> -
> static bool drrs_wait_until_rr_switch_to_low(void)
> {
> return igt_wait(is_drrs_low(), 5000, 1);
> @@ -1659,17 +1634,10 @@ static void do_status_assertions(int flags)
> igt_assert(!fbc_wait_until_enabled());
> }
>
> - if (flags & ASSERT_PSR_ENABLED) {
> - if (!psr_wait_until_enabled()) {
> - psr_print_status();
> - igt_assert_f(psr_is_enabled(), "PSR still disabled\n");
> - }
> - } else if (flags & ASSERT_PSR_DISABLED) {
> - if (!psr_wait_until_disabled()) {
> - psr_print_status();
> - igt_assert_f(!psr_is_enabled(), "PSR still enabled\n");
> - }
> - }
> + if (flags & ASSERT_PSR_ENABLED)
> + igt_assert_f(psr_wait_entry(drm.fd), "PSR still disabled\n");
> + else if (flags & ASSERT_PSR_DISABLED)
> + igt_assert_f(psr_active(drm.fd, false), "PSR still enabled\n");
> }
>
> static void __do_assertions(const struct test_mode *t, int flags,
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
` (2 preceding siblings ...)
2018-07-14 22:19 ` [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR Dhinakaran Pandiyan
@ 2018-07-14 22:19 ` Dhinakaran Pandiyan
2018-07-16 17:41 ` Rodrigo Vivi
2018-07-14 22:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled Patchwork
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-14 22:19 UTC (permalink / raw)
To: igt-dev
Add to ff since there is no PSR on shards.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105450
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
tests/intel-ci/fast-feedback.testlist | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index aa861d39..1de2e58a 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -224,6 +224,31 @@ igt@kms_force_connector_basic@force-edid
igt@kms_force_connector_basic@force-load-detect
igt@kms_force_connector_basic@prune-stale-modes
igt@kms_frontbuffer_tracking@basic
+igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack
+igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-wc
+igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render
+igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-1p-shrfb-fliptrack
+igt@kms_frontbuffer_tracking@fbcpsr-farfromfence
+igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@fbcpsr-stridechange
+igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-blt
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-farfromfence
+igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-gtt
+igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-gtt
igt@kms_pipe_crc_basic@bad-source
igt@kms_pipe_crc_basic@hang-read-crc-pipe-a
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b
--
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450
2018-07-14 22:19 ` [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450 Dhinakaran Pandiyan
@ 2018-07-16 17:41 ` Rodrigo Vivi
0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:41 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev, Tomi Sarvela, Martin Peres
On Sat, Jul 14, 2018 at 03:19:15PM -0700, Dhinakaran Pandiyan wrote:
> Add to ff since there is no PSR on shards.
+1 on the idea...
However do you know the timewise impact of this on ff?
Afai-can-remember no kms_frontbuffer_tracking was allowed on ff
because they were to time consuming because many modesets...
Something that Maarten was working to solve.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=105450
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> tests/intel-ci/fast-feedback.testlist | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
> index aa861d39..1de2e58a 100644
> --- a/tests/intel-ci/fast-feedback.testlist
> +++ b/tests/intel-ci/fast-feedback.testlist
> @@ -224,6 +224,31 @@ igt@kms_force_connector_basic@force-edid
> igt@kms_force_connector_basic@force-load-detect
> igt@kms_force_connector_basic@prune-stale-modes
> igt@kms_frontbuffer_tracking@basic
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-wc
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-1p-shrfb-fliptrack
> +igt@kms_frontbuffer_tracking@fbcpsr-farfromfence
> +igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@fbcpsr-stridechange
> +igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-pwrite
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-blt
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-cpu
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-farfromfence
> +igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-gtt
> +igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-gtt
> igt@kms_pipe_crc_basic@bad-source
> igt@kms_pipe_crc_basic@hang-read-crc-pipe-a
> igt@kms_pipe_crc_basic@hang-read-crc-pipe-b
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled.
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
` (3 preceding siblings ...)
2018-07-14 22:19 ` [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450 Dhinakaran Pandiyan
@ 2018-07-14 22:40 ` Patchwork
2018-07-14 23:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-07-16 17:31 ` [igt-dev] [CI 1/5] " Rodrigo Vivi
6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2018-07-14 22:40 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
== Series Details ==
Series: series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled.
URL : https://patchwork.freedesktop.org/series/46560/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4488 -> IGTPW_1590 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46560/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1590 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_mmap_gtt@basic-copy:
{fi-kbl-8809g}: NOTRUN -> DMESG-WARN (fdo#107222) +1
igt@gem_mmap_gtt@basic-wc:
{fi-kbl-8809g}: NOTRUN -> DMESG-WARN (fdo#107221) +7
igt@gem_ringfill@basic-default-hang:
{fi-kbl-8809g}: NOTRUN -> DMESG-WARN (fdo#107221, fdo#107222)
igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
fi-kbl-7560u: NOTRUN -> FAIL (fdo#105683)
fi-skl-6600u: NOTRUN -> FAIL (fdo#105683)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@kms_chamelium@hdmi-hpd-fast:
fi-kbl-7500u: FAIL (fdo#103841, fdo#102672) -> SKIP
==== Warnings ====
igt@gem_exec_suspend@basic-s4-devices:
{fi-kbl-8809g}: INCOMPLETE (fdo#107139) -> DMESG-WARN (fdo#107139)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105683 https://bugs.freedesktop.org/show_bug.cgi?id=105683
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107221 https://bugs.freedesktop.org/show_bug.cgi?id=107221
fdo#107222 https://bugs.freedesktop.org/show_bug.cgi?id=107222
== Participating hosts (46 -> 42) ==
Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* IGT: IGT_4557 -> IGTPW_1590
CI_DRM_4488: a3a527faf129e7901fdff5309a7e6df8abd72d13 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1590: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1590/
IGT_4557: 140a67c13aad2595ee6c72e41d14d35a793158b5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1590/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled.
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
` (4 preceding siblings ...)
2018-07-14 22:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled Patchwork
@ 2018-07-14 23:37 ` Patchwork
2018-07-16 17:31 ` [igt-dev] [CI 1/5] " Rodrigo Vivi
6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2018-07-14 23:37 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
== Series Details ==
Series: series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled.
URL : https://patchwork.freedesktop.org/series/46560/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4557_full -> IGTPW_1590_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1590_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1590_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/46560/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1590_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-blt:
shard-kbl: PASS -> SKIP
igt@gem_mocs_settings@mocs-rc6-vebox:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1590_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-flip-vs-dpms-interruptible:
shard-hsw: PASS -> DMESG-WARN (fdo#102614)
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368) +1
igt@perf_pmu@most-busy-idle-check-all-vcs1:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
{igt@gem_userptr_blits@readonly-mmap-unsync}:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: FAIL (fdo#106509, fdo#105454) -> PASS
igt@kms_flip@2x-plain-flip-ts-check-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
shard-glk: FAIL (fdo#103375) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4557 -> IGTPW_1590
* Linux: CI_DRM_4487 -> CI_DRM_4488
CI_DRM_4487: 627ed020cac6a73f0a014537dac7191efbb57084 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4488: a3a527faf129e7901fdff5309a7e6df8abd72d13 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1590: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1590/
IGT_4557: 140a67c13aad2595ee6c72e41d14d35a793158b5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1590/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled.
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
` (5 preceding siblings ...)
2018-07-14 23:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-07-16 17:31 ` Rodrigo Vivi
2018-07-16 17:35 ` Rodrigo Vivi
6 siblings, 1 reply; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:31 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
On Sat, Jul 14, 2018 at 03:19:11PM -0700, Dhinakaran Pandiyan wrote:
> The original use for this was to validate sink CRC without PSR, now that
> that the support for sink CRC was removed, this command line option is
> pointless.
oh... well... I still like this option...
1. If we keep the manual approach, the --no-psr is useful for people
to understand what to expect without psr and then compare the results.
(Specially because some of the writes that I did on the test are so
ugly for human eyes that people would believe it is a bug :$)
I also use to play with planes and cursor on non-psr panels,
but for this second case I know that I should use, and if necessary
improve, other tests..
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> tests/kms_psr.c | 37 +++----------------------------------
> 1 file changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index 4eca51da..aace884c 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -69,7 +69,6 @@ typedef struct {
> int mod_stride;
> drmModeModeInfo *mode;
> igt_output_t *output;
> - bool with_psr_disabled;
> } data_t;
>
> static void create_cursor_fb(data_t *data)
> @@ -193,8 +192,7 @@ static bool sink_support(data_t *data)
>
> igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
>
> - return data->with_psr_disabled ||
> - strstr(buf, "Sink_Support: yes\n");
> + return strstr(buf, "Sink_Support: yes\n");
> }
>
> static bool psr_active(data_t *data, bool check_active)
> @@ -211,9 +209,6 @@ static bool psr_active(data_t *data, bool check_active)
>
> static bool wait_psr_entry(data_t *data)
> {
> - if (data->with_psr_disabled)
> - return true;
> -
> return igt_wait((psr_active(data, true)), 500, 1);
> }
>
> @@ -387,34 +382,11 @@ static void dpms_off_on(data_t *data)
> DRM_MODE_DPMS_ON);
> }
>
> -static int opt_handler(int opt, int opt_index, void *_data)
> -{
> - data_t *data = _data;
> -
> - switch (opt) {
> - case 'n':
> - data->with_psr_disabled = true;
> - break;
> - default:
> - igt_assert(0);
> - }
> -
> - return 0;
> -}
> -
> -int main(int argc, char *argv[])
> +igt_main
> {
> - const char *help_str =
> - " --no-psr\tRun test without PSR.";
> - static struct option long_options[] = {
> - {"no-psr", 0, 0, 'n'},
> - { 0, 0, 0, 0 }
> - };
> data_t data = {};
> enum operations op;
>
> - igt_subtest_init_parse_opts(&argc, argv, "", long_options,
> - help_str, opt_handler, &data);
> igt_skip_on_simulation();
>
> igt_fixture {
> @@ -423,8 +395,7 @@ int main(int argc, char *argv[])
> kmstest_set_vt_graphics_mode();
> data.devid = intel_get_drm_devid(data.drm_fd);
>
> - igt_set_module_param_int("enable_psr", data.with_psr_disabled ?
> - 0 : 1);
> + igt_set_module_param_int("enable_psr", 1);
> igt_require_f(sink_support(&data),
> "Sink does not support PSR\n");
>
> @@ -503,6 +474,4 @@ int main(int argc, char *argv[])
> drm_intel_bufmgr_destroy(data.bufmgr);
> display_fini(&data);
> }
> -
> - igt_exit();
> }
> --
> 2.17.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled.
2018-07-16 17:31 ` [igt-dev] [CI 1/5] " Rodrigo Vivi
@ 2018-07-16 17:35 ` Rodrigo Vivi
2018-07-16 21:20 ` Dhinakaran Pandiyan
0 siblings, 1 reply; 14+ messages in thread
From: Rodrigo Vivi @ 2018-07-16 17:35 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: igt-dev
On Mon, Jul 16, 2018 at 10:31:57AM -0700, Rodrigo Vivi wrote:
> On Sat, Jul 14, 2018 at 03:19:11PM -0700, Dhinakaran Pandiyan wrote:
> > The original use for this was to validate sink CRC without PSR, now that
> > that the support for sink CRC was removed, this command line option is
> > pointless.
>
> oh... well... I still like this option...
>
> 1. If we keep the manual approach, the --no-psr is useful for people
> to understand what to expect without psr and then compare the results.
> (Specially because some of the writes that I did on the test are so
> ugly for human eyes that people would believe it is a bug :$)
>
> I also use to play with planes and cursor on non-psr panels,
> but for this second case I know that I should use, and if necessary
> improve, other tests..
oh, but in case this blocks the whole work of creating the library
feel free to ignore me and use my:
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
;)
>
> >
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> > tests/kms_psr.c | 37 +++----------------------------------
> > 1 file changed, 3 insertions(+), 34 deletions(-)
> >
> > diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> > index 4eca51da..aace884c 100644
> > --- a/tests/kms_psr.c
> > +++ b/tests/kms_psr.c
> > @@ -69,7 +69,6 @@ typedef struct {
> > int mod_stride;
> > drmModeModeInfo *mode;
> > igt_output_t *output;
> > - bool with_psr_disabled;
> > } data_t;
> >
> > static void create_cursor_fb(data_t *data)
> > @@ -193,8 +192,7 @@ static bool sink_support(data_t *data)
> >
> > igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
> >
> > - return data->with_psr_disabled ||
> > - strstr(buf, "Sink_Support: yes\n");
> > + return strstr(buf, "Sink_Support: yes\n");
> > }
> >
> > static bool psr_active(data_t *data, bool check_active)
> > @@ -211,9 +209,6 @@ static bool psr_active(data_t *data, bool check_active)
> >
> > static bool wait_psr_entry(data_t *data)
> > {
> > - if (data->with_psr_disabled)
> > - return true;
> > -
> > return igt_wait((psr_active(data, true)), 500, 1);
> > }
> >
> > @@ -387,34 +382,11 @@ static void dpms_off_on(data_t *data)
> > DRM_MODE_DPMS_ON);
> > }
> >
> > -static int opt_handler(int opt, int opt_index, void *_data)
> > -{
> > - data_t *data = _data;
> > -
> > - switch (opt) {
> > - case 'n':
> > - data->with_psr_disabled = true;
> > - break;
> > - default:
> > - igt_assert(0);
> > - }
> > -
> > - return 0;
> > -}
> > -
> > -int main(int argc, char *argv[])
> > +igt_main
> > {
> > - const char *help_str =
> > - " --no-psr\tRun test without PSR.";
> > - static struct option long_options[] = {
> > - {"no-psr", 0, 0, 'n'},
> > - { 0, 0, 0, 0 }
> > - };
> > data_t data = {};
> > enum operations op;
> >
> > - igt_subtest_init_parse_opts(&argc, argv, "", long_options,
> > - help_str, opt_handler, &data);
> > igt_skip_on_simulation();
> >
> > igt_fixture {
> > @@ -423,8 +395,7 @@ int main(int argc, char *argv[])
> > kmstest_set_vt_graphics_mode();
> > data.devid = intel_get_drm_devid(data.drm_fd);
> >
> > - igt_set_module_param_int("enable_psr", data.with_psr_disabled ?
> > - 0 : 1);
> > + igt_set_module_param_int("enable_psr", 1);
> > igt_require_f(sink_support(&data),
> > "Sink does not support PSR\n");
> >
> > @@ -503,6 +474,4 @@ int main(int argc, char *argv[])
> > drm_intel_bufmgr_destroy(data.bufmgr);
> > display_fini(&data);
> > }
> > -
> > - igt_exit();
> > }
> > --
> > 2.17.1
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled.
2018-07-16 17:35 ` Rodrigo Vivi
@ 2018-07-16 21:20 ` Dhinakaran Pandiyan
0 siblings, 0 replies; 14+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-16 21:20 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: igt-dev
On Mon, 2018-07-16 at 10:35 -0700, Rodrigo Vivi wrote:
> On Mon, Jul 16, 2018 at 10:31:57AM -0700, Rodrigo Vivi wrote:
> >
> > On Sat, Jul 14, 2018 at 03:19:11PM -0700, Dhinakaran Pandiyan
> > wrote:
> > >
> > > The original use for this was to validate sink CRC without PSR,
> > > now that
> > > that the support for sink CRC was removed, this command line
> > > option is
> > > pointless.
> > oh... well... I still like this option...
> >
> > 1. If we keep the manual approach, the --no-psr is useful for
> > people
> > to understand what to expect without psr and then compare the
> > results.
That's a good point. I can wrap wait_psr_entry() in this file to return
early for the --no-psr case.
> > (Specially because some of the writes that I did on the test are so
> > ugly for human eyes that people would believe it is a bug :$)
> >
> > I also use to play with planes and cursor on non-psr panels,
> > but for this second case I know that I should use, and if necessary
> > improve, other tests..
> oh, but in case this blocks the whole work of creating the library
> feel free to ignore me and use my:
>
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> ;)
>
> >
> >
> > >
> > >
> > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com
> > > >
> > > ---
> > > tests/kms_psr.c | 37 +++----------------------------------
> > > 1 file changed, 3 insertions(+), 34 deletions(-)
> > >
> > > diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> > > index 4eca51da..aace884c 100644
> > > --- a/tests/kms_psr.c
> > > +++ b/tests/kms_psr.c
> > > @@ -69,7 +69,6 @@ typedef struct {
> > > int mod_stride;
> > > drmModeModeInfo *mode;
> > > igt_output_t *output;
> > > - bool with_psr_disabled;
> > > } data_t;
> > >
> > > static void create_cursor_fb(data_t *data)
> > > @@ -193,8 +192,7 @@ static bool sink_support(data_t *data)
> > >
> > > igt_debugfs_read(data->drm_fd, "i915_edp_psr_status",
> > > buf);
> > >
> > > - return data->with_psr_disabled ||
> > > - strstr(buf, "Sink_Support: yes\n");
> > > + return strstr(buf, "Sink_Support: yes\n");
> > > }
> > >
> > > static bool psr_active(data_t *data, bool check_active)
> > > @@ -211,9 +209,6 @@ static bool psr_active(data_t *data, bool
> > > check_active)
> > >
> > > static bool wait_psr_entry(data_t *data)
> > > {
> > > - if (data->with_psr_disabled)
> > > - return true;
> > > -
> > > return igt_wait((psr_active(data, true)), 500, 1);
> > > }
> > >
> > > @@ -387,34 +382,11 @@ static void dpms_off_on(data_t *data)
> > > DRM_MODE_DPMS_ON);
> > > }
> > >
> > > -static int opt_handler(int opt, int opt_index, void *_data)
> > > -{
> > > - data_t *data = _data;
> > > -
> > > - switch (opt) {
> > > - case 'n':
> > > - data->with_psr_disabled = true;
> > > - break;
> > > - default:
> > > - igt_assert(0);
> > > - }
> > > -
> > > - return 0;
> > > -}
> > > -
> > > -int main(int argc, char *argv[])
> > > +igt_main
> > > {
> > > - const char *help_str =
> > > - " --no-psr\tRun test without PSR.";
> > > - static struct option long_options[] = {
> > > - {"no-psr", 0, 0, 'n'},
> > > - { 0, 0, 0, 0 }
> > > - };
> > > data_t data = {};
> > > enum operations op;
> > >
> > > - igt_subtest_init_parse_opts(&argc, argv, "",
> > > long_options,
> > > - help_str, opt_handler,
> > > &data);
> > > igt_skip_on_simulation();
> > >
> > > igt_fixture {
> > > @@ -423,8 +395,7 @@ int main(int argc, char *argv[])
> > > kmstest_set_vt_graphics_mode();
> > > data.devid = intel_get_drm_devid(data.drm_fd);
> > >
> > > - igt_set_module_param_int("enable_psr",
> > > data.with_psr_disabled ?
> > > - 0 : 1);
> > > + igt_set_module_param_int("enable_psr", 1);
> > > igt_require_f(sink_support(&data),
> > > "Sink does not support PSR\n");
> > >
> > > @@ -503,6 +474,4 @@ int main(int argc, char *argv[])
> > > drm_intel_bufmgr_destroy(data.bufmgr);
> > > display_fini(&data);
> > > }
> > > -
> > > - igt_exit();
> > > }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 14+ messages in thread