drm-uapi: extend interface for reset timestamp CPU job
Extend the UAPI to support the reset timestamp user extension for the CPU job. This user extension will allow the creation of a CPU job that resets a timestamp query by updating the timestamp BO and reseting the timestamp's availability syncobj. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
This commit is contained in:
@@ -74,6 +74,7 @@ struct drm_v3d_extension {
|
||||
#define DRM_V3D_EXT_ID_MULTI_SYNC 0x01
|
||||
#define DRM_V3D_EXT_ID_CPU_INDIRECT_CSD 0x02
|
||||
#define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY 0x03
|
||||
#define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY 0x04
|
||||
__u32 flags; /* mbz */
|
||||
};
|
||||
|
||||
@@ -427,6 +428,29 @@ struct drm_v3d_timestamp_query {
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_v3d_reset_timestamp_query - ioctl extension for the CPU job to
|
||||
* reset timestamp queries
|
||||
*
|
||||
* When an extension DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY is defined, it
|
||||
* points to this extension to define a reset timestamp submission. This CPU
|
||||
* job will reset the timestamp queries based on value offset of the first
|
||||
* query. Moreover, it will reset the timestamp syncobj to reset query
|
||||
* availability.
|
||||
*/
|
||||
struct drm_v3d_reset_timestamp_query {
|
||||
struct drm_v3d_extension base;
|
||||
|
||||
/* Array of timestamp's syncobjs to indicate its availability */
|
||||
__u64 syncs;
|
||||
|
||||
/* Offset of the first query within the timestamp BO for its value */
|
||||
__u32 offset;
|
||||
|
||||
/* Number of queries */
|
||||
__u32 count;
|
||||
};
|
||||
|
||||
struct drm_v3d_submit_cpu {
|
||||
/* Pointer to a u32 array of the BOs that are referenced by the job.
|
||||
*
|
||||
@@ -435,6 +459,9 @@ struct drm_v3d_submit_cpu {
|
||||
*
|
||||
* For DRM_V3D_EXT_ID_TIMESTAMP_QUERY, it must contain only one BO,
|
||||
* that will contain the timestamp.
|
||||
*
|
||||
* For DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY, it must contain only
|
||||
* one BO, that contains the timestamp.
|
||||
*/
|
||||
__u64 bo_handles;
|
||||
|
||||
|
Reference in New Issue
Block a user