mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL
Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. This feature is needed to implement a Perfetto datasources in user-space. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202140615.74802-1-christian.gmeiner@gmail.com
This commit is contained in:
committed by
Maíra Canal
parent
f3c03be182
commit
c6eabbab35
@@ -43,6 +43,7 @@ extern "C" {
|
||||
#define DRM_V3D_PERFMON_GET_VALUES 0x0a
|
||||
#define DRM_V3D_SUBMIT_CPU 0x0b
|
||||
#define DRM_V3D_PERFMON_GET_COUNTER 0x0c
|
||||
#define DRM_V3D_PERFMON_SET_GLOBAL 0x0d
|
||||
|
||||
#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
|
||||
#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
|
||||
@@ -61,6 +62,8 @@ extern "C" {
|
||||
#define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu)
|
||||
#define DRM_IOCTL_V3D_PERFMON_GET_COUNTER DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, \
|
||||
struct drm_v3d_perfmon_get_counter)
|
||||
#define DRM_IOCTL_V3D_PERFMON_SET_GLOBAL DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_PERFMON_SET_GLOBAL, \
|
||||
struct drm_v3d_perfmon_set_global)
|
||||
|
||||
#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01
|
||||
#define DRM_V3D_SUBMIT_EXTENSION 0x02
|
||||
@@ -766,6 +769,21 @@ struct drm_v3d_perfmon_get_counter {
|
||||
__u8 reserved[7];
|
||||
};
|
||||
|
||||
#define DRM_V3D_PERFMON_CLEAR_GLOBAL 0x0001
|
||||
|
||||
/**
|
||||
* struct drm_v3d_perfmon_set_global - ioctl to define a global performance
|
||||
* monitor
|
||||
*
|
||||
* The global performance monitor will be used for all jobs. If a global
|
||||
* performance monitor is defined, jobs with a self-defined performance
|
||||
* monitor won't be allowed.
|
||||
*/
|
||||
struct drm_v3d_perfmon_set_global {
|
||||
__u32 flags;
|
||||
__u32 id;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user