On 09/02/18 06:30, Chris Wilson wrote:
During the startup, we try to determine if the system supports rc6 prior to testing. However, the startup check asserts the residency debugfs exists, instead of testing for a requirement. Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Antonio Argenziano <[email protected]>
--- tests/pm_rc6_residency.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c index 01eeaa307..cd36f7378 100644 --- a/tests/pm_rc6_residency.c +++ b/tests/pm_rc6_residency.c @@ -60,6 +60,15 @@ static unsigned long get_rc6_enabled_mask(void) return enabled; }+static bool has_rc6_residency(const char *name)+{ + unsigned long residency; + char path[128]; + + sprintf(path, "power/%s_residency_ms", name); + return igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1; +} + static unsigned long read_rc6_residency(const char *name) { unsigned long residency; @@ -170,6 +179,9 @@ static bool wait_for_rc6(void) struct timespec tv = {}; unsigned long start, now;+ if (!has_rc6_residency("rc6"))+ return false; + /* First wait for roughly an RC6 Evaluation Interval */ usleep(160 * 1000);
I think wait_for_rc6 has some strange indent, can you fix when pushing? Thanks, Antonio
_______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
