mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
pm_rps: New subtest min-max-config-loaded
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>
This commit is contained in:
parent
ceb14b1905
commit
2cbb0fbf5f
@ -371,6 +371,29 @@ static void idle_check(void)
|
||||
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)) {
|
||||
@ -456,5 +479,11 @@ int main(int argc, char **argv)
|
||||
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();
|
||||
}
|
||||
|
||||
igt_exit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user