All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip: perf/urgent] tools headers uapi: Sync drm/i915_drm.h with the kernel sources
       [not found] <tip-o651nt7vpz93tu3nmx4f3xql@git.kernel.org>
@ 2019-10-07 14:49 ` tip-bot2 for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2019-10-07 14:49 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Adrian Hunter, Chris Wilson, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo, Ingo Molnar, Borislav Petkov,
	linux-kernel

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     08a96a31474a732fd654575ced843b94bc3212e1
Gitweb:        https://git.kernel.org/tip/08a96a31474a732fd654575ced843b94bc3212e1
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Fri, 27 Sep 2019 09:28:11 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Fri, 27 Sep 2019 09:28:11 -03:00

tools headers uapi: Sync drm/i915_drm.h with the kernel sources

To pick the change in:

  bf73fc0fa9cf ("drm/i915: Show support for accurate sw PMU busyness tracking")

That don't result in any changes in tooling, just silences this perf
build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
  diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-o651nt7vpz93tu3nmx4f3xql@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/drm/i915_drm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 328d05e..469dc51 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -521,6 +521,7 @@ typedef struct drm_i915_irq_wait {
 #define   I915_SCHEDULER_CAP_PRIORITY	(1ul << 1)
 #define   I915_SCHEDULER_CAP_PREEMPTION	(1ul << 2)
 #define   I915_SCHEDULER_CAP_SEMAPHORES	(1ul << 3)
+#define   I915_SCHEDULER_CAP_ENGINE_BUSY_STATS	(1ul << 4)
 
 #define I915_PARAM_HUC_STATUS		 42
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [tip: perf/urgent] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
@ 2020-04-16  8:31 tip-bot2 for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2020-04-16  8:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Adrian Hunter, Chris Wilson, Jiri Olsa, Namhyung Kim,
	Arnaldo Carvalho de Melo, x86, LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     54a58ebc66cea54de056888e0afdda2983f00e0e
Gitweb:        https://git.kernel.org/tip/54a58ebc66cea54de056888e0afdda2983f00e0e
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Tue, 14 Apr 2020 09:40:01 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 14 Apr 2020 11:02:52 -03:00

tools headers UAPI: Sync drm/i915_drm.h with the kernel sources

To pick the change in:

  88be76cdafc7 ("drm/i915: Allow userspace to specify ringsize on construction")

That don't result in any changes in tooling, just silences this perf
build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
  diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/drm/i915_drm.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 829c0a4..2813e57 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -1619,6 +1619,27 @@ struct drm_i915_gem_context_param {
  * By default, new contexts allow persistence.
  */
 #define I915_CONTEXT_PARAM_PERSISTENCE	0xb
+
+/*
+ * I915_CONTEXT_PARAM_RINGSIZE:
+ *
+ * Sets the size of the CS ringbuffer to use for logical ring contexts. This
+ * applies a limit of how many batches can be queued to HW before the caller
+ * is blocked due to lack of space for more commands.
+ *
+ * Only reliably possible to be set prior to first use, i.e. during
+ * construction. At any later point, the current execution must be flushed as
+ * the ring can only be changed while the context is idle. Note, the ringsize
+ * can be specified as a constructor property, see
+ * I915_CONTEXT_CREATE_EXT_SETPARAM, but can also be set later if required.
+ *
+ * Only applies to the current set of engine and lost when those engines
+ * are replaced by a new mapping (see I915_CONTEXT_PARAM_ENGINES).
+ *
+ * Must be between 4 - 512 KiB, in intervals of page size [4 KiB].
+ * Default is 16 KiB.
+ */
+#define I915_CONTEXT_PARAM_RINGSIZE	0xc
 /* Must be kept compact -- no holes and well documented */
 
 	__u64 value;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [tip: perf/urgent] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
@ 2020-02-15  8:41 tip-bot2 for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2020-02-15  8:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Abdiel Janulgue, Adrian Hunter, Chris Wilson, Jiri Olsa,
	Namhyung Kim, Arnaldo Carvalho de Melo, x86, LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     365f9cc195a7fae8ac541129cd2a31ad87e46221
Gitweb:        https://git.kernel.org/tip/365f9cc195a7fae8ac541129cd2a31ad87e46221
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Wed, 12 Feb 2020 10:25:27 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Wed, 12 Feb 2020 10:25:27 -03:00

tools headers UAPI: Sync drm/i915_drm.h with the kernel sources

To pick the change in:

  cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET")

That don't result in any changes in tooling, just silences this perf
build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
  diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h

Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/drm/i915_drm.h | 32 ++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+)

diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 5400d7e..829c0a4 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -395,6 +395,7 @@ typedef struct _drm_i915_sarea {
 #define DRM_IOCTL_I915_GEM_PWRITE	DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
 #define DRM_IOCTL_I915_GEM_MMAP		DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
 #define DRM_IOCTL_I915_GEM_MMAP_GTT	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt)
+#define DRM_IOCTL_I915_GEM_MMAP_OFFSET	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_offset)
 #define DRM_IOCTL_I915_GEM_SET_DOMAIN	DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain)
 #define DRM_IOCTL_I915_GEM_SW_FINISH	DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish)
 #define DRM_IOCTL_I915_GEM_SET_TILING	DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
@@ -793,6 +794,37 @@ struct drm_i915_gem_mmap_gtt {
 	__u64 offset;
 };
 
+struct drm_i915_gem_mmap_offset {
+	/** Handle for the object being mapped. */
+	__u32 handle;
+	__u32 pad;
+	/**
+	 * Fake offset to use for subsequent mmap call
+	 *
+	 * This is a fixed-size type for 32/64 compatibility.
+	 */
+	__u64 offset;
+
+	/**
+	 * Flags for extended behaviour.
+	 *
+	 * It is mandatory that one of the MMAP_OFFSET types
+	 * (GTT, WC, WB, UC, etc) should be included.
+	 */
+	__u64 flags;
+#define I915_MMAP_OFFSET_GTT 0
+#define I915_MMAP_OFFSET_WC  1
+#define I915_MMAP_OFFSET_WB  2
+#define I915_MMAP_OFFSET_UC  3
+
+	/*
+	 * Zero-terminated chain of extensions.
+	 *
+	 * No current extensions defined; mbz.
+	 */
+	__u64 extensions;
+};
+
 struct drm_i915_gem_set_domain {
 	/** Handle for the object */
 	__u32 handle;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [tip: perf/urgent] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
  2019-12-06  8:03 ` [tip: perf/urgent] tools headers UAPI: " tip-bot2 for Arnaldo Carvalho de Melo
@ 2019-12-06  9:02   ` Lionel Landwerlin
  0 siblings, 0 replies; 5+ messages in thread
From: Lionel Landwerlin @ 2019-12-06  9:02 UTC (permalink / raw)
  To: linux-kernel, linux-tip-commits
  Cc: Adrian Hunter, Chris Wilson, Daniele Ceraolo Spurio, Jiri Olsa,
	Namhyung Kim, Arnaldo Carvalho de Melo, x86

On 06/12/2019 10:03, tip-bot2 for Arnaldo Carvalho de Melo wrote:
> The following commit has been merged into the perf/urgent branch of tip:
>
> Commit-ID:     0b3fca6ad3283866e9d2376554b3e4fbf23bfd5d
> Gitweb:        https://git.kernel.org/tip/0b3fca6ad3283866e9d2376554b3e4fbf23bfd5d
> Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
> AuthorDate:    Wed, 04 Dec 2019 12:49:43 -03:00
> Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
> CommitterDate: Wed, 04 Dec 2019 16:22:28 -03:00
>
> tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
>
> To pick the change in:
>
>    a0e047156cde ("drm/i915/gem: Make context persistence optional")
>    9cd20ef7803c ("drm/i915/perf: allow holding preemption on filtered ctx")
>    7831e9a965ea ("drm/i915/perf: Allow dynamic reconfiguration of the OA stream")
>    4f6ccc74a85c ("drm/i915: add support for perf configuration queries")
>    b8d49f28aa03 ("drm/i915/perf: introduce a versioning of the i915-perf uapi")
>    601734f7aabd ("drm/i915/tgl: s/ss/eu fuse reading support")
>
> That don't result in any changes in tooling, just silences this perf
> build warning:
>
>    Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
>    diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Link: https://lkml.kernel.org/n/tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>   tools/include/uapi/drm/i915_drm.h | 128 ++++++++++++++++++++++++++++-
>   1 file changed, 125 insertions(+), 3 deletions(-)
>
> diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
> index 469dc51..5400d7e 100644
> --- a/tools/include/uapi/drm/i915_drm.h
> +++ b/tools/include/uapi/drm/i915_drm.h
> @@ -611,6 +611,13 @@ typedef struct drm_i915_irq_wait {
>    * See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT.
>    */
>   #define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53
> +
> +/*
> + * Revision of the i915-perf uAPI. The value returned helps determine what
> + * i915-perf features are available. See drm_i915_perf_property_id.
> + */
> +#define I915_PARAM_PERF_REVISION	54
> +
>   /* Must be kept compact -- no holes and well documented */
>   
>   typedef struct drm_i915_getparam {
> @@ -1565,6 +1572,21 @@ struct drm_i915_gem_context_param {
>    *   i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND)
>    */
>   #define I915_CONTEXT_PARAM_ENGINES	0xa
> +
> +/*
> + * I915_CONTEXT_PARAM_PERSISTENCE:
> + *
> + * Allow the context and active rendering to survive the process until
> + * completion. Persistence allows fire-and-forget clients to queue up a
> + * bunch of work, hand the output over to a display server and then quit.
> + * If the context is marked as not persistent, upon closing (either via
> + * an explicit DRM_I915_GEM_CONTEXT_DESTROY or implicitly from file closure
> + * or process termination), the context and any outstanding requests will be
> + * cancelled (and exported fences for cancelled requests marked as -EIO).
> + *
> + * By default, new contexts allow persistence.
> + */
> +#define I915_CONTEXT_PARAM_PERSISTENCE	0xb
>   /* Must be kept compact -- no holes and well documented */
>   
>   	__u64 value;
> @@ -1844,23 +1866,31 @@ enum drm_i915_perf_property_id {
>   	 * Open the stream for a specific context handle (as used with
>   	 * execbuffer2). A stream opened for a specific context this way
>   	 * won't typically require root privileges.
> +	 *
> +	 * This property is available in perf revision 1.
>   	 */
>   	DRM_I915_PERF_PROP_CTX_HANDLE = 1,
>   
>   	/**
>   	 * A value of 1 requests the inclusion of raw OA unit reports as
>   	 * part of stream samples.
> +	 *
> +	 * This property is available in perf revision 1.
>   	 */
>   	DRM_I915_PERF_PROP_SAMPLE_OA,
>   
>   	/**
>   	 * The value specifies which set of OA unit metrics should be
>   	 * be configured, defining the contents of any OA unit reports.
> +	 *
> +	 * This property is available in perf revision 1.
>   	 */
>   	DRM_I915_PERF_PROP_OA_METRICS_SET,
>   
>   	/**
>   	 * The value specifies the size and layout of OA unit reports.
> +	 *
> +	 * This property is available in perf revision 1.
>   	 */
>   	DRM_I915_PERF_PROP_OA_FORMAT,
>   
> @@ -1870,9 +1900,22 @@ enum drm_i915_perf_property_id {
>   	 * from this exponent as follows:
>   	 *
>   	 *   80ns * 2^(period_exponent + 1)
> +	 *
> +	 * This property is available in perf revision 1.
>   	 */
>   	DRM_I915_PERF_PROP_OA_EXPONENT,
>   
> +	/**
> +	 * Specifying this property is only valid when specify a context to
> +	 * filter with DRM_I915_PERF_PROP_CTX_HANDLE. Specifying this property
> +	 * will hold preemption of the particular context we want to gather
> +	 * performance data about. The execbuf2 submissions must include a
> +	 * drm_i915_gem_execbuffer_ext_perf parameter for this to apply.
> +	 *
> +	 * This property is available in perf revision 3.
> +	 */
> +	DRM_I915_PERF_PROP_HOLD_PREEMPTION,
> +
>   	DRM_I915_PERF_PROP_MAX /* non-ABI */
>   };
>   
> @@ -1901,6 +1944,8 @@ struct drm_i915_perf_open_param {
>    * to close and re-open a stream with the same configuration.
>    *
>    * It's undefined whether any pending data for the stream will be lost.
> + *
> + * This ioctl is available in perf revision 1.
>    */
>   #define I915_PERF_IOCTL_ENABLE	_IO('i', 0x0)
>   
> @@ -1908,10 +1953,25 @@ struct drm_i915_perf_open_param {
>    * Disable data capture for a stream.
>    *
>    * It is an error to try and read a stream that is disabled.
> + *
> + * This ioctl is available in perf revision 1.
>    */
>   #define I915_PERF_IOCTL_DISABLE	_IO('i', 0x1)
>   
>   /**
> + * Change metrics_set captured by a stream.
> + *
> + * If the stream is bound to a specific context, the configuration change
> + * will performed inline with that context such that it takes effect before
> + * the next execbuf submission.
> + *
> + * Returns the previously bound metrics set id, or a negative error code.
> + *
> + * This ioctl is available in perf revision 2.
> + */
> +#define I915_PERF_IOCTL_CONFIG	_IO('i', 0x2)
> +
> +/**
>    * Common to all i915 perf records
>    */
>   struct drm_i915_perf_record_header {
> @@ -1984,6 +2044,7 @@ struct drm_i915_query_item {
>   	__u64 query_id;
>   #define DRM_I915_QUERY_TOPOLOGY_INFO    1
>   #define DRM_I915_QUERY_ENGINE_INFO	2
> +#define DRM_I915_QUERY_PERF_CONFIG      3
>   /* Must be kept compact -- no holes and well documented */
>   
>   	/*
> @@ -1995,9 +2056,18 @@ struct drm_i915_query_item {
>   	__s32 length;
>   
>   	/*
> -	 * Unused for now. Must be cleared to zero.
> +	 * When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
> +	 *
> +	 * When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
> +	 * following :
> +	 *         - DRM_I915_QUERY_PERF_CONFIG_LIST
> +	 *         - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
> +	 *         - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
>   	 */
>   	__u32 flags;
> +#define DRM_I915_QUERY_PERF_CONFIG_LIST          1
> +#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2
> +#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID   3
>   
>   	/*
>   	 * Data will be written at the location pointed by data_ptr when the
> @@ -2033,8 +2103,10 @@ struct drm_i915_query {
>    *           (data[X / 8] >> (X % 8)) & 1
>    *
>    * - the subslice mask for each slice with one bit per subslice telling
> - *   whether a subslice is available. The availability of subslice Y in slice
> - *   X can be queried with the following formula :
> + *   whether a subslice is available. Gen12 has dual-subslices, which are
> + *   similar to two gen11 subslices. For gen12, this array represents dual-
> + *   subslices. The availability of subslice Y in slice X can be queried
> + *   with the following formula :
>    *
>    *           (data[subslice_offset +
>    *                 X * subslice_stride +
> @@ -2123,6 +2195,56 @@ struct drm_i915_query_engine_info {
>   	struct drm_i915_engine_info engines[];
>   };
>   
> +/*
> + * Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
> + */
> +struct drm_i915_query_perf_config {
> +	union {
> +		/*
> +		 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
> +		 * this fields to the number of configurations available.
> +		 */
> +		__u64 n_configs;
> +
> +		/*
> +		 * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID,
> +		 * i915 will use the value in this field as configuration
> +		 * identifier to decide what data to write into config_ptr.
> +		 */
> +		__u64 config;
> +
> +		/*
> +		 * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID,
> +		 * i915 will use the value in this field as configuration
> +		 * identifier to decide what data to write into config_ptr.
> +		 *
> +		 * String formatted like "%08x-%04x-%04x-%04x-%012x"
> +		 */
> +		char uuid[36];
> +	};
> +
> +	/*
> +	 * Unused for now. Must be cleared to zero.
> +	 */
> +	__u32 flags;
> +
> +	/*
> +	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
> +	 * write an array of __u64 of configuration identifiers.
> +	 *
> +	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
> +	 * write a struct drm_i915_perf_oa_config. If the following fields of
> +	 * drm_i915_perf_oa_config are set not set to 0, i915 will write into
> +	 * the associated pointers the values of submitted when the
> +	 * configuration was created :
> +	 *
> +	 *         - n_mux_regs
> +	 *         - n_boolean_regs
> +	 *         - n_flex_regs
> +	 */
> +	__u8 data[];
> +};
> +
>   #if defined(__cplusplus)
>   }
>   #endif



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip: perf/urgent] tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
       [not found] <tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org>
@ 2019-12-06  8:03 ` tip-bot2 for Arnaldo Carvalho de Melo
  2019-12-06  9:02   ` Lionel Landwerlin
  0 siblings, 1 reply; 5+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2019-12-06  8:03 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Adrian Hunter, Chris Wilson, Daniele Ceraolo Spurio, Jiri Olsa,
	Lionel Landwerlin, Namhyung Kim, Arnaldo Carvalho de Melo, x86,
	LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     0b3fca6ad3283866e9d2376554b3e4fbf23bfd5d
Gitweb:        https://git.kernel.org/tip/0b3fca6ad3283866e9d2376554b3e4fbf23bfd5d
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Wed, 04 Dec 2019 12:49:43 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Wed, 04 Dec 2019 16:22:28 -03:00

tools headers UAPI: Sync drm/i915_drm.h with the kernel sources

To pick the change in:

  a0e047156cde ("drm/i915/gem: Make context persistence optional")
  9cd20ef7803c ("drm/i915/perf: allow holding preemption on filtered ctx")
  7831e9a965ea ("drm/i915/perf: Allow dynamic reconfiguration of the OA stream")
  4f6ccc74a85c ("drm/i915: add support for perf configuration queries")
  b8d49f28aa03 ("drm/i915/perf: introduce a versioning of the i915-perf uapi")
  601734f7aabd ("drm/i915/tgl: s/ss/eu fuse reading support")

That don't result in any changes in tooling, just silences this perf
build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
  diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/drm/i915_drm.h | 128 ++++++++++++++++++++++++++++-
 1 file changed, 125 insertions(+), 3 deletions(-)

diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 469dc51..5400d7e 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -611,6 +611,13 @@ typedef struct drm_i915_irq_wait {
  * See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT.
  */
 #define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53
+
+/*
+ * Revision of the i915-perf uAPI. The value returned helps determine what
+ * i915-perf features are available. See drm_i915_perf_property_id.
+ */
+#define I915_PARAM_PERF_REVISION	54
+
 /* Must be kept compact -- no holes and well documented */
 
 typedef struct drm_i915_getparam {
@@ -1565,6 +1572,21 @@ struct drm_i915_gem_context_param {
  *   i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND)
  */
 #define I915_CONTEXT_PARAM_ENGINES	0xa
+
+/*
+ * I915_CONTEXT_PARAM_PERSISTENCE:
+ *
+ * Allow the context and active rendering to survive the process until
+ * completion. Persistence allows fire-and-forget clients to queue up a
+ * bunch of work, hand the output over to a display server and then quit.
+ * If the context is marked as not persistent, upon closing (either via
+ * an explicit DRM_I915_GEM_CONTEXT_DESTROY or implicitly from file closure
+ * or process termination), the context and any outstanding requests will be
+ * cancelled (and exported fences for cancelled requests marked as -EIO).
+ *
+ * By default, new contexts allow persistence.
+ */
+#define I915_CONTEXT_PARAM_PERSISTENCE	0xb
 /* Must be kept compact -- no holes and well documented */
 
 	__u64 value;
@@ -1844,23 +1866,31 @@ enum drm_i915_perf_property_id {
 	 * Open the stream for a specific context handle (as used with
 	 * execbuffer2). A stream opened for a specific context this way
 	 * won't typically require root privileges.
+	 *
+	 * This property is available in perf revision 1.
 	 */
 	DRM_I915_PERF_PROP_CTX_HANDLE = 1,
 
 	/**
 	 * A value of 1 requests the inclusion of raw OA unit reports as
 	 * part of stream samples.
+	 *
+	 * This property is available in perf revision 1.
 	 */
 	DRM_I915_PERF_PROP_SAMPLE_OA,
 
 	/**
 	 * The value specifies which set of OA unit metrics should be
 	 * be configured, defining the contents of any OA unit reports.
+	 *
+	 * This property is available in perf revision 1.
 	 */
 	DRM_I915_PERF_PROP_OA_METRICS_SET,
 
 	/**
 	 * The value specifies the size and layout of OA unit reports.
+	 *
+	 * This property is available in perf revision 1.
 	 */
 	DRM_I915_PERF_PROP_OA_FORMAT,
 
@@ -1870,9 +1900,22 @@ enum drm_i915_perf_property_id {
 	 * from this exponent as follows:
 	 *
 	 *   80ns * 2^(period_exponent + 1)
+	 *
+	 * This property is available in perf revision 1.
 	 */
 	DRM_I915_PERF_PROP_OA_EXPONENT,
 
+	/**
+	 * Specifying this property is only valid when specify a context to
+	 * filter with DRM_I915_PERF_PROP_CTX_HANDLE. Specifying this property
+	 * will hold preemption of the particular context we want to gather
+	 * performance data about. The execbuf2 submissions must include a
+	 * drm_i915_gem_execbuffer_ext_perf parameter for this to apply.
+	 *
+	 * This property is available in perf revision 3.
+	 */
+	DRM_I915_PERF_PROP_HOLD_PREEMPTION,
+
 	DRM_I915_PERF_PROP_MAX /* non-ABI */
 };
 
@@ -1901,6 +1944,8 @@ struct drm_i915_perf_open_param {
  * to close and re-open a stream with the same configuration.
  *
  * It's undefined whether any pending data for the stream will be lost.
+ *
+ * This ioctl is available in perf revision 1.
  */
 #define I915_PERF_IOCTL_ENABLE	_IO('i', 0x0)
 
@@ -1908,10 +1953,25 @@ struct drm_i915_perf_open_param {
  * Disable data capture for a stream.
  *
  * It is an error to try and read a stream that is disabled.
+ *
+ * This ioctl is available in perf revision 1.
  */
 #define I915_PERF_IOCTL_DISABLE	_IO('i', 0x1)
 
 /**
+ * Change metrics_set captured by a stream.
+ *
+ * If the stream is bound to a specific context, the configuration change
+ * will performed inline with that context such that it takes effect before
+ * the next execbuf submission.
+ *
+ * Returns the previously bound metrics set id, or a negative error code.
+ *
+ * This ioctl is available in perf revision 2.
+ */
+#define I915_PERF_IOCTL_CONFIG	_IO('i', 0x2)
+
+/**
  * Common to all i915 perf records
  */
 struct drm_i915_perf_record_header {
@@ -1984,6 +2044,7 @@ struct drm_i915_query_item {
 	__u64 query_id;
 #define DRM_I915_QUERY_TOPOLOGY_INFO    1
 #define DRM_I915_QUERY_ENGINE_INFO	2
+#define DRM_I915_QUERY_PERF_CONFIG      3
 /* Must be kept compact -- no holes and well documented */
 
 	/*
@@ -1995,9 +2056,18 @@ struct drm_i915_query_item {
 	__s32 length;
 
 	/*
-	 * Unused for now. Must be cleared to zero.
+	 * When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
+	 *
+	 * When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
+	 * following :
+	 *         - DRM_I915_QUERY_PERF_CONFIG_LIST
+	 *         - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
+	 *         - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
 	 */
 	__u32 flags;
+#define DRM_I915_QUERY_PERF_CONFIG_LIST          1
+#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2
+#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID   3
 
 	/*
 	 * Data will be written at the location pointed by data_ptr when the
@@ -2033,8 +2103,10 @@ struct drm_i915_query {
  *           (data[X / 8] >> (X % 8)) & 1
  *
  * - the subslice mask for each slice with one bit per subslice telling
- *   whether a subslice is available. The availability of subslice Y in slice
- *   X can be queried with the following formula :
+ *   whether a subslice is available. Gen12 has dual-subslices, which are
+ *   similar to two gen11 subslices. For gen12, this array represents dual-
+ *   subslices. The availability of subslice Y in slice X can be queried
+ *   with the following formula :
  *
  *           (data[subslice_offset +
  *                 X * subslice_stride +
@@ -2123,6 +2195,56 @@ struct drm_i915_query_engine_info {
 	struct drm_i915_engine_info engines[];
 };
 
+/*
+ * Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
+ */
+struct drm_i915_query_perf_config {
+	union {
+		/*
+		 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
+		 * this fields to the number of configurations available.
+		 */
+		__u64 n_configs;
+
+		/*
+		 * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID,
+		 * i915 will use the value in this field as configuration
+		 * identifier to decide what data to write into config_ptr.
+		 */
+		__u64 config;
+
+		/*
+		 * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID,
+		 * i915 will use the value in this field as configuration
+		 * identifier to decide what data to write into config_ptr.
+		 *
+		 * String formatted like "%08x-%04x-%04x-%04x-%012x"
+		 */
+		char uuid[36];
+	};
+
+	/*
+	 * Unused for now. Must be cleared to zero.
+	 */
+	__u32 flags;
+
+	/*
+	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
+	 * write an array of __u64 of configuration identifiers.
+	 *
+	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
+	 * write a struct drm_i915_perf_oa_config. If the following fields of
+	 * drm_i915_perf_oa_config are set not set to 0, i915 will write into
+	 * the associated pointers the values of submitted when the
+	 * configuration was created :
+	 *
+	 *         - n_mux_regs
+	 *         - n_boolean_regs
+	 *         - n_flex_regs
+	 */
+	__u8 data[];
+};
+
 #if defined(__cplusplus)
 }
 #endif

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-16  9:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tip-o651nt7vpz93tu3nmx4f3xql@git.kernel.org>
2019-10-07 14:49 ` [tip: perf/urgent] tools headers uapi: Sync drm/i915_drm.h with the kernel sources tip-bot2 for Arnaldo Carvalho de Melo
     [not found] <tip-qwzjrgwj55y3g6rjdf9spkpr@git.kernel.org>
2019-12-06  8:03 ` [tip: perf/urgent] tools headers UAPI: " tip-bot2 for Arnaldo Carvalho de Melo
2019-12-06  9:02   ` Lionel Landwerlin
2020-02-15  8:41 tip-bot2 for Arnaldo Carvalho de Melo
2020-04-16  8:31 tip-bot2 for Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.