[Intel-gfx] [PATCH v6 02/11] drm/i915/perf: introduce a versioning of the i915-perf uapi

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 1 12:45:35 UTC 2019


Quoting Lionel Landwerlin (2019-07-01 12:34:28)
> Reporting this version will help application figure out what level of
> the support the running kernel provides.
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c |  3 +++
>  include/uapi/drm/i915_drm.h     | 21 +++++++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 794c6814a6d0..fa02e8f033d7 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -483,6 +483,9 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
>         case I915_PARAM_MMAP_GTT_COHERENT:
>                 value = INTEL_INFO(dev_priv)->has_coherent_ggtt;
>                 break;
> +       case I915_PARAM_PERF_REVISION:
> +               value = 1;

I would suggest making i915_perf_ioctl_version() and putting the value
1 there so you can document changes within i915_perf.c
-Chris


More information about the Intel-gfx mailing list