From de30740dccd882b8177f260e7d8e26ad60f7c677 Mon Sep 17 00:00:00 2001 From: Brajesh Gupta Date: Fri, 6 Nov 2026 20:12:23 +0530 Subject: drm/imagination: Support for querying Firmware information Add a new subtype DRM_PVR_DEV_QUERY_FW_INFO_GET under DRM_IOCTL_PVR_DEV_QUERY to query Firmware information. This allows the userspace to detect any bug fixes and features present in the Firmware and take appropriate action. Currently it supports querying major and minor version of the Firmware. Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40973 Signed-off-by: Brajesh Gupta Reviewed-by: Alessio Belle Acked-by: Luigi Santivetti Link: https://patch.msgid.link/20261106-fwversion-v5-1-d0074f992e75@imgtec.com Signed-off-by: Alessio Belle --- include/uapi/drm/pvr_drm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/uapi') diff --git a/include/uapi/drm/pvr_drm.h b/include/uapi/drm/pvr_drm.h index ccf6c2112468..1179c1e7d92d 100644 --- a/include/uapi/drm/pvr_drm.h +++ b/include/uapi/drm/pvr_drm.h @@ -434,6 +434,21 @@ struct drm_pvr_dev_query_static_data_areas { struct drm_pvr_obj_array static_data_areas; }; +/** + * struct drm_pvr_dev_query_fw_info - Container used to fetch information + * about the GPU Firmware like its version. + */ +struct drm_pvr_dev_query_fw_info { + /** @major_version: Major version of the Firmware. */ + __u16 major_version; + + /** @minor_version: Minor version of the Firmware. */ + __u16 minor_version; + + /** @_padding_4: Reserved. This field must be zeroed. */ + __u32 _padding_4; +}; + /** * enum drm_pvr_dev_query - For use with &drm_pvr_ioctl_dev_query_args.type to * indicate the type of the receiving container. @@ -476,6 +491,12 @@ enum drm_pvr_dev_query { * a pointer to &struct drm_pvr_dev_query_static_data_areas. */ DRM_PVR_DEV_QUERY_STATIC_DATA_AREAS_GET, + + /** + * @DRM_PVR_DEV_QUERY_FW_INFO_GET: The dev query args contain + * a pointer to &struct drm_pvr_dev_query_fw_info. + */ + DRM_PVR_DEV_QUERY_FW_INFO_GET, }; /** -- cgit v1.2.3