From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-xe] [RFC 2/5] drm/xe/uapi: Document drm_xe_query_gt.
Date: Fri, 8 Sep 2023 16:32:59 -0400 [thread overview]
Message-ID: <20230908203302.449041-3-rodrigo.vivi@intel.com> (raw)
In-Reply-To: <20230908203302.449041-1-rodrigo.vivi@intel.com>
Split drm_xe_query_gt out of the gt list one in order to better
document it. No functional change at this point.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
include/uapi/drm/xe_drm.h | 65 ++++++++++++++++++++++++++-------------
1 file changed, 43 insertions(+), 22 deletions(-)
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 51c4ef5dee6d..4bcee709bef9 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -262,6 +262,47 @@ struct drm_xe_query_config {
__u64 info[];
};
+/**
+ * struct drm_xe_query_gt - describe an individual GT.
+ *
+ * To be used with drm_xe_query_gts, which will return a list with all the
+ * existing GT individual descriptions.
+ * Graphics Technology (GT) is a subset of a GPU/tile that is responsible for
+ * implementing graphics and/or media operations.
+ */
+struct drm_xe_query_gt {
+#define XE_QUERY_GT_TYPE_MAIN 0
+#define XE_QUERY_GT_TYPE_REMOTE 1
+#define XE_QUERY_GT_TYPE_MEDIA 2
+ /** @type: GT type: Main, Remote, or Media */
+ __u16 type;
+ /** @instance: Instance of this GT in the GT list */
+ __u16 instance;
+ /** @clock_freq: A clock frequency for timestamp */
+ __u32 clock_freq;
+ /** @features: Reserved for future information about GT features */
+ __u64 features;
+ /**
+ * @native_mem_regions: Bit maks of instances from
+ * drm_xe_query_mem_usage that lives on the same GPU/Tile and have
+ * direct access.
+ */
+ __u64 native_mem_regions;
+ /**
+ * @slow_mem_regions: Bit maks of instances from
+ * drm_xe_query_mem_usage that this GT can indirectly access, although
+ * they live on a different GPU/Tile.
+ */
+ __u64 slow_mem_regions;
+ /**
+ * @inaccessible_mem_regions: Bit maks of instances from
+ * drm_xe_query_mem_usage that is not accessible by this GT at all.
+ */
+ __u64 inaccessible_mem_regions;
+ /** @reserved: Reserved */
+ __u64 reserved[8];
+};
+
/**
* struct drm_xe_query_gts - describe GTs
*
@@ -272,30 +313,10 @@ struct drm_xe_query_config {
struct drm_xe_query_gts {
/** @num_gt: number of GTs returned in gts */
__u32 num_gt;
-
/** @pad: MBZ */
__u32 pad;
-
- /**
- * @gts: The GTs returned for this device
- *
- * TODO: convert drm_xe_query_gt to proper kernel-doc.
- * TODO: Perhaps info about every mem region relative to this GT? e.g.
- * bandwidth between this GT and remote region?
- */
- struct drm_xe_query_gt {
-#define XE_QUERY_GT_TYPE_MAIN 0
-#define XE_QUERY_GT_TYPE_REMOTE 1
-#define XE_QUERY_GT_TYPE_MEDIA 2
- __u16 type;
- __u16 instance;
- __u32 clock_freq;
- __u64 features;
- __u64 native_mem_regions; /* bit mask of instances from drm_xe_query_mem_usage */
- __u64 slow_mem_regions; /* bit mask of instances from drm_xe_query_mem_usage */
- __u64 inaccessible_mem_regions; /* bit mask of instances from drm_xe_query_mem_usage */
- __u64 reserved[8];
- } gts[];
+ /** @gts: The GT list returned for this device */
+ struct drm_xe_query_gt gts[];
};
/**
--
2.41.0
next prev parent reply other threads:[~2023-09-08 20:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 20:32 [Intel-xe] [RFC 0/5] Some uapi alignment in response to the uapi review Rodrigo Vivi
2023-09-08 20:32 ` [Intel-xe] [RFC 1/5] drm/xe: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension Rodrigo Vivi
2023-09-13 18:42 ` Matthew Brost
2023-09-08 20:32 ` Rodrigo Vivi [this message]
2023-09-13 19:55 ` [Intel-xe] [RFC 2/5] drm/xe/uapi: Document drm_xe_query_gt Matt Roper
2023-09-13 21:12 ` Rodrigo Vivi
2023-09-13 21:46 ` Matt Roper
2023-09-13 21:55 ` Rodrigo Vivi
2023-09-14 13:57 ` Souza, Jose
2023-09-14 14:07 ` Rodrigo Vivi
2023-09-08 20:33 ` [Intel-xe] [RFC 3/5] drm/xe/uapi: Replace useless 'instance' per unique gt_id Rodrigo Vivi
2023-09-08 20:33 ` [Intel-xe] [RFC 4/5] drm/xe/uapi: Remove unused field of drm_xe_query_gt Rodrigo Vivi
2023-09-08 20:33 ` [Intel-xe] [RFC 5/5] drm/xe/uapi: Rename gts to gt_list Rodrigo Vivi
2023-09-08 20:43 ` Matt Roper
2023-09-08 20:36 ` [Intel-xe] ✓ CI.Patch_applied: success for Some uapi alignment in response to the uapi review Patchwork
2023-09-08 20:36 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-08 20:37 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-08 20:44 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-08 20:45 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-08 20:46 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-08 21:19 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230908203302.449041-3-rodrigo.vivi@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox