From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5219610E612 for ; Thu, 20 Jul 2023 23:18:04 +0000 (UTC) From: Ashutosh Dixit To: igt-dev@lists.freedesktop.org Date: Thu, 20 Jul 2023 16:17:50 -0700 Message-ID: <20230720231756.3464641-15-ashutosh.dixit@intel.com> In-Reply-To: <20230720231756.3464641-1-ashutosh.dixit@intel.com> References: <20230720231756.3464641-1-ashutosh.dixit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 14/20] tests/i915/perf: Fix has_class_instance for xe List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: PMU is not available for xe so implement has_class_instance for xe without PMU. Signed-off-by: Ashutosh Dixit --- tests/i915/perf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/i915/perf.c b/tests/i915/perf.c index 78e68462ad06..df6cb7edd017 100644 --- a/tests/i915/perf.c +++ b/tests/i915/perf.c @@ -5816,6 +5816,12 @@ static bool has_class_instance(int i915, uint16_t class, uint16_t instance) { int fd; + if (is_xe_device(drm_fd)) { + if (class == I915_ENGINE_CLASS_RENDER && !IS_PONTEVECCHIO(devid)) + return true; + return false; + } + fd = perf_i915_open(i915, I915_PMU_ENGINE_BUSY(class, instance)); if (fd >= 0) { close(fd); -- 2.41.0