From: jeff.mcgee@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/4 v2] pm_rps: Require that cur reaches min at idle
Date: Thu, 23 Jan 2014 15:54:50 -0600 [thread overview]
Message-ID: <1390514090-17875-1-git-send-email-jeff.mcgee@intel.com> (raw)
In-Reply-To: <20140123202455.GA29495@jeffdesk>
From: Jeff McGee <jeff.mcgee@intel.com>
The current frequency should reach the minimum frequency within a
reasonable time during idle.
v2: Not using forcewake for this particular subtest per Daniel's
suggestion.
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
---
tests/pm_rps.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 7ae0438..24a1ad6 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -206,13 +206,27 @@ static void min_max_config(void (*check)(void))
check();
}
+#define IDLE_WAIT_TIMESTEP_MSEC 100
+#define IDLE_WAIT_TIMEOUT_MSEC 3000
static void idle_check(void)
{
int freqs[NUMFREQ];
-
- read_freqs(freqs);
- dump(freqs);
- checkit(freqs);
+ int wait = 0;
+
+ /* Monitor frequencies until cur settles down to min, which should
+ * happen within the allotted time */
+ do {
+ read_freqs(freqs);
+ dump(freqs);
+ checkit(freqs);
+ if (freqs[CUR] == freqs[MIN])
+ break;
+ usleep(1000 * IDLE_WAIT_TIMESTEP_MSEC);
+ wait += IDLE_WAIT_TIMESTEP_MSEC;
+ } while (wait < IDLE_WAIT_TIMEOUT_MSEC);
+
+ igt_assert(freqs[CUR] == freqs[MIN]);
+ log("Required %d msec to reach cur=min\n", wait);
}
static void pm_rps_exit_handler(int sig)
--
1.8.5.2
next prev parent reply other threads:[~2014-01-23 21:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 23:14 Expansion of pm_rps subtest min-max-config-at-idle jeff.mcgee
2014-01-21 23:14 ` [PATCH 1/4] pm_rps: Expand on min and max config testing jeff.mcgee
2014-01-21 23:14 ` [PATCH 2/4] pm_rps: Remove repeat sysfs reads jeff.mcgee
2014-01-21 23:14 ` [PATCH 3/4] pm_rps: Make frequency logging more compact jeff.mcgee
2014-01-21 23:14 ` [PATCH 4/4] pm_rps: Require that cur reaches min at idle jeff.mcgee
2014-01-23 10:40 ` Daniel Vetter
2014-01-23 17:15 ` Jeff McGee
2014-01-23 18:49 ` Daniel Vetter
2014-01-23 20:24 ` Jeff McGee
2014-01-23 21:54 ` jeff.mcgee [this message]
2014-01-25 19:46 ` [PATCH 4/4 v2] " Daniel Vetter
2014-01-27 16:24 ` Jeff McGee
2014-01-27 16:50 ` Daniel Vetter
2014-01-27 22:23 ` Jeff McGee
2014-01-27 22:39 ` Daniel Vetter
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=1390514090-17875-1-git-send-email-jeff.mcgee@intel.com \
--to=jeff.mcgee@intel.com \
--cc=intel-gfx@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