summaryrefslogtreecommitdiffstats
path: root/src/intel/perf/gen_perf.h
diff options
context:
space:
mode:
authorMark Janes <[email protected]>2019-06-28 18:16:07 -0700
committerMark Janes <[email protected]>2019-08-07 21:33:56 -0700
commit9f84efb452f810494e8ba78a68b56444e343e5f6 (patch)
tree4b47af7c22a763863b46cc4948e93e2d73ffba74 /src/intel/perf/gen_perf.h
parent73eccdc4a5d04196f5d437b285dabd10043b01f4 (diff)
intel/perf: move get_query_data into gen_perf
This refactor moves several helper functions for get_query_data as well: - accumulate_oa_reports - read_gt_frequency - get_pipeline_stats_data - get_oa_counter_data Functions which are no longer referenced in brw_performance_query.c have been removed. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/perf/gen_perf.h')
-rw-r--r--src/intel/perf/gen_perf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h
index 9dae8770aac..f66a088e260 100644
--- a/src/intel/perf/gen_perf.h
+++ b/src/intel/perf/gen_perf.h
@@ -39,6 +39,18 @@ struct gen_device_info;
struct gen_perf_config;
struct gen_perf_query_info;
+#define GEN7_RPSTAT1 0xA01C
+#define GEN7_RPSTAT1_CURR_GT_FREQ_SHIFT 7
+#define GEN7_RPSTAT1_CURR_GT_FREQ_MASK INTEL_MASK(13, 7)
+#define GEN7_RPSTAT1_PREV_GT_FREQ_SHIFT 0
+#define GEN7_RPSTAT1_PREV_GT_FREQ_MASK INTEL_MASK(6, 0)
+
+#define GEN9_RPSTAT0 0xA01C
+#define GEN9_RPSTAT0_CURR_GT_FREQ_SHIFT 23
+#define GEN9_RPSTAT0_CURR_GT_FREQ_MASK INTEL_MASK(31, 23)
+#define GEN9_RPSTAT0_PREV_GT_FREQ_SHIFT 0
+#define GEN9_RPSTAT0_PREV_GT_FREQ_MASK INTEL_MASK(8, 0)
+
enum gen_perf_counter_type {
GEN_PERF_COUNTER_TYPE_EVENT,
GEN_PERF_COUNTER_TYPE_DURATION_NORM,
@@ -632,5 +644,10 @@ bool gen_perf_is_query_ready(struct gen_perf_context *perf_ctx,
void *current_batch);
void gen_perf_delete_query(struct gen_perf_context *perf_ctx,
struct gen_perf_query_object *query);
+void gen_perf_get_query_data(struct gen_perf_context *perf_ctx,
+ struct gen_perf_query_object *query,
+ int data_size,
+ unsigned *data,
+ unsigned *bytes_written);
#endif /* GEN_PERF_H */