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.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -43,6 +43,7 @@ extern "C" { · 42 unmodified lines | ||
| 43 | 43 | #define DRM_V3D_PERFMON_GET_VALUES 0x0a |
| 44 | 44 | #define DRM_V3D_SUBMIT_CPU 0x0b |
| 45 | 45 | #define DRM_V3D_PERFMON_GET_COUNTER 0x0c |
| 46 | +#define DRM_V3D_PERFMON_SET_GLOBAL 0x0d | |
| 46 | 47 | |
| 47 | 48 | #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) |
| 48 | 49 | #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" { · 12 unmodified lines | ||
| 61 | 62 | #define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu) |
| 62 | 63 | #define DRM_IOCTL_V3D_PERFMON_GET_COUNTER DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_COUNTER, \ |
| 63 | 64 | struct drm_v3d_perfmon_get_counter) |
| 65 | +#define DRM_IOCTL_V3D_PERFMON_SET_GLOBAL DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_PERFMON_SET_GLOBAL, \ | |
| 66 | + struct drm_v3d_perfmon_set_global) | |
| 64 | 67 | |
| 65 | 68 | #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 |
| 66 | 69 | #define DRM_V3D_SUBMIT_EXTENSION 0x02 |
| @@ -766,6 +769,21 @@ struct drm_v3d_perfmon_get_counter { · 699 unmodified lines | ||
| 766 | 769 | __u8 reserved[7]; |
| 767 | 770 | }; |
| 768 | 771 | |
| 772 | +#define DRM_V3D_PERFMON_CLEAR_GLOBAL 0x0001 | |
| 773 | + | |
| 774 | +/** | |
| 775 | + * struct drm_v3d_perfmon_set_global - ioctl to define a global performance | |
| 776 | + * monitor | |
| 777 | + * | |
| 778 | + * The global performance monitor will be used for all jobs. If a global | |
| 779 | + * performance monitor is defined, jobs with a self-defined performance | |
| 780 | + * monitor won't be allowed. | |
| 781 | + */ | |
| 782 | +struct drm_v3d_perfmon_set_global { | |
| 783 | + __u32 flags; | |
| 784 | + __u32 id; | |
| 785 | +}; | |
| 786 | + | |
| 769 | 787 | #if defined(__cplusplus) |
| 770 | 788 | } |
| 771 | 789 | #endif |