Quoting Tvrtko Ursulin (2017-11-23 10:07:01)
> From: Tvrtko Ursulin <[email protected]>
>
> We have agreed during the engine classes discussion that fields marked as
> non-ABI are better left out altogether from uapi headers.
>
> v2: Use a local define for maintanability. (Chris Wilson)
>
> Signed-off-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
> include/uapi/drm/i915_drm.h | 3 +--
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h
> b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index 3bd30d011866..2953147e1978 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -359,6 +359,7 @@ struct intel_engine_cs {
> *
> * Our internal timer stores the current counters in this
> field.
> */
> +#define I915_ENGINE_SAMPLE_MAX (I915_SAMPLE_SEMA + 1)
> struct i915_pmu_sample sample[I915_ENGINE_SAMPLE_MAX];
> /**
> * @busy_stats: Has enablement of engine stats tracking been
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 915a6e85a855..239e8633edc9 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -110,8 +110,7 @@ enum drm_i915_gem_engine_class {
> enum drm_i915_pmu_engine_sample {
> I915_SAMPLE_BUSY = 0,
> I915_SAMPLE_WAIT = 1,
> - I915_SAMPLE_SEMA = 2,
> - I915_ENGINE_SAMPLE_MAX /* non-ABI */
> + I915_SAMPLE_SEMA = 2
Classic K&R :)
You might choose to end with a ',' here for adding. Not having a ','
after MAX made sense (since it was by definition the final value).
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx