From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id F29DE10E420 for ; Mon, 6 Mar 2023 22:19:51 +0000 (UTC) Date: Mon, 06 Mar 2023 14:19:50 -0800 Message-ID: <87pm9lmsjd.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230215004648.2100655-8-umesh.nerlige.ramappa@intel.com> References: <20230215004648.2100655-1-umesh.nerlige.ramappa@intel.com> <20230215004648.2100655-8-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 07/31] i915/perf: Enable tests to run on specific engines List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, Lionel G Landwerlin Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Tue, 14 Feb 2023 16:46:24 -0800, Umesh Nerlige Ramappa wrote: > > @@ -5115,22 +5234,15 @@ test_sysctl_defaults(void) > igt_assert_eq(max_freq, 100000); > } > > -static int i915_perf_revision(int fd) > -{ > - drm_i915_getparam_t gp; > - int value = 1, ret; > +#define __for_each_perf_enabled_engine(fd__, e__) \ > + for_each_physical_engine(fd__, e__) \ > + if (perf_supports_engine(e__)) \ Some tests are using for_each_if() in this case (and the one below) but it's identical so: Reviewed-by: Ashutosh Dixit > + igt_dynamic_f("%s", e__->name) > > - gp.param = I915_PARAM_PERF_REVISION; > - gp.value = &value; > - ret = igt_ioctl(drm_fd, DRM_IOCTL_I915_GETPARAM, &gp); > - if (ret == -1) { > - /* If the param is missing, consider version 1. */ > - igt_assert_eq(errno, EINVAL); > - return 1; > - } > - > - return value; > -} > +#define __for_each_render_engine(fd__, e__) \ > + for_each_physical_engine(fd__, e__) \ > + if (e__->class == I915_ENGINE_CLASS_RENDER) \ > + igt_dynamic_f("%s", e__->name) >