Home | History | Annotate | Download | only in nv50
      1 #ifndef __NV50_QUERY_HW_METRIC_H__
      2 #define __NV50_QUERY_HW_METRIC_H__
      3 
      4 #include "nv50_query_hw.h"
      5 
      6 struct nv50_hw_metric_query {
      7    struct nv50_hw_query base;
      8    struct nv50_hw_query *queries[4];
      9    unsigned num_queries;
     10 };
     11 
     12 static inline struct nv50_hw_metric_query *
     13 nv50_hw_metric_query(struct nv50_hw_query *hq)
     14 {
     15    return (struct nv50_hw_metric_query *)hq;
     16 }
     17 
     18 /*
     19  * Driver metrics queries:
     20  */
     21 #define NV50_HW_METRIC_QUERY(i)   (PIPE_QUERY_DRIVER_SPECIFIC + 1024 + (i))
     22 #define NV50_HW_METRIC_QUERY_LAST  NV50_HW_METRIC_QUERY(NV50_HW_METRIC_QUERY_COUNT - 1)
     23 enum nv50_hw_metric_queries
     24 {
     25     NV50_HW_METRIC_QUERY_BRANCH_EFFICIENCY = 0,
     26     NV50_HW_METRIC_QUERY_COUNT
     27 };
     28 
     29 struct nv50_hw_query *
     30 nv50_hw_metric_create_query(struct nv50_context *, unsigned);
     31 int
     32 nv50_hw_metric_get_driver_query_info(struct nv50_screen *, unsigned,
     33                                      struct pipe_driver_query_info *);
     34 #endif
     35