From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id C071810E390 for ; Tue, 8 Aug 2023 01:00:24 +0000 (UTC) From: Ashutosh Dixit To: igt-dev@lists.freedesktop.org Date: Mon, 7 Aug 2023 18:00:11 -0700 Message-ID: <20230808010017.37819-15-ashutosh.dixit@intel.com> In-Reply-To: <20230808010017.37819-1-ashutosh.dixit@intel.com> References: <20230808010017.37819-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