[Intel-gfx] [PATCH 6/6] drm/i915/pmu: Export counters from all tiles

Dixit, Ashutosh ashutosh.dixit at intel.com
Thu May 11 18:57:27 UTC 2023


On Fri, 05 May 2023 17:58:16 -0700, Umesh Nerlige Ramappa wrote:
>

One drive-by comment:

> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 12b2f3169abf..284e5c5b97bb 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -546,8 +546,9 @@ config_status(struct drm_i915_private *i915, u64 config)
>	struct intel_gt *gt = to_gt(i915);
>
>	unsigned int gt_id = config_gt_id(config);
> +	unsigned int max_gt_id = HAS_EXTRA_GT_LIST(i915) ? 1 : 0;

But in Patch 5 we have:

#define I915_PMU_MAX_GTS (4)

>
> -	if (gt_id)
> +	if (gt_id > max_gt_id)
>		return -ENOENT;
>
>	switch (config_counter(config)) {
> @@ -561,6 +562,8 @@ config_status(struct drm_i915_private *i915, u64 config)
>			return -ENODEV;
>		break;
>	case I915_PMU_INTERRUPTS:
> +		if (gt_id)
> +			return -ENOENT;
>		break;
>	case I915_PMU_RC6_RESIDENCY:
>		if (!gt->rc6.supported)

Thanks.
--
Ashutosh


More information about the Intel-gfx mailing list