summaryrefslogtreecommitdiff
path: root/tests/perf.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-05-01 23:40:59 -0700
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-10-04 13:44:00 +0100
commit457bed4c6861462ac69880a101812ec44301433a (patch)
tree306b06c1c8c1a841ccfb63f34cab4860a1548b5b /tests/perf.c
parentbe844d0811c5a1b2a742d1bbb01ee263c16cc9dd (diff)
tests/perf: rc6: try to guess when rc6 is disabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/perf.c')
-rw-r--r--tests/perf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/perf.c b/tests/perf.c
index fa9edfc4..f7ecf38b 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3460,6 +3460,17 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
} while (WEXITSTATUS(child_ret) == EAGAIN);
}
+static bool
+rc6_enabled(void)
+{
+ char *rc6_status = read_debugfs_record(drm_fd, "i915_drpc_info",
+ "RC6 Enabled");
+ bool enabled = strcmp(rc6_status, "yes") == 0;
+
+ free(rc6_status);
+ return enabled;
+}
+
static void
test_rc6_disable(void)
{
@@ -3479,6 +3490,8 @@ test_rc6_disable(void)
};
uint64_t n_events_start, n_events_end;
+ igt_skip_on(!rc6_enabled());
+
stream_fd = __perf_open(drm_fd, &param);
n_events_start = read_debugfs_u64_record(drm_fd, "i915_drpc_info",