igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit
@ 2018-09-28  4:19 Dhinakaran Pandiyan
  2018-09-28  4:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently Dhinakaran Pandiyan
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Dhinakaran Pandiyan @ 2018-09-28  4:19 UTC (permalink / raw)
  To: igt-dev; +Cc: 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.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 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(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index c2bae95b..355fe627 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -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,
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 7c846afb..b9693822 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -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);
 
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 265c313a..356e5b6d 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -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,
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index fcc04770..ebd64d46 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -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);
 }
 
-- 
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] 8+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently
  2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
@ 2018-09-28  4:19 ` Dhinakaran Pandiyan
  2018-09-28 17:48   ` Souza, Jose
  2018-09-28  4:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Dhinakaran Pandiyan @ 2018-09-28  4:19 UTC (permalink / raw)
  To: igt-dev; +Cc: 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.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 lib/igt_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 355fe627..0ddfb64f 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -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)
-- 
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] 8+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit
  2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
  2018-09-28  4:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently Dhinakaran Pandiyan
@ 2018-09-28  4:52 ` Patchwork
  2018-09-28  5:38 ` [igt-dev] [PATCH i-g-t 1/2] " Dhinakaran Pandiyan
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-09-28  4:52 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

== 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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit
  2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
  2018-09-28  4:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently Dhinakaran Pandiyan
  2018-09-28  4:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit Patchwork
@ 2018-09-28  5:38 ` Dhinakaran Pandiyan
  2018-09-28  5:47 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
  2018-09-28 17:48 ` [igt-dev] [PATCH i-g-t 1/2] " Souza, Jose
  4 siblings, 0 replies; 8+ messages in thread
From: Dhinakaran Pandiyan @ 2018-09-28  5:38 UTC (permalink / raw)
  To: igt-dev

On Thu, 2018-09-27 at 21:19 -0700, Dhinakaran Pandiyan wrote:
> 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
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  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(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index c2bae95b..355fe627 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -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,
> diff --git a/lib/igt_psr.h b/lib/igt_psr.h
> index 7c846afb..b9693822 100644
> --- a/lib/igt_psr.h
> +++ b/lib/igt_psr.h
> @@ -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);
>  
> diff --git a/tests/kms_frontbuffer_tracking.c
> b/tests/kms_frontbuffer_tracking.c
> index 265c313a..356e5b6d 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -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,
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index fcc04770..ebd64d46 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit
  2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
                   ` (2 preceding siblings ...)
  2018-09-28  5:38 ` [igt-dev] [PATCH i-g-t 1/2] " Dhinakaran Pandiyan
@ 2018-09-28  5:47 ` Patchwork
  2018-09-28 17:48 ` [igt-dev] [PATCH i-g-t 1/2] " Souza, Jose
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-09-28  5:47 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

== 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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently
  2018-09-28  4:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently Dhinakaran Pandiyan
@ 2018-09-28 17:48   ` Souza, Jose
  2018-09-28 20:25     ` Pandiyan, Dhinakaran
  0 siblings, 1 reply; 8+ messages in thread
From: Souza, Jose @ 2018-09-28 17:48 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran

On Thu, 2018-09-27 at 21:19 -0700, Dhinakaran Pandiyan wrote:
> 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.
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  lib/igt_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 355fe627..0ddfb64f 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -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)
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit
  2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
                   ` (3 preceding siblings ...)
  2018-09-28  5:47 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
@ 2018-09-28 17:48 ` Souza, Jose
  4 siblings, 0 replies; 8+ messages in thread
From: Souza, Jose @ 2018-09-28 17:48 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran

On Thu, 2018-09-27 at 21:19 -0700, Dhinakaran Pandiyan wrote:
> 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.
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  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(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index c2bae95b..355fe627 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -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,
> diff --git a/lib/igt_psr.h b/lib/igt_psr.h
> index 7c846afb..b9693822 100644
> --- a/lib/igt_psr.h
> +++ b/lib/igt_psr.h
> @@ -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);
>  
> diff --git a/tests/kms_frontbuffer_tracking.c
> b/tests/kms_frontbuffer_tracking.c
> index 265c313a..356e5b6d 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -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,
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index fcc04770..ebd64d46 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently
  2018-09-28 17:48   ` Souza, Jose
@ 2018-09-28 20:25     ` Pandiyan, Dhinakaran
  0 siblings, 0 replies; 8+ messages in thread
From: Pandiyan, Dhinakaran @ 2018-09-28 20:25 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Souza, Jose

On Fri, 2018-09-28 at 10:48 -0700, Souza, Jose wrote:
> On Thu, 2018-09-27 at 21:19 -0700, Dhinakaran Pandiyan wrote:
> > 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.
> > 
> 
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Thanks, pushed the patches.

-DK
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-28 20:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28  4:19 [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit Dhinakaran Pandiyan
2018-09-28  4:19 ` [igt-dev] [PATCH i-g-t 2/2] tests/psr: Check for PSR entry less frequently Dhinakaran Pandiyan
2018-09-28 17:48   ` Souza, Jose
2018-09-28 20:25     ` Pandiyan, Dhinakaran
2018-09-28  4:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/psr: Wait for PSR exit Patchwork
2018-09-28  5:38 ` [igt-dev] [PATCH i-g-t 1/2] " Dhinakaran Pandiyan
2018-09-28  5:47 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork
2018-09-28 17:48 ` [igt-dev] [PATCH i-g-t 1/2] " Souza, Jose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).