Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jordan Justen <jordan.l.justen@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [Intel-gfx] [PATCH v5 3/4] drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item
Date: Tue, 22 Feb 2022 02:36:39 -0800	[thread overview]
Message-ID: <20220222103640.1006006-4-jordan.l.justen@intel.com> (raw)
In-Reply-To: <20220222103640.1006006-1-jordan.l.justen@intel.com>

Also, document DRM_I915_QUERY_HWCONFIG_BLOB with this struct.

v3:
 * Add various changes suggested by Tvrtko

v5:
 * Fix documenation formatting and verified with `make htmldocs` as
   suggested by Daniel

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Jon Bloomfield <jon.bloomfield@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 include/uapi/drm/i915_drm.h | 43 +++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 069d2fadfbd9..e44902ce8e64 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -3276,6 +3276,49 @@ struct drm_i915_gem_create_ext_protected_content {
 	__u32 flags;
 };
 
+/**
+ * DOC: GuC HWCONFIG blob uAPI
+ *
+ * The GuC produces a blob with information about the current device.
+ * i915 reads this blob from GuC and makes it available via this uAPI.
+ *
+ * The returned blob is a sequence of items of variable length
+ * described by struct drm_i915_query_hwconfig_blob_item.
+ *
+ * The overall blob returned by DRM_I915_QUERY_HWCONFIG_BLOB will end
+ * at the same location as the end of the final struct
+ * drm_i915_query_hwconfig_blob_item. In other words, walking through
+ * the individual items is guaranteed to eventually arrive at the
+ * exact end of the entire blob.
+ */
+
+/**
+ * struct drm_i915_query_hwconfig_blob_item - A single hwconfig item
+ * within the sequence of hwconfig items returned by
+ * DRM_I915_QUERY_HWCONFIG_BLOB.
+ *
+ * The length field gives the length of the data[] array. The length
+ * is the number of u32 items in the data[] array, and *not* the
+ * number of bytes.
+ *
+ * The key and length fields are required, so the minimum item size is
+ * 2 x u32, or 8 bytes, when the length field is 0. If the length
+ * field is 1, then the item's size is 12 bytes.
+ *
+ * The meaning of the key field and the data values are documented in
+ * the Programmer's Reference Manual.
+ */
+struct drm_i915_query_hwconfig_blob_item {
+	/** @key: Enum which defines how to interpret @data values. */
+	__u32 key;
+
+	/** @length: The number of u32 values in the @data array. */
+	__u32 length;
+
+	/** @data: Array of values with meaning defined by @key. */
+	__u32 data[];
+};
+
 /* ID of the protected content session managed by i915 when PXP is active */
 #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
 
-- 
2.34.1


  parent reply	other threads:[~2022-02-22 10:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 10:36 [Intel-gfx] [PATCH v5 0/4] GuC HWCONFIG with documentation Jordan Justen
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 1/4] drm/i915/guc: Add fetch of hwconfig table Jordan Justen
2022-02-24 13:58   ` Michal Wajdeczko
2022-02-25  2:17   ` John Harrison
2022-02-25  2:24     ` [Intel-gfx] [PATCH] " John.C.Harrison
2022-02-25  5:03     ` [Intel-gfx] [PATCH v5 1/4] " Jordan Justen
2022-02-25  9:44       ` Michal Wajdeczko
2022-02-25 13:26         ` Tvrtko Ursulin
2022-02-25 16:46           ` John Harrison
2022-02-25 17:18             ` Tvrtko Ursulin
2022-02-25 18:05               ` Michal Wajdeczko
2022-02-25 18:35                 ` Tvrtko Ursulin
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 2/4] drm/i915/uapi: Add query for hwconfig blob Jordan Justen
2022-02-22 10:36 ` Jordan Justen [this message]
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 4/4] drm/i915/guc: Verify hwconfig blob matches supported format Jordan Justen
2022-02-22 11:24   ` Tvrtko Ursulin
2022-02-22 11:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for GuC HWCONFIG with documentation (rev5) Patchwork
2022-02-22 11:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-22 12:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-25  2:07   ` John Harrison
2022-02-22 13:30 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-02-25  7:20 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for GuC HWCONFIG with documentation (rev6) 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=20220222103640.1006006-4-jordan.l.justen@intel.com \
    --to=jordan.l.justen@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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