Message ID | 20170804132136.23226-1-lionel.g.landwerlin@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Aug 04, 2017 at 02:21:36PM +0100, Lionel Landwerlin wrote: > Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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..aa6358d3 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_A12, > + local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12_B8_C8, > + local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_A32u40_A4u32_B8_C8, > +}; > + The whole point is that we don't have I915_OA_FORMAT_A12, you can't use that for the value of local_I915_OA_FORMAT_A12, etc. You need to use the number. -- Petri Latvala
diff --git a/tests/perf.c b/tests/perf.c index f0ec26dd..aa6358d3 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_A12, + local_I915_OA_FORMAT_A12_B8_C8 = I915_OA_FORMAT_A12_B8_C8, + local_I915_OA_FORMAT_A32u40_A4u32_B8_C8 = I915_OA_FORMAT_A32u40_A4u32_B8_C8, +}; + #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,
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> --- tests/perf.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)