A CPU job is a type of job that performs operations that requires CPU intervention. A reset performance query job is a job that resets the performance queries by resetting the values of the perfmons. Moreover, we also reset the syncobjs related to the availability of the query. So, create a user extension for the CPU job that enables the creation of a reset performance job. This user extension will allow the creation of a CPU job that resets the perfmons values and resets the availability syncobj.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -76,6 +76,7 @@ struct drm_v3d_extension { · 75 unmodified lines | |||
| 76 | #define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY 0x03 | 76 | #define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY 0x03 |
| 77 | #define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY 0x04 | 77 | #define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY 0x04 |
| 78 | #define DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY 0x05 | 78 | #define DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY 0x05 |
| 79 | #define DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY 0x06 | ||
| 79 | __u32 flags; /* mbz */ | 80 | __u32 flags; /* mbz */ |
| 80 | }; | 81 | }; |
| 81 | 82 | ||
| @@ -492,6 +493,32 @@ struct drm_v3d_copy_timestamp_query { · 410 unmodified lines | |||
| 492 | __u64 syncs; | 493 | __u64 syncs; |
| 493 | }; | 494 | }; |
| 494 | 495 | ||
| 496 | /** | ||
| 497 | * struct drm_v3d_reset_performance_query - ioctl extension for the CPU job to | ||
| 498 | * reset performance queries | ||
| 499 | * | ||
| 500 | * When an extension DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY is defined, it | ||
| 501 | * points to this extension to define a reset performance submission. This CPU | ||
| 502 | * job will reset the performance queries by resetting the values of the | ||
| 503 | * performance monitors. Moreover, it will reset the syncobj to reset query | ||
| 504 | * availability. | ||
| 505 | */ | ||
| 506 | struct drm_v3d_reset_performance_query { | ||
| 507 | struct drm_v3d_extension base; | ||
| 508 | |||
| 509 | /* Array of performance queries's syncobjs to indicate its availability */ | ||
| 510 | __u64 syncs; | ||
| 511 | |||
| 512 | /* Number of queries */ | ||
| 513 | __u32 count; | ||
| 514 | |||
| 515 | /* Number of performance monitors */ | ||
| 516 | __u32 nperfmons; | ||
| 517 | |||
| 518 | /* Array of u64 user-pointers that point to an array of kperfmon_ids */ | ||
| 519 | __u64 kperfmon_ids; | ||
| 520 | }; | ||
| 521 | |||
| 495 | struct drm_v3d_submit_cpu { | 522 | struct drm_v3d_submit_cpu { |
| 496 | /* Pointer to a u32 array of the BOs that are referenced by the job. | 523 | /* Pointer to a u32 array of the BOs that are referenced by the job. |
| 497 | * | 524 | * |
| @@ -507,6 +534,9 @@ struct drm_v3d_submit_cpu { · 9 unmodified lines | |||
| 507 | * For DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY, it must contain two | 534 | * For DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY, it must contain two |
| 508 | * BOs. The first is the BO where the timestamp queries will be written | 535 | * BOs. The first is the BO where the timestamp queries will be written |
| 509 | * to. The second is the BO that contains the timestamp. | 536 | * to. The second is the BO that contains the timestamp. |
| 537 | * | ||
| 538 | * For DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY, it must contain no | ||
| 539 | * BOs. | ||
| 510 | */ | 540 | */ |
| 511 | __u64 bo_handles; | 541 | __u64 bo_handles; |
| 512 | 542 | ||