[igt-dev] [PATCH i-g-t 06/31] i915/perf: Add class:instance support to OA tests

Dixit, Ashutosh ashutosh.dixit at intel.com
Sat Mar 4 03:38:05 UTC 2023


On Tue, 14 Feb 2023 16:46:23 -0800, Umesh Nerlige Ramappa wrote:
>
> Add test to verify class:instance interface to perf OA.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
> ---
>  include/drm-uapi/i915_drm.h | 20 +++++++++++++++
>  tests/i915/perf.c           | 49 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 69 insertions(+)
>
> diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
> index b71acfba..5fab3066 100644
> --- a/include/drm-uapi/i915_drm.h
> +++ b/include/drm-uapi/i915_drm.h
> @@ -2627,6 +2627,26 @@ enum drm_i915_perf_property_id {
>	 */
>	DRM_I915_PERF_PROP_POLL_OA_PERIOD,
>
> +	/**
> +	 * In platforms with multiple OA buffers, the engine class instance must
> +	 * be passed to open a stream to a OA unit corresponding to the engine.
> +	 * Multiple engines may be mapped to the same OA unit.
> +	 *
> +	 * In addition to the class:instance, if a gem context is also passed, then
> +	 * 1) the report headers of OA reports from other engines are squashed.
> +	 * 2) OAR is enabled for the class:instance
> +	 *
> +	 * This property is available in perf revision 6.
> +	 */
> +	DRM_I915_PERF_PROP_OA_ENGINE_CLASS,
> +
> +	/**
> +	 * This parameter specifies the engine instance.
> +	 *
> +	 * This property is available in perf revision 6.
> +	 */
> +	DRM_I915_PERF_PROP_OA_ENGINE_INSTANCE,
> +

This file cannot be modified, it must be sync'd with the
kernel. Temporarily add these as #defines or enum with the correct values
to lib/i915/i915_drm_local.h.

With the above, this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>


More information about the igt-dev mailing list