v2: Use previous enum to define the new Gen8 enums (Petri)

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

diff --git a/tests/perf.c b/tests/perf.c
index f0ec26dd..23f7f1af 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -143,6 +143,13 @@ enum drm_i915_perf_record_type {
 };
 #endif /* !DRM_I915_PERF_OPEN */

+/* There is no ifdef we can use for those formats :( */
+enum {
+       local_I915_OA_FORMAT_A12 = I915_OA_FORMAT_C4_B8 + 1,
+       local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12 + 2,
+       local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_C4_B8 + 3,
+};
+
 #ifndef DRM_IOCTL_I915_PERF_ADD_CONFIG

 #define DRM_I915_PERF_ADD_CONFIG       0x37
@@ -230,17 +237,17 @@ static struct {

        /* Gen8+ */

-       [I915_OA_FORMAT_A12] = {
+       [local_I915_OA_FORMAT_A12] = {
                "A12", .size = 64,
                .a_off = 12, .n_a = 12, .first_a = 7,
                .min_gen = 8 },
-       [I915_OA_FORMAT_A12_B8_C8] = {
+       [local_I915_OA_FORMAT_A12_B8_C8] = {
                "A12_B8_C8", .size = 128,
                .a_off = 12, .n_a = 12,
                .b_off = 64, .n_b = 8,
                .c_off = 96, .n_c = 8, .first_a = 7,
                .min_gen = 8 },
-       [I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
+       [local_I915_OA_FORMAT_A32u40_A4u32_B8_C8] = {
                "A32u40_A4u32_B8_C8", .size = 256,
                .a40_high_off = 160, .a40_low_off = 16, .n_a40 = 32,
                .a_off = 144, .n_a = 4, .first_a = 32,
--
2.13.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to