diff mbox series

[3/4] drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item

Message ID 20220207192854.862959-4-jordan.l.justen@intel.com (mailing list archive)
State New, archived
Headers show
Series GuC HWCONFIG with documentation | expand

Commit Message

Jordan Justen Feb. 7, 2022, 7:28 p.m. UTC
Also, document DRM_I915_QUERY_HWCONFIG_BLOB with this struct.

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

Comments

kernel test robot Feb. 8, 2022, 12:07 a.m. UTC | #1
Hi Jordan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next drm/drm-next tegra-drm/drm/tegra/for-next v5.17-rc3 next-20220207]
[cannot apply to airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jordan-Justen/GuC-HWCONFIG-with-documentation/20220208-032950
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a013-20220207 (https://download.01.org/0day-ci/archive/20220208/202202080828.bS4NTyCU-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/7e0cfba7f05cefa8d48ec73782b66b4255a6b4ff
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jordan-Justen/GuC-HWCONFIG-with-documentation/20220208-032950
        git checkout 7e0cfba7f05cefa8d48ec73782b66b4255a6b4ff
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from <command-line>:32:
>> ./usr/include/drm/i915_drm.h:3298:2: error: unknown type name 'u32'
    3298 |  u32 key;
         |  ^~~
   ./usr/include/drm/i915_drm.h:3299:2: error: unknown type name 'u32'
    3299 |  u32 length;
         |  ^~~
   ./usr/include/drm/i915_drm.h:3300:2: error: unknown type name 'u32'
    3300 |  u32 data[];
         |  ^~~

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Tvrtko Ursulin Feb. 8, 2022, 9:19 a.m. UTC | #2
On 07/02/2022 19:28, Jordan Justen wrote:
> Also, document DRM_I915_QUERY_HWCONFIG_BLOB with this struct.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> ---
>   include/uapi/drm/i915_drm.h | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 069d2fadfbd9..38b8c11e91f0 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -3276,6 +3276,30 @@ 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 an array of items 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 for the item.
> + *
> + * The length of the query data returned by
> + * DRM_I915_QUERY_HWCONFIG_BLOB will align with the end at the final
> + * drm_i915_query_hwconfig_blob_item entry.

Align _with_ the end maybe? Or "be equal to the size of all items added 
together"?

> + *
> + * 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 {
> +	u32 key;
> +	u32 length;
> +	u32 data[];

__u32 for uapi headers, just in case you haven't figured out what kernel 
test robot meant.

Regards,

Tvrtko

> +};
> +
>   /* ID of the protected content session managed by i915 when PXP is active */
>   #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf
>
diff mbox series

Patch

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 069d2fadfbd9..38b8c11e91f0 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -3276,6 +3276,30 @@  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 an array of items 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 for the item.
+ *
+ * The length of the query data returned by
+ * DRM_I915_QUERY_HWCONFIG_BLOB will align with the end at the final
+ * drm_i915_query_hwconfig_blob_item entry.
+ *
+ * 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 {
+	u32 key;
+	u32 length;
+	u32 data[];
+};
+
 /* ID of the protected content session managed by i915 when PXP is active */
 #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf