From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6505210E271 for ; Wed, 22 Mar 2023 04:59:16 +0000 (UTC) Date: Tue, 21 Mar 2023 21:59:09 -0700 Message-ID: <87a605v0te.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230316233323.2638668-27-umesh.nerlige.ramappa@intel.com> References: <20230316233323.2638668-1-umesh.nerlige.ramappa@intel.com> <20230316233323.2638668-27-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 v3 26/31] lib/i915/perf: Enable multi-tile support for perf library 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 Thu, 16 Mar 2023 16:33:18 -0700, Umesh Nerlige Ramappa wrote: > Hi Umesh, > @@ -584,20 +584,25 @@ static const char *intel_sysfs_attr_name[2][RPS_MAX_ATTR] = > "gt/gt0/rps_min_freq_mhz", > "gt/gt0/rps_max_freq_mhz", > }, > + { > + "gt/gt1/rps_min_freq_mhz", > + "gt/gt1/rps_max_freq_mhz", > + }, > }; > > static const char * > -intel_sysfs_attr_id_to_name(int sysfs_dirfd, intel_sysfs_attr_id id) > +intel_sysfs_attr_id_to_name(int sysfs_dirfd, intel_sysfs_attr_id id, int gt) > { > assert(id < RPS_MAX_ATTR); > + assert(gt < sizeof(intel_sysfs_attr_name) - 1); Isn't this sizeof pretty large? ;-) > diff --git a/tests/i915/perf.c b/tests/i915/perf.c > index 5f516aef..f3434b99 100644 > --- a/tests/i915/perf.c > +++ b/tests/i915/perf.c > @@ -1123,7 +1123,7 @@ init_sys_info(void) > { > igt_assert_neq(devid, 0); > > - intel_perf = intel_perf_for_fd(drm_fd); > + intel_perf = intel_perf_for_fd(drm_fd, 0); Here the question is why only gt0 when on MTL we have tests running on gt1 too? Because I suspect the only thing gt dependent are the freq's and we are not using those on gt1? Still probably better to have an array of intel_perf, one per gt? Is that a later patch? Otherwise lgtm so: Reviewed-by: Ashutosh Dixit