From: Lionel Landwerlin Date: Thu, 16 Apr 2020 10:03:47 +0000 (+0300) Subject: intel/perf: Enable MDAPI queries for Gen12 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=086ea1ac7ee41fbb6bd031bfdf281a7e276cfe7a;p=mesa.git intel/perf: Enable MDAPI queries for Gen12 We're missing the cases for gen12 leading to those metrics going missing. Signed-off-by: Lionel Landwerlin Fixes: 15b7b56eb2fb41 ("intel/perf: add TGL support") Reviewed-by: Kenneth Graunke Part-of: --- diff --git a/src/intel/perf/gen_perf_mdapi.c b/src/intel/perf/gen_perf_mdapi.c index 33d05f07443..ade50678e12 100644 --- a/src/intel/perf/gen_perf_mdapi.c +++ b/src/intel/perf/gen_perf_mdapi.c @@ -93,7 +93,8 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size, } case 9: case 10: - case 11: { + case 11: + case 12:{ struct gen9_mdapi_metrics *mdapi_data = (struct gen9_mdapi_metrics *) data; if (data_size < sizeof(*mdapi_data)) @@ -131,7 +132,7 @@ void gen_perf_register_mdapi_statistic_query(struct gen_perf_config *perf_cfg, const struct gen_device_info *devinfo) { - if (!(devinfo->gen >= 7 && devinfo->gen <= 11)) + if (!(devinfo->gen >= 7 && devinfo->gen <= 12)) return; struct gen_perf_query_info *query = @@ -226,9 +227,9 @@ gen_perf_register_mdapi_oa_query(struct gen_perf_config *perf, struct gen_perf_query_info *query = NULL; /* MDAPI requires different structures for pretty much every generation - * (right now we have definitions for gen 7 to 11). + * (right now we have definitions for gen 7 to 12). */ - if (!(devinfo->gen >= 7 && devinfo->gen <= 11)) + if (!(devinfo->gen >= 7 && devinfo->gen <= 12)) return; switch (devinfo->gen) { @@ -294,7 +295,8 @@ gen_perf_register_mdapi_oa_query(struct gen_perf_config *perf, } case 9: case 10: - case 11: { + case 11: + case 12: { query = gen_perf_append_query_info(perf, 2 + 36 + 16 + 16 + 16 + 2); query->oa_format = I915_OA_FORMAT_A32u40_A4u32_B8_C8; diff --git a/src/intel/perf/gen_perf_query.c b/src/intel/perf/gen_perf_query.c index 1d6743d4153..3ad511b0e00 100644 --- a/src/intel/perf/gen_perf_query.c +++ b/src/intel/perf/gen_perf_query.c @@ -1413,6 +1413,7 @@ read_gt_frequency(struct gen_perf_context *perf_ctx, case 9: case 10: case 11: + case 12: obj->oa.gt_frequency[0] = GET_FIELD(start, GEN9_RPSTAT0_CURR_GT_FREQ) * 50ULL / 3ULL; obj->oa.gt_frequency[1] = GET_FIELD(end, GEN9_RPSTAT0_CURR_GT_FREQ) * 50ULL / 3ULL; break;