[igt-dev] [PATCH i-g-t v3 26/31] lib/i915/perf: Enable multi-tile support for perf library
Dixit, Ashutosh
ashutosh.dixit at intel.com
Wed Mar 22 04:59:09 UTC 2023
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 <ashutosh.dixit at intel.com>
More information about the igt-dev
mailing list