2 * Copyright © 2014-2018 Broadcom
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29 #if defined(__cplusplus)
33 #define DRM_V3D_SUBMIT_CL 0x00
34 #define DRM_V3D_WAIT_BO 0x01
35 #define DRM_V3D_CREATE_BO 0x02
36 #define DRM_V3D_MMAP_BO 0x03
37 #define DRM_V3D_GET_PARAM 0x04
38 #define DRM_V3D_GET_BO_OFFSET 0x05
39 #define DRM_V3D_SUBMIT_TFU 0x06
40 #define DRM_V3D_SUBMIT_CSD 0x07
41 #define DRM_V3D_PERFMON_CREATE 0x08
42 #define DRM_V3D_PERFMON_DESTROY 0x09
43 #define DRM_V3D_PERFMON_GET_VALUES 0x0a
44 #define DRM_V3D_SUBMIT_CPU 0x0b
46 #define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
47 #define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
48 #define DRM_IOCTL_V3D_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
49 #define DRM_IOCTL_V3D_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
50 #define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
51 #define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)
52 #define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu)
53 #define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd)
54 #define DRM_IOCTL_V3D_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_CREATE, \
55 struct drm_v3d_perfmon_create)
56 #define DRM_IOCTL_V3D_PERFMON_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_DESTROY, \
57 struct drm_v3d_perfmon_destroy)
58 #define DRM_IOCTL_V3D_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_PERFMON_GET_VALUES, \
59 struct drm_v3d_perfmon_get_values)
60 #define DRM_IOCTL_V3D_SUBMIT_CPU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CPU, struct drm_v3d_submit_cpu)
62 #define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01
63 #define DRM_V3D_SUBMIT_EXTENSION 0x02
65 /* struct drm_v3d_extension - ioctl extensions
67 * Linked-list of generic extensions where the id identify which struct is
68 * pointed by ext_data. Therefore, DRM_V3D_EXT_ID_* is used on id to identify
71 struct drm_v3d_extension {
74 #define DRM_V3D_EXT_ID_MULTI_SYNC 0x01
75 #define DRM_V3D_EXT_ID_CPU_INDIRECT_CSD 0x02
76 #define DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY 0x03
77 #define DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY 0x04
78 #define DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY 0x05
79 #define DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY 0x06
80 #define DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY 0x07
81 __u32 flags; /* mbz */
84 /* struct drm_v3d_sem - wait/signal semaphore
86 * If binary semaphore, it only takes syncobj handle and ignores flags and
87 * point fields. Point is defined for timeline syncobj feature.
90 __u32 handle; /* syncobj */
91 /* rsv below, for future uses */
93 __u64 point; /* for timeline sem support */
94 __u64 mbz[2]; /* must be zero, rsv */
97 /* Enum for each of the V3D queues. */
108 * struct drm_v3d_multi_sync - ioctl extension to add support multiples
109 * syncobjs for commands submission.
111 * When an extension of DRM_V3D_EXT_ID_MULTI_SYNC id is defined, it points to
112 * this extension to define wait and signal dependencies, instead of single
113 * in/out sync entries on submitting commands. The field flags is used to
114 * determine the stage to set wait dependencies.
116 struct drm_v3d_multi_sync {
117 struct drm_v3d_extension base;
118 /* Array of wait and signal semaphores */
122 /* Number of entries */
124 __u32 out_sync_count;
126 /* set the stage (v3d_queue) to sync */
133 * struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
136 * This asks the kernel to have the GPU execute an optional binner
137 * command list, and a render command list.
139 * The L1T, slice, L2C, L2T, and GCA caches will be flushed before
140 * each CL executes. The VCD cache should be flushed (if necessary)
141 * by the submitted CLs. The TLB writes are guaranteed to have been
142 * flushed by the time the render done IRQ happens, which is the
143 * trigger for out_sync. Any dirtying of cachelines by the job (only
144 * possible using TMU writes) must be flushed by the caller using the
145 * DRM_V3D_SUBMIT_CL_FLUSH_CACHE_FLAG flag.
147 struct drm_v3d_submit_cl {
148 /* Pointer to the binner command list.
150 * This is the first set of commands executed, which runs the
151 * coordinate shader to determine where primitives land on the screen,
152 * then writes out the state updates and draw calls necessary per tile
153 * to the tile allocation BO.
155 * This BCL will block on any previous BCL submitted on the
156 * same FD, but not on any RCL or BCLs submitted by other
157 * clients -- that is left up to the submitter to control
158 * using in_sync_bcl if necessary.
162 /** End address of the BCL (first byte after the BCL) */
165 /* Offset of the render command list.
167 * This is the second set of commands executed, which will either
168 * execute the tiles that have been set up by the BCL, or a fixed set
169 * of tiles (in the case of RCL-only blits).
171 * This RCL will block on this submit's BCL, and any previous
172 * RCL submitted on the same FD, but not on any RCL or BCLs
173 * submitted by other clients -- that is left up to the
174 * submitter to control using in_sync_rcl if necessary.
178 /** End address of the RCL (first byte after the RCL) */
181 /** An optional sync object to wait on before starting the BCL. */
183 /** An optional sync object to wait on before starting the RCL. */
185 /** An optional sync object to place the completion fence in. */
188 /* Offset of the tile alloc memory
190 * This is optional on V3D 3.3 (where the CL can set the value) but
191 * required on V3D 4.1.
195 /** Size of the tile alloc memory. */
198 /** Offset of the tile state data array. */
201 /* Pointer to a u32 array of the BOs that are referenced by the job.
205 /* Number of BO handles passed in (size is that times 4). */
206 __u32 bo_handle_count;
208 /* DRM_V3D_SUBMIT_* properties */
211 /* ID of the perfmon to attach to this job. 0 means no perfmon. */
216 /* Pointer to an array of ioctl extensions*/
221 * struct drm_v3d_wait_bo - ioctl argument for waiting for
222 * completion of the last DRM_V3D_SUBMIT_CL on a BO.
224 * This is useful for cases where multiple processes might be
225 * rendering to a BO and you want to wait for all rendering to be
228 struct drm_v3d_wait_bo {
235 * struct drm_v3d_create_bo - ioctl argument for creating V3D BOs.
237 * There are currently no values for the flags argument, but it may be
238 * used in a future extension.
240 struct drm_v3d_create_bo {
243 /** Returned GEM handle for the BO. */
246 * Returned offset for the BO in the V3D address space. This offset
247 * is private to the DRM fd and is valid for the lifetime of the GEM
250 * This offset value will always be nonzero, since various HW
251 * units treat 0 specially.
257 * struct drm_v3d_mmap_bo - ioctl argument for mapping V3D BOs.
259 * This doesn't actually perform an mmap. Instead, it returns the
260 * offset you need to use in an mmap on the DRM device node. This
261 * means that tools like valgrind end up knowing about the mapped
264 * There are currently no values for the flags argument, but it may be
265 * used in a future extension.
267 struct drm_v3d_mmap_bo {
268 /** Handle for the object being mapped. */
271 /** offset into the drm node to use for subsequent mmap call. */
276 DRM_V3D_PARAM_V3D_UIFCFG,
277 DRM_V3D_PARAM_V3D_HUB_IDENT1,
278 DRM_V3D_PARAM_V3D_HUB_IDENT2,
279 DRM_V3D_PARAM_V3D_HUB_IDENT3,
280 DRM_V3D_PARAM_V3D_CORE0_IDENT0,
281 DRM_V3D_PARAM_V3D_CORE0_IDENT1,
282 DRM_V3D_PARAM_V3D_CORE0_IDENT2,
283 DRM_V3D_PARAM_SUPPORTS_TFU,
284 DRM_V3D_PARAM_SUPPORTS_CSD,
285 DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH,
286 DRM_V3D_PARAM_SUPPORTS_PERFMON,
287 DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT,
288 DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
291 struct drm_v3d_get_param {
298 * Returns the offset for the BO in the V3D address space for this DRM fd.
299 * This is the same value returned by drm_v3d_create_bo, if that was called
302 struct drm_v3d_get_bo_offset {
307 struct drm_v3d_submit_tfu {
316 /* First handle is the output BO, following are other inputs.
320 /* sync object to block on before running the TFU job. Each TFU
321 * job will execute in the order submitted to its FD. Synchronization
322 * against rendering jobs requires using sync objects.
325 /* Sync object to signal when the TFU job is done. */
330 /* Pointer to an array of ioctl extensions*/
339 /* Submits a compute shader for dispatch. This job will block on any
340 * previous compute shaders submitted on this fd, and any other
341 * synchronization must be performed with in_sync/out_sync.
343 struct drm_v3d_submit_csd {
347 /* Pointer to a u32 array of the BOs that are referenced by the job.
351 /* Number of BO handles passed in (size is that times 4). */
352 __u32 bo_handle_count;
354 /* sync object to block on before running the CSD job. Each
355 * CSD job will execute in the order submitted to its FD.
356 * Synchronization against rendering/TFU jobs or CSD from
357 * other fds requires using sync objects.
360 /* Sync object to signal when the CSD job is done. */
363 /* ID of the perfmon to attach to this job. 0 means no perfmon. */
366 /* Pointer to an array of ioctl extensions*/
375 * struct drm_v3d_indirect_csd - ioctl extension for the CPU job to create an
378 * When an extension of DRM_V3D_EXT_ID_CPU_INDIRECT_CSD id is defined, it
379 * points to this extension to define a indirect CSD submission. It creates a
380 * CPU job linked to a CSD job. The CPU job waits for the indirect CSD
381 * dependencies and, once they are signaled, it updates the CSD job config
382 * before allowing the CSD job execution.
384 struct drm_v3d_indirect_csd {
385 struct drm_v3d_extension base;
388 struct drm_v3d_submit_csd submit;
390 /* Handle of the indirect BO, that should be also attached to the
395 /* Offset within the BO where the workgroup counts are stored */
398 /* Workgroups size */
401 /* Indices of the uniforms with the workgroup dispatch counts
402 * in the uniform stream. If the uniform rewrite is not needed,
403 * the offset must be 0xffffffff.
405 __u32 wg_uniform_offsets[3];
409 * struct drm_v3d_timestamp_query - ioctl extension for the CPU job to calculate
412 * When an extension DRM_V3D_EXT_ID_TIMESTAMP_QUERY is defined, it points to
413 * this extension to define a timestamp query submission. This CPU job will
414 * calculate the timestamp query and update the query value within the
415 * timestamp BO. Moreover, it will signal the timestamp syncobj to indicate
416 * query availability.
418 struct drm_v3d_timestamp_query {
419 struct drm_v3d_extension base;
421 /* Array of queries' offsets within the timestamp BO for their value */
424 /* Array of timestamp's syncobjs to indicate its availability */
427 /* Number of queries */
435 * struct drm_v3d_reset_timestamp_query - ioctl extension for the CPU job to
436 * reset timestamp queries
438 * When an extension DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY is defined, it
439 * points to this extension to define a reset timestamp submission. This CPU
440 * job will reset the timestamp queries based on value offset of the first
441 * query. Moreover, it will reset the timestamp syncobj to reset query
444 struct drm_v3d_reset_timestamp_query {
445 struct drm_v3d_extension base;
447 /* Array of timestamp's syncobjs to indicate its availability */
450 /* Offset of the first query within the timestamp BO for its value */
453 /* Number of queries */
458 * struct drm_v3d_copy_timestamp_query - ioctl extension for the CPU job to copy
459 * query results to a buffer
461 * When an extension DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY is defined, it
462 * points to this extension to define a copy timestamp query submission. This
463 * CPU job will copy the timestamp queries results to a BO with the offset
464 * and stride defined in the extension.
466 struct drm_v3d_copy_timestamp_query {
467 struct drm_v3d_extension base;
469 /* Define if should write to buffer using 64 or 32 bits */
472 /* Define if it can write to buffer even if the query is not available */
475 /* Define if it should write availability bit to buffer */
476 __u8 availability_bit;
481 /* Offset of the buffer in the BO */
484 /* Stride of the buffer in the BO */
487 /* Number of queries */
490 /* Array of queries' offsets within the timestamp BO for their value */
493 /* Array of timestamp's syncobjs to indicate its availability */
498 * struct drm_v3d_reset_performance_query - ioctl extension for the CPU job to
499 * reset performance queries
501 * When an extension DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY is defined, it
502 * points to this extension to define a reset performance submission. This CPU
503 * job will reset the performance queries by resetting the values of the
504 * performance monitors. Moreover, it will reset the syncobj to reset query
507 struct drm_v3d_reset_performance_query {
508 struct drm_v3d_extension base;
510 /* Array of performance queries's syncobjs to indicate its availability */
513 /* Number of queries */
516 /* Number of performance monitors */
519 /* Array of u64 user-pointers that point to an array of kperfmon_ids */
524 * struct drm_v3d_copy_performance_query - ioctl extension for the CPU job to copy
525 * performance query results to a buffer
527 * When an extension DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY is defined, it
528 * points to this extension to define a copy performance query submission. This
529 * CPU job will copy the performance queries results to a BO with the offset
530 * and stride defined in the extension.
532 struct drm_v3d_copy_performance_query {
533 struct drm_v3d_extension base;
535 /* Define if should write to buffer using 64 or 32 bits */
538 /* Define if it can write to buffer even if the query is not available */
541 /* Define if it should write availability bit to buffer */
542 __u8 availability_bit;
547 /* Offset of the buffer in the BO */
550 /* Stride of the buffer in the BO */
553 /* Number of performance monitors */
556 /* Number of performance counters related to this query pool */
559 /* Number of queries */
562 /* Array of performance queries's syncobjs to indicate its availability */
565 /* Array of u64 user-pointers that point to an array of kperfmon_ids */
569 struct drm_v3d_submit_cpu {
570 /* Pointer to a u32 array of the BOs that are referenced by the job.
572 * For DRM_V3D_EXT_ID_CPU_INDIRECT_CSD, it must contain only one BO,
573 * that contains the workgroup counts.
575 * For DRM_V3D_EXT_ID_TIMESTAMP_QUERY, it must contain only one BO,
576 * that will contain the timestamp.
578 * For DRM_V3D_EXT_ID_CPU_RESET_TIMESTAMP_QUERY, it must contain only
579 * one BO, that contains the timestamp.
581 * For DRM_V3D_EXT_ID_CPU_COPY_TIMESTAMP_QUERY, it must contain two
582 * BOs. The first is the BO where the timestamp queries will be written
583 * to. The second is the BO that contains the timestamp.
585 * For DRM_V3D_EXT_ID_CPU_RESET_PERFORMANCE_QUERY, it must contain no
588 * For DRM_V3D_EXT_ID_CPU_COPY_PERFORMANCE_QUERY, it must contain one
589 * BO, where the performance queries will be written.
593 /* Number of BO handles passed in (size is that times 4). */
594 __u32 bo_handle_count;
598 /* Pointer to an array of ioctl extensions*/
603 V3D_PERFCNT_FEP_VALID_PRIMTS_NO_PIXELS,
604 V3D_PERFCNT_FEP_VALID_PRIMS,
605 V3D_PERFCNT_FEP_EZ_NFCLIP_QUADS,
606 V3D_PERFCNT_FEP_VALID_QUADS,
607 V3D_PERFCNT_TLB_QUADS_STENCIL_FAIL,
608 V3D_PERFCNT_TLB_QUADS_STENCILZ_FAIL,
609 V3D_PERFCNT_TLB_QUADS_STENCILZ_PASS,
610 V3D_PERFCNT_TLB_QUADS_ZERO_COV,
611 V3D_PERFCNT_TLB_QUADS_NONZERO_COV,
612 V3D_PERFCNT_TLB_QUADS_WRITTEN,
613 V3D_PERFCNT_PTB_PRIM_VIEWPOINT_DISCARD,
614 V3D_PERFCNT_PTB_PRIM_CLIP,
615 V3D_PERFCNT_PTB_PRIM_REV,
616 V3D_PERFCNT_QPU_IDLE_CYCLES,
617 V3D_PERFCNT_QPU_ACTIVE_CYCLES_VERTEX_COORD_USER,
618 V3D_PERFCNT_QPU_ACTIVE_CYCLES_FRAG,
619 V3D_PERFCNT_QPU_CYCLES_VALID_INSTR,
620 V3D_PERFCNT_QPU_CYCLES_TMU_STALL,
621 V3D_PERFCNT_QPU_CYCLES_SCOREBOARD_STALL,
622 V3D_PERFCNT_QPU_CYCLES_VARYINGS_STALL,
623 V3D_PERFCNT_QPU_IC_HIT,
624 V3D_PERFCNT_QPU_IC_MISS,
625 V3D_PERFCNT_QPU_UC_HIT,
626 V3D_PERFCNT_QPU_UC_MISS,
627 V3D_PERFCNT_TMU_TCACHE_ACCESS,
628 V3D_PERFCNT_TMU_TCACHE_MISS,
629 V3D_PERFCNT_VPM_VDW_STALL,
630 V3D_PERFCNT_VPM_VCD_STALL,
631 V3D_PERFCNT_BIN_ACTIVE,
632 V3D_PERFCNT_RDR_ACTIVE,
633 V3D_PERFCNT_L2T_HITS,
634 V3D_PERFCNT_L2T_MISSES,
635 V3D_PERFCNT_CYCLE_COUNT,
636 V3D_PERFCNT_QPU_CYCLES_STALLED_VERTEX_COORD_USER,
637 V3D_PERFCNT_QPU_CYCLES_STALLED_FRAGMENT,
638 V3D_PERFCNT_PTB_PRIMS_BINNED,
639 V3D_PERFCNT_AXI_WRITES_WATCH_0,
640 V3D_PERFCNT_AXI_READS_WATCH_0,
641 V3D_PERFCNT_AXI_WRITE_STALLS_WATCH_0,
642 V3D_PERFCNT_AXI_READ_STALLS_WATCH_0,
643 V3D_PERFCNT_AXI_WRITE_BYTES_WATCH_0,
644 V3D_PERFCNT_AXI_READ_BYTES_WATCH_0,
645 V3D_PERFCNT_AXI_WRITES_WATCH_1,
646 V3D_PERFCNT_AXI_READS_WATCH_1,
647 V3D_PERFCNT_AXI_WRITE_STALLS_WATCH_1,
648 V3D_PERFCNT_AXI_READ_STALLS_WATCH_1,
649 V3D_PERFCNT_AXI_WRITE_BYTES_WATCH_1,
650 V3D_PERFCNT_AXI_READ_BYTES_WATCH_1,
651 V3D_PERFCNT_TLB_PARTIAL_QUADS,
652 V3D_PERFCNT_TMU_CONFIG_ACCESSES,
653 V3D_PERFCNT_L2T_NO_ID_STALL,
654 V3D_PERFCNT_L2T_COM_QUE_STALL,
655 V3D_PERFCNT_L2T_TMU_WRITES,
656 V3D_PERFCNT_TMU_ACTIVE_CYCLES,
657 V3D_PERFCNT_TMU_STALLED_CYCLES,
658 V3D_PERFCNT_CLE_ACTIVE,
659 V3D_PERFCNT_L2T_TMU_READS,
660 V3D_PERFCNT_L2T_CLE_READS,
661 V3D_PERFCNT_L2T_VCD_READS,
662 V3D_PERFCNT_L2T_TMUCFG_READS,
663 V3D_PERFCNT_L2T_SLC0_READS,
664 V3D_PERFCNT_L2T_SLC1_READS,
665 V3D_PERFCNT_L2T_SLC2_READS,
666 V3D_PERFCNT_L2T_TMU_W_MISSES,
667 V3D_PERFCNT_L2T_TMU_R_MISSES,
668 V3D_PERFCNT_L2T_CLE_MISSES,
669 V3D_PERFCNT_L2T_VCD_MISSES,
670 V3D_PERFCNT_L2T_TMUCFG_MISSES,
671 V3D_PERFCNT_L2T_SLC0_MISSES,
672 V3D_PERFCNT_L2T_SLC1_MISSES,
673 V3D_PERFCNT_L2T_SLC2_MISSES,
674 V3D_PERFCNT_CORE_MEM_WRITES,
675 V3D_PERFCNT_L2T_MEM_WRITES,
676 V3D_PERFCNT_PTB_MEM_WRITES,
677 V3D_PERFCNT_TLB_MEM_WRITES,
678 V3D_PERFCNT_CORE_MEM_READS,
679 V3D_PERFCNT_L2T_MEM_READS,
680 V3D_PERFCNT_PTB_MEM_READS,
681 V3D_PERFCNT_PSE_MEM_READS,
682 V3D_PERFCNT_TLB_MEM_READS,
683 V3D_PERFCNT_GMP_MEM_READS,
684 V3D_PERFCNT_PTB_W_MEM_WORDS,
685 V3D_PERFCNT_TLB_W_MEM_WORDS,
686 V3D_PERFCNT_PSE_R_MEM_WORDS,
687 V3D_PERFCNT_TLB_R_MEM_WORDS,
688 V3D_PERFCNT_TMU_MRU_HITS,
689 V3D_PERFCNT_COMPUTE_ACTIVE,
693 #define DRM_V3D_MAX_PERF_COUNTERS 32
695 struct drm_v3d_perfmon_create {
698 __u8 counters[DRM_V3D_MAX_PERF_COUNTERS];
701 struct drm_v3d_perfmon_destroy {
706 * Returns the values of the performance counters tracked by this
707 * perfmon (as an array of ncounters u64 values).
709 * No implicit synchronization is performed, so the user has to
710 * guarantee that any jobs using this perfmon have already been
711 * completed (probably by blocking on the seqno returned by the
712 * last exec that used the perfmon).
714 struct drm_v3d_perfmon_get_values {
720 #if defined(__cplusplus)
724 #endif /* _V3D_DRM_H_ */