[Intel-gfx] [PATCH] drm/i915/pmu: Drop I915_ENGINE_SAMPLE_MAX from uapi headers

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 23 09:40:32 UTC 2017


Quoting Tvrtko Ursulin (2017-11-23 09:32:29)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> We have agreed during the engine classes discussion that fields marked as
> non-ABI are better left out altogether from uapi headers.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +-
>  include/uapi/drm/i915_drm.h             | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index 3bd30d011866..283c800d7ee7 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -359,7 +359,7 @@ struct intel_engine_cs {
>                  *
>                  * Our internal timer stores the current counters in this field.
>                  */
> -               struct i915_pmu_sample sample[I915_ENGINE_SAMPLE_MAX];
> +               struct i915_pmu_sample sample[I915_SAMPLE_SEMA + 1];

I would stick to ENGINE_SAMPLE_MAX here, and a
#define I915_ENGINE_SAMPLE_MAX (I915_SAMPLE_SEMA + 1)
above. That I think describes it better and we are less likely to be
confused later if we add another engine sampler.
-Chris


More information about the Intel-gfx mailing list