From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/psr: Wait for PSR exit
Date: Thu, 27 Sep 2018 22:38:15 -0700 [thread overview]
Message-ID: <4550e8000012010bcfab36b9e2bb38a7c67af97f.camel@intel.com> (raw)
In-Reply-To: <20180928041926.7834-1-dhinakaran.pandiyan@intel.com>
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
next prev parent reply other threads:[~2018-09-28 5:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Dhinakaran Pandiyan [this message]
2018-09-28 5:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-28 17:48 ` [igt-dev] [PATCH i-g-t 1/2] " Souza, Jose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4550e8000012010bcfab36b9e2bb38a7c67af97f.camel@intel.com \
--to=dhinakaran.pandiyan@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).