drm-uapi: extend interface for copy performance query CPU job
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:
@@ -77,6 +77,7 @@ struct drm_v3d_extension {
|
||||
#define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY 0x04
|
||||
#define DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY 0x05
|
||||
#define DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY 0x06
|
||||
#define DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY 0x07
|
||||
__u32 flags; /* mbz */
|
||||
};
|
||||
|
||||
@@ -519,6 +520,52 @@ struct drm_v3d_reset_performance_query {
|
||||
__u64 kperfmon_ids;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_v3d_copy_performance_query - ioctl extension for the CPU job to copy
|
||||
* performance query results to a buffer
|
||||
*
|
||||
* When an extension DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY is defined, it
|
||||
* points to this extension to define a copy performance query submission. This
|
||||
* CPU job will copy the performance queries results to a BO with the offset
|
||||
* and stride defined in the extension.
|
||||
*/
|
||||
struct drm_v3d_copy_performance_query {
|
||||
struct drm_v3d_extension base;
|
||||
|
||||
/* Define if should write to buffer using 64 or 32 bits */
|
||||
__u8 do_64bit;
|
||||
|
||||
/* Define if it can write to buffer even if the query is not available */
|
||||
__u8 do_partial;
|
||||
|
||||
/* Define if it should write availability bit to buffer */
|
||||
__u8 availability_bit;
|
||||
|
||||
/* mbz */
|
||||
__u8 pad;
|
||||
|
||||
/* Offset of the buffer in the BO */
|
||||
__u32 offset;
|
||||
|
||||
/* Stride of the buffer in the BO */
|
||||
__u32 stride;
|
||||
|
||||
/* Number of performance monitors */
|
||||
__u32 nperfmons;
|
||||
|
||||
/* Number of performance counters related to this query pool */
|
||||
__u32 ncounters;
|
||||
|
||||
/* Number of queries */
|
||||
__u32 count;
|
||||
|
||||
/* Array of performance queries's syncobjs to indicate its availability */
|
||||
__u64 syncs;
|
||||
|
||||
/* Array of u64 user-pointers that point to an array of kperfmon_ids */
|
||||
__u64 kperfmon_ids;
|
||||
};
|
||||
|
||||
struct drm_v3d_submit_cpu {
|
||||
/* Pointer to a u32 array of the BOs that are referenced by the job.
|
||||
*
|
||||
@@ -537,6 +584,9 @@ struct drm_v3d_submit_cpu {
|
||||
*
|
||||
* For DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY, it must contain no
|
||||
* BOs.
|
||||
*
|
||||
* For DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY, it must contain one
|
||||
* BO, where the performance queries will be written.
|
||||
*/
|
||||
__u64 bo_handles;
|
||||
|
||||
|
Reference in New Issue
Block a user