On Wed, Feb 9, 2022 at 11:45 PM Jordan Justen <jordan.l.justen@xxxxxxxxx> wrote: > > Also, document DRM_I915_QUERY_HWCONFIG_BLOB with this struct. > > v3: > * Add various changes suggested by Tvrtko > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> > Signed-off-by: Jordan Justen <jordan.l.justen@xxxxxxxxx> > Acked-by: Jon Bloomfield <jon.bloomfield@xxxxxxxxx> Please check with make htmldocs that the output works&looks good (you mix up DOC: and struct sections, so that part wont work for sure). With that addressed: Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > --- > include/uapi/drm/i915_drm.h | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h > index 069d2fadfbd9..8279515ae2ce 100644 > --- a/include/uapi/drm/i915_drm.h > +++ b/include/uapi/drm/i915_drm.h > @@ -3276,6 +3276,41 @@ 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 > + * drm_i915_query_hwconfig_blob_item length field gives the length of > + * the drm_i915_query_hwconfig_blob_item 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 overall blob returned by DRM_I915_QUERY_HWCONFIG_BLOB will end > + * at the same location as the end of the final > + * 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. > + * > + * 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; > + /** @key: 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 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch