Skip to contentSkip to conversation

tests/psr: Wait for PSR exit

PATCH In review Dhinakaran Pandiyan 3 participants 8 messages Sep 28, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/psr: Wait for PSR exit

PSR appears to not exit immediately after the test commits a page flip, give some leeway for PSR to idle. Let's set the timeout at 40 ms with a 5 ms interval between each status read.

---
 lib/igt_psr.c                    | 7 ++++++-
 lib/igt_psr.h                    | 2 +-
 tests/kms_frontbuffer_tracking.c | 3 +--
 tests/kms_psr.c                  | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)
lib/igt_psr.c +6 -1
index c2bae95b..355fe627 100644
@@ -25,7 +25,7 @@
 #include "igt_sysfs.h"
 #include <errno.h>
 
-bool psr_active(int debugfs_fd, bool check_active)
+static bool psr_active(int debugfs_fd, bool check_active)
 {
 	bool active;
 	char buf[512];
@@ -42,6 +42,11 @@ bool psr_wait_entry(int debugfs_fd)
 	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
 }
 
+bool psr_wait_exit(int debugfs_fd)
+{
+	return igt_wait(psr_active(debugfs_fd, false), 40, 10);
+}
+
 static ssize_t psr_write(int debugfs_fd, const char *buf)
 {
 	return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
lib/igt_psr.h +1 -1
index 7c846afb..b9693822 100644
@@ -29,7 +29,7 @@
 #include "igt_aux.h"
 
 bool psr_wait_entry(int debugfs_fd);
-bool psr_active(int debugfs_fd, bool check_active);
+bool psr_wait_exit(int debugfs_fd);
 bool psr_enable(int debugfs_fd);
 bool psr_disable(int debugfs_fd);
 
tests/kms_frontbuffer_tracking.c +1 -2
index 265c313a..356e5b6d 100644
@@ -1634,8 +1634,7 @@ static void do_status_assertions(int flags)
 		igt_assert_f(psr_wait_entry(drm.debugfs),
 			     "PSR still disabled\n");
 	else if (flags & ASSERT_PSR_DISABLED)
-		igt_assert_f(psr_active(drm.debugfs, false),
-			     "PSR still enabled\n");
+		igt_assert_f(psr_wait_exit(drm.debugfs), "PSR still enabled\n");
 }
 
 static void __do_assertions(const struct test_mode *t, int flags,
tests/kms_psr.c +1 -1
index fcc04770..ebd64d46 100644
@@ -294,7 +294,7 @@ static void run_test(data_t *data)
 		expected = "screen GREEN";
 		break;
 	}
-	igt_assert(psr_active(data->debugfs_fd, false));
+	igt_assert(psr_wait_exit(data->debugfs_fd));
 	manual(expected);
 }
 
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH 2/2 tests/psr: Check for PSR entry less frequently

We currently read debugfs every 1 ms, given that it takes about 140 ms for PSR entry on the CI machines and entry can occur at frame time intervals, bump the debugfs read interval to 20 ms.

---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_psr.c +1 -1
index 355fe627..0ddfb64f 100644
@@ -39,7 +39,7 @@ static bool psr_active(int debugfs_fd, bool check_active)
 
 bool psr_wait_entry(int debugfs_fd)
 {
-	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
+	return igt_wait(psr_active(debugfs_fd, true), 500, 20);
 }
 
 bool psr_wait_exit(int debugfs_fd)
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 2/2
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently

Quoted 5 lines · Dhinakaran Pandiyan

We currently read debugfs every 1 ms, given that it takes about 140 ms
for PSR entry on the CI machines and entry can occur at frame time intervals, bump the debugfs read interval to 20 ms.

Quoted 18 lines
---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_psr.c +1 -1
index 355fe627..0ddfb64f 100644
@@ -39,7 +39,7 @@ static bool psr_active(int debugfs_fd, bool
 check_active)
 
 bool psr_wait_entry(int debugfs_fd)
 {
-	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
+	return igt_wait(psr_active(debugfs_fd, true), 500, 20);
 }
 
Quoted 1 line

bool psr_wait_exit(int debugfs_fd)

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

Re: [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently

Quoted 8 lines · Jose
Quoted 5 lines · Dhinakaran Pandiyan

We currently read debugfs every 1 ms, given that it takes about 140 ms
for PSR entry on the CI machines and entry can occur at frame time intervals, bump the debugfs read interval to 20 ms.

Thanks, pushed the patches.

-DK
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit

In reply to Dhinakaran Pandiyan
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit
URL : https://patchwork.freedesktop.org/series/50302/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4900 -> IGTPW_1880 =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_1880 need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1880, 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/50302/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in IGTPW_1880:

=== IGT changes ===

    ==== Warnings ====

    igt@drv_selftest@live_requests:
      fi-bxt-j4205:       SKIP -> PASS +14

== Known issues ==

Here are the changes found in IGTPW_1880 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       PASS -> INCOMPLETE (fdo#108044)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-skl-6700k2:      PASS -> FAIL (fdo#103191)

    igt@kms_psr@sprite_plane_onoff:
      fi-bdw-samus:       NOTRUN -> FAIL (fdo#107360, fdo#107383)

    igt@pm_rpm@module-reload:
      fi-bdw-samus:       NOTRUN -> DMESG-WARN (fdo#107603)

    
    ==== Possible fixes ====

    igt@amdgpu/amd_prime@amd-to-i915:
      fi-bxt-j4205:       TIMEOUT (fdo#108075) -> SKIP +1

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS
      fi-bdw-samus:       INCOMPLETE (fdo#107773) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-kbl-r:           FAIL (fdo#107336) -> PASS

    igt@pm_rpm@module-reload:
      fi-bxt-j4205:       FAIL (fdo#107712) -> PASS

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107360 https://bugs.freedesktop.org/show_bug.cgi?id=107360
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383
fdo#107603 https://bugs.freedesktop.org/show_bug.cgi?id=107603
fdo#107712 https://bugs.freedesktop.org/show_bug.cgi?id=107712
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#108044 https://bugs.freedesktop.org/show_bug.cgi?id=108044
fdo#108075 https://bugs.freedesktop.org/show_bug.cgi?id=108075

== Participating hosts (45 -> 36) ==

Missing (9): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 fi-glk-j4005 fi-pnv-d510 fi-skl-caroline

== Build changes ==

* IGT: IGT_4655 -> IGTPW_1880

CI_DRM_4900: 5f9e451829f71e5aa1aef9ad6a0972423aac6026 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1880: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1880/
IGT_4655: de5973d410bfba0bbf04c9e7dd9e898587fc361b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1880/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw
In reply to Dhinakaran Pandiyan
Quoted 6 lines · Dhinakaran Pandiyan

PSR appears to not exit immediately after the test commits a page flip,
give some leeway for PSR to idle. Let's set the timeout at 40 ms with a
5 ms interval between each status read.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107336

Quoted 67 lines
---
 lib/igt_psr.c                    | 7 ++++++-
 lib/igt_psr.h                    | 2 +-
 tests/kms_frontbuffer_tracking.c | 3 +--
 tests/kms_psr.c                  | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)
lib/igt_psr.c +6 -1
index c2bae95b..355fe627 100644
@@ -25,7 +25,7 @@
 #include "igt_sysfs.h"
 #include <errno.h>
 
-bool psr_active(int debugfs_fd, bool check_active)
+static bool psr_active(int debugfs_fd, bool check_active)
 {
 	bool active;
 	char buf[512];
@@ -42,6 +42,11 @@ bool psr_wait_entry(int debugfs_fd)
 	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
 }
 
+bool psr_wait_exit(int debugfs_fd)
+{
+	return igt_wait(psr_active(debugfs_fd, false), 40, 10);
+}
+
 static ssize_t psr_write(int debugfs_fd, const char *buf)
 {
 	return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
lib/igt_psr.h +1 -1
index 7c846afb..b9693822 100644
@@ -29,7 +29,7 @@
 #include "igt_aux.h"
 
 bool psr_wait_entry(int debugfs_fd);
-bool psr_active(int debugfs_fd, bool check_active);
+bool psr_wait_exit(int debugfs_fd);
 bool psr_enable(int debugfs_fd);
 bool psr_disable(int debugfs_fd);
 
tests/kms_frontbuffer_tracking.c +1 -2
index 265c313a..356e5b6d 100644
@@ -1634,8 +1634,7 @@ static void do_status_assertions(int flags)
 		igt_assert_f(psr_wait_entry(drm.debugfs),
 			     "PSR still disabled\n");
 	else if (flags & ASSERT_PSR_DISABLED)
-		igt_assert_f(psr_active(drm.debugfs, false),
-			     "PSR still enabled\n");
+		igt_assert_f(psr_wait_exit(drm.debugfs), "PSR still
 enabled\n");
 }
 

static void __do_assertions(const struct test_mode *t, int flags,

tests/kms_psr.c +0 -0
index fcc04770..ebd64d46 100644

tests/kms_psr.c static void run_test(data_t *data) · line 300

Quoted 8 lines
tests/kms_psr.c +1 -1
@@ -294,7 +294,7 @@ static void run_test(data_t *data)
 		expected = "screen GREEN";
 		break;
 	}
-	igt_assert(psr_active(data->debugfs_fd, false));
+	igt_assert(psr_wait_exit(data->debugfs_fd));
 	manual(expected);
 }
 

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#6 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit

In reply to Dhinakaran Pandiyan
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit
URL : https://patchwork.freedesktop.org/series/50302/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4655_full -> IGTPW_1880_full =

== Summary - WARNING ==

Minor unknown changes coming with IGTPW_1880_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1880_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/50302/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in IGTPW_1880_full:

=== IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          SKIP -> PASS

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          PASS -> SKIP

== Known issues ==

Here are the changes found in IGTPW_1880_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106023, fdo#103665)

    igt@gem_workarounds@suspend-resume-fd:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
      shard-snb:          NOTRUN -> DMESG-WARN (fdo#107956) +1

    igt@kms_frontbuffer_tracking@fbc-1p-shrfb-fliptrack:
      shard-glk:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-pgflip-blt:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          NOTRUN -> FAIL (fdo#103925)

    
    ==== Possible fixes ====

    igt@gem_exec_reloc@basic-write-gtt-noreloc:
      shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS

    igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-snb:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          FAIL (fdo#106509, fdo#105454) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-shrfb-draw-pwrite:
      shard-glk:          FAIL (fdo#103167) -> PASS

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (6 -> 5) ==

Missing (1): shard-skl

== Build changes ==

* IGT: IGT_4655 -> IGTPW_1880
* Linux: CI_DRM_4899 -> CI_DRM_4900

CI_DRM_4899: fd4ca44f6b056b12a76ebea32b09bac8501dc9a2 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4900: 5f9e451829f71e5aa1aef9ad6a0972423aac6026 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1880: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1880/
IGT_4655: de5973d410bfba0bbf04c9e7dd9e898587fc361b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1880/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 1/2
#7 lore raw
In reply to Dhinakaran Pandiyan
Quoted 6 lines · Dhinakaran Pandiyan

PSR appears to not exit immediately after the test commits a page flip,
give some leeway for PSR to idle. Let's set the timeout at 40 ms with a
5 ms interval between each status read.

Quoted 67 lines
---
 lib/igt_psr.c                    | 7 ++++++-
 lib/igt_psr.h                    | 2 +-
 tests/kms_frontbuffer_tracking.c | 3 +--
 tests/kms_psr.c                  | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)
lib/igt_psr.c +6 -1
index c2bae95b..355fe627 100644
@@ -25,7 +25,7 @@
 #include "igt_sysfs.h"
 #include <errno.h>
 
-bool psr_active(int debugfs_fd, bool check_active)
+static bool psr_active(int debugfs_fd, bool check_active)
 {
 	bool active;
 	char buf[512];
@@ -42,6 +42,11 @@ bool psr_wait_entry(int debugfs_fd)
 	return igt_wait(psr_active(debugfs_fd, true), 500, 1);
 }
 
+bool psr_wait_exit(int debugfs_fd)
+{
+	return igt_wait(psr_active(debugfs_fd, false), 40, 10);
+}
+
 static ssize_t psr_write(int debugfs_fd, const char *buf)
 {
 	return igt_sysfs_write(debugfs_fd, "i915_edp_psr_debug", buf,
lib/igt_psr.h +1 -1
index 7c846afb..b9693822 100644
@@ -29,7 +29,7 @@
 #include "igt_aux.h"
 
 bool psr_wait_entry(int debugfs_fd);
-bool psr_active(int debugfs_fd, bool check_active);
+bool psr_wait_exit(int debugfs_fd);
 bool psr_enable(int debugfs_fd);
 bool psr_disable(int debugfs_fd);
 
tests/kms_frontbuffer_tracking.c +1 -2
index 265c313a..356e5b6d 100644
@@ -1634,8 +1634,7 @@ static void do_status_assertions(int flags)
 		igt_assert_f(psr_wait_entry(drm.debugfs),
 			     "PSR still disabled\n");
 	else if (flags & ASSERT_PSR_DISABLED)
-		igt_assert_f(psr_active(drm.debugfs, false),
-			     "PSR still enabled\n");
+		igt_assert_f(psr_wait_exit(drm.debugfs), "PSR still
 enabled\n");
 }
 

static void __do_assertions(const struct test_mode *t, int flags,

tests/kms_psr.c +0 -0
index fcc04770..ebd64d46 100644

tests/kms_psr.c static void run_test(data_t *data) · line 300

Quoted 8 lines
tests/kms_psr.c +1 -1
@@ -294,7 +294,7 @@ static void run_test(data_t *data)
 		expected = "screen GREEN";
 		break;
 	}
-	igt_assert(psr_active(data->debugfs_fd, false));
+	igt_assert(psr_wait_exit(data->debugfs_fd));
 	manual(expected);
 }
 

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev