Like subtest basic-api, but additionally requires that current
frequency is increasing to the configured maximum within reasonable
time since we are loaded.
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
log("Required %d msec to reach cur=min\n", wait);
}
log("Required %d msec to reach cur=min\n", wait);
}
+#define LOADED_WAIT_TIMESTEP_MSEC 100
+#define LOADED_WAIT_TIMEOUT_MSEC 3000
+static void loaded_check(void)
+{
+ int freqs[NUMFREQ];
+ int wait = 0;
+
+ /* Monitor frequencies until cur increases to max, which should
+ * happen within the allotted time */
+ do {
+ read_freqs(freqs);
+ dump(freqs);
+ checkit(freqs);
+ if (freqs[CUR] == freqs[MAX])
+ break;
+ usleep(1000 * LOADED_WAIT_TIMESTEP_MSEC);
+ wait += LOADED_WAIT_TIMESTEP_MSEC;
+ } while (wait < LOADED_WAIT_TIMEOUT_MSEC);
+
+ igt_assert(freqs[CUR] == freqs[MAX]);
+ log("Required %d msec to reach cur=max\n", wait);
+}
+
static void pm_rps_exit_handler(int sig)
{
if (origfreqs[MIN] > readval(stuff[MAX].filp)) {
static void pm_rps_exit_handler(int sig)
{
if (origfreqs[MIN] > readval(stuff[MAX].filp)) {
igt_subtest("min-max-config-idle")
min_max_config(idle_check);
igt_subtest("min-max-config-idle")
min_max_config(idle_check);
+ igt_subtest("min-max-config-loaded") {
+ load_helper_run();
+ min_max_config(loaded_check);
+ load_helper_stop();
+ }
+