From patchwork Fri Aug 4 13:21:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9881271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 72ABF602B8 for ; Fri, 4 Aug 2017 13:21:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BB042040D for ; Fri, 4 Aug 2017 13:21:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60785287EE; Fri, 4 Aug 2017 13:21:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE66E2040D for ; Fri, 4 Aug 2017 13:21:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14D1A6E3A2; Fri, 4 Aug 2017 13:21:41 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FFB16E3A2 for ; Fri, 4 Aug 2017 13:21:39 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 04 Aug 2017 06:21:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,321,1498546800"; d="scan'208";a="119751057" Received: from delly.ld.intel.com ([10.103.239.169]) by orsmga002.jf.intel.com with ESMTP; 04 Aug 2017 06:21:38 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Fri, 4 Aug 2017 14:21:36 +0100 Message-Id: <20170804132136.23226-1-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.13.3 Subject: [Intel-gfx] [PATCH i-g-t] tests/perf: fix build where system headers don't have Gen8 formats X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lionel Landwerlin --- 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,