[igt-dev] [PATCH v2 1/1] tests/xe/perf_pmu: Tests for the XE pmu interface

Dixit, Ashutosh ashutosh.dixit at intel.com
Sat Oct 7 00:58:43 UTC 2023


On Tue, 04 Jul 2023 06:55:16 -0700, Venkata Ramana Nayana wrote:
>

Guys,

> diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
> index 432bd87ca..81dae10de 100644
> --- a/include/drm-uapi/xe_drm.h
> +++ b/include/drm-uapi/xe_drm.h
> @@ -732,6 +732,28 @@ struct drm_xe_engine_create {
>	__u64 reserved[2];
>  };
>
> +/**
> + * DOC: perf_events exposed by xe through /sys/bus/event_sources/drivers/xe
> + *
> + */
> +
> +
> +/* PMU event config IDs */
> +
> +/*
> + * Top 4 bits of every counter are GT id.
> + */
> +#define __XE_PMU_GT_SHIFT (60)
> +
> +#define ___XE_PMU_OTHER(gt, x) \
> +	(((__u64)(x)) | ((__u64)(gt) << __XE_PMU_GT_SHIFT))
> +
> +#define XE_PMU_INTERRUPTS(gt)			___XE_PMU_OTHER(gt, 0)
> +#define XE_PMU_RENDER_GROUP_BUSY(gt)		___XE_PMU_OTHER(gt, 1)
> +#define XE_PMU_COPY_GROUP_BUSY(gt)		___XE_PMU_OTHER(gt, 2)
> +#define XE_PMU_MEDIA_GROUP_BUSY(gt)		___XE_PMU_OTHER(gt, 3)
> +#define XE_PMU_ANY_ENGINE_GROUP_BUSY(gt)	___XE_PMU_OTHER(gt, 4)

A new series should have been sent after running 'make headers_install'
from the latest upstream drm_xe_next branch.

> +
>  struct drm_xe_engine_get_property {

This change is also in the header and is incorrect. This is now known as
drm_xe_exec_queue_get_property and this patch reverted this to its older
name.

The patch which got merged is this:

diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
index 804c02270db..39ebbdaef09 100644
--- a/include/drm-uapi/xe_drm.h
+++ b/include/drm-uapi/xe_drm.h
@@ -783,7 +783,29 @@ struct drm_xe_exec_queue_create {
        __u64 reserved[2];
 };

-struct drm_xe_exec_queue_get_property {
+/**
+ * DOC: perf_events exposed by xe through /sys/bus/event_sources/drivers/xe
+ *
+ */
+
+
+/* PMU event config IDs */
+
+/*
+ * Top 4 bits of every counter are GT id.
+ */
+#define __XE_PMU_GT_SHIFT (60)
+
+#define ___XE_PMU_OTHER(gt, x) \
+       (((__u64)(x)) | ((__u64)(gt) << __XE_PMU_GT_SHIFT))
+
+#define XE_PMU_INTERRUPTS(gt)                  ___XE_PMU_OTHER(gt, 0)
+#define XE_PMU_RENDER_GROUP_BUSY(gt)           ___XE_PMU_OTHER(gt, 1)
+#define XE_PMU_COPY_GROUP_BUSY(gt)             ___XE_PMU_OTHER(gt, 2)
+#define XE_PMU_MEDIA_GROUP_BUSY(gt)            ___XE_PMU_OTHER(gt, 3)
+#define XE_PMU_ANY_ENGINE_GROUP_BUSY(gt)       ___XE_PMU_OTHER(gt, 4)
+
+struct drm_xe_engine_get_property {
        /** @extensions: Pointer to the first extension struct, if any */
        __u64 extensions;


More information about the igt-dev mailing list