summaryrefslogtreecommitdiff
path: root/tests/perf.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@sixbynine.org>2017-01-31 14:16:41 +0000
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-08-04 12:01:48 +0100
commit871b69aebc85bba4758a13d16ca460fbc387f6f7 (patch)
tree7c4b86a27f0407d1892a00e9cbe99bdb1164e254 /tests/perf.c
parent325d0d96096853e1d1190098151946a404623907 (diff)
tests/perf: generalize checks for undefined A counters
Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'tests/perf.c')
-rw-r--r--tests/perf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/perf.c b/tests/perf.c
index 5a6bd05a..fe39f4dd 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -232,6 +232,9 @@ static bool hsw_undefined_a_counters[45] = {
[44] = true,
};
+/* No A counters currently reserved/undefined for gen8+ so far */
+static bool gen8_undefined_a_counters[45];
+
static int drm_fd = -1;
static uint32_t devid;
static int card = -1;
@@ -244,6 +247,7 @@ static uint64_t gt_max_freq_mhz = 0;
static uint64_t timestamp_frequency = 12500000;
static enum drm_i915_oa_format test_oa_format;
+static bool *undefined_a_counters;
static igt_render_copyfunc_t render_copy = NULL;
@@ -408,9 +412,11 @@ init_sys_info(void)
test_set_name = "RenderBasic";
test_set_uuid = "403d8832-1a27-4aa6-a64e-f5389ce7b212";
test_oa_format = I915_OA_FORMAT_A45_B8_C8;
+ undefined_a_counters = hsw_undefined_a_counters;
} else {
test_set_name = "TestOa";
test_oa_format = I915_OA_FORMAT_A32u40_A4u32_B8_C8;
+ undefined_a_counters = gen8_undefined_a_counters;
if (IS_BROADWELL(devid)) {
test_set_uuid = "d6de6f55-e526-4f79-a6a6-d7315c09044e";
@@ -867,7 +873,7 @@ print_reports(uint32_t *oa_report0, uint32_t *oa_report1, int fmt)
int a_id = oa_formats[fmt].first_a + j;
uint32_t delta = a1[j] - a0[j];
- if (hsw_undefined_a_counters[a_id])
+ if (undefined_a_counters[a_id])
continue;
igt_debug("A%d: 1st = %"PRIu32", 2nd = %"PRIu32", delta = %"PRIu32"\n",
@@ -978,7 +984,7 @@ test_oa_formats(void)
int a_id = oa_formats[i].first_a + j;
uint32_t delta = a1[j] - a0[j];
- if (hsw_undefined_a_counters[a_id])
+ if (undefined_a_counters[a_id])
continue;
igt_debug("A%d: delta = %"PRIu32"\n", a_id, delta);