<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 09-04-2020 11:09, Anshuman Gupta
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20200409053951.26929-5-anshuman.gupta@intel.com">
      <pre class="moz-quote-pre" wrap="">When all screens are disabled, it takes some time to release
eDP/DP AUX IO power domain ref count. Also, delayed audio codec
disabling takes time to release AUDIO power domain ref-count,
using igt_wait to check lpsp after disabling all screens.

Signed-off-by: Anshuman Gupta <a class="moz-txt-link-rfc2396E" href="mailto:anshuman.gupta@intel.com"><anshuman.gupta@intel.com></a>
---
 tests/i915/i915_pm_lpsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 7be23e6c..e05d3791 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -79,7 +79,8 @@ static void screens_disabled_subtest(data_t *data)
        }
 
        igt_require_f(valid_output, "No connected output found\n");
-       igt_assert_f(lpsp_is_enabled(data), "lpsp is not enabled\n%s:\n%s\n",
+       igt_assert_f(igt_wait(lpsp_is_enabled(data), 1000, 100),</pre>
    </blockquote>
    <pre>Better to add code-comment here how the above time is calculated. Is it based on observation or captured anywhere? 
</pre>
    <pre>Regards,
Animesh
</pre>
    <blockquote type="cite"
      cite="mid:20200409053951.26929-5-anshuman.gupta@intel.com">
      <pre class="moz-quote-pre" wrap="">
+                    "lpsp is not enabled\n%s:\n%s\n",
                     PWR_DOMAIN_INFO, data->pwr_dmn_info =
                     igt_sysfs_get(data->debugfs_fd, PWR_DOMAIN_INFO));
 }
</pre>
    </blockquote>
  </body>
</html>