Home | History | Annotate | Download | only in nv50
      1 #ifndef __NV50_QUERY_HW_SM_H__
      2 #define __NV50_QUERY_HW_SM_H__
      3 
      4 #include "nv50_query_hw.h"
      5 
      6 struct nv50_hw_sm_query {
      7    struct nv50_hw_query base;
      8    uint8_t ctr[4];
      9 };
     10 
     11 static inline struct nv50_hw_sm_query *
     12 nv50_hw_sm_query(struct nv50_hw_query *hq)
     13 {
     14    return (struct nv50_hw_sm_query *)hq;
     15 }
     16 
     17 /*
     18  * Performance counter queries:
     19  */
     20 #define NV50_HW_SM_QUERY(i)    (PIPE_QUERY_DRIVER_SPECIFIC + (i))
     21 #define NV50_HW_SM_QUERY_LAST   NV50_HW_SM_QUERY(NV50_HW_SM_QUERY_COUNT - 1)
     22 enum nv50_hw_sm_queries
     23 {
     24    NV50_HW_SM_QUERY_BRANCH = 0,
     25    NV50_HW_SM_QUERY_DIVERGENT_BRANCH,
     26    NV50_HW_SM_QUERY_INSTRUCTIONS,
     27    NV50_HW_SM_QUERY_PROF_TRIGGER_0,
     28    NV50_HW_SM_QUERY_PROF_TRIGGER_1,
     29    NV50_HW_SM_QUERY_PROF_TRIGGER_2,
     30    NV50_HW_SM_QUERY_PROF_TRIGGER_3,
     31    NV50_HW_SM_QUERY_PROF_TRIGGER_4,
     32    NV50_HW_SM_QUERY_PROF_TRIGGER_5,
     33    NV50_HW_SM_QUERY_PROF_TRIGGER_6,
     34    NV50_HW_SM_QUERY_PROF_TRIGGER_7,
     35    NV50_HW_SM_QUERY_SM_CTA_LAUNCHED,
     36    NV50_HW_SM_QUERY_WARP_SERIALIZE,
     37    NV50_HW_SM_QUERY_COUNT,
     38 };
     39 
     40 struct nv50_hw_query *
     41 nv50_hw_sm_create_query(struct nv50_context *, unsigned);
     42 int
     43 nv50_hw_sm_get_driver_query_info(struct nv50_screen *, unsigned,
     44                                  struct pipe_driver_query_info *);
     45 #endif
     46