[Intel-gfx] [PATCH i-g-t 04/11] tests/perf: rc6: try to guess when rc6 is disabled

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Aug 4 11:20:33 UTC 2017


Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 tests/perf.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/perf.c b/tests/perf.c
index 65a1606d..7f9bc66d 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3453,6 +3453,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)
 {
@@ -3472,6 +3483,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",
-- 
2.13.3



More information about the Intel-gfx mailing list