[PATCH v3 16/17] drm/v3d: Create a CPU job extension for the reset performance query job

Iago Toral itoral at igalia.com
Tue Nov 28 08:56:01 UTC 2023


El lun, 27-11-2023 a las 15:48 -0300, Maíra Canal escribió:
(...)
> diff --git a/include/uapi/drm/v3d_drm.h b/include/uapi/drm/v3d_drm.h
> index a3ae1f220291..76a02d2c01e6 100644
> --- a/include/uapi/drm/v3d_drm.h
> +++ b/include/uapi/drm/v3d_drm.h
> @@ -76,6 +76,7 @@ struct drm_v3d_extension {
>  #define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY             0x03
>  #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
>         __u32 flags; /* mbz */
>  };
>  
> @@ -492,6 +493,32 @@ struct drm_v3d_copy_timestamp_query {
>         __u64 syncs;
>  };
>  
> +/**
> + * struct drm_v3d_reset_performance_query - ioctl extension for the
> CPU job to
> + * reset performance queries
> + *
> + * When an extension DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY is
> defined, it
> + * points to this extension to define a reset performance
> submission. This CPU
> + * job will reset the performance queries by resetting the values of
> the
> + * performance monitors. Moreover, it will reset the syncobj to
> reset query
> + * availability.
> + */
> +struct drm_v3d_reset_performance_query {
> +       struct drm_v3d_extension base;
> +
> +       /* Array of performance queries's syncobjs to indicate its
> availability */
> +       __u64 syncs;
> +
> +       /* Number of queries */
> +       __u32 count;
> +
> +       /* Number of performance monitors */
> +       __u32 nperfmons;
> +
> +       /* 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.
>          *
> @@ -507,6 +534,9 @@ struct drm_v3d_submit_cpu {
>          * For DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY, it must
> contain two
>          * BOs. The first is the BO for which the timestamp queries
> results
>          * will be written to. The second is the BO that contains the
> timestamp.
> +        *
> +        * For DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY, it must
> contain no
> +        * BOs.
>          */
(...) The first is the BO where the timestamps queries will be written.
(...)

Iago

>         __u64 bo_handles;
>  



More information about the dri-devel mailing list