[PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
---
 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,
+};
+
 #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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux