The offsets to read the query results were off-by-one, which causes the
counters to report bogus increasing values.
Also the counter result is u32, so we need to initialize the query type
to reflect that.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
assert(flags);
if (flags == ETNA_PM_PROCESS_PRE)
- offset = 2;
+ offset = 1;
else
- offset = 3;
+ offset = 2;
struct etna_perf p = {
.flags = flags,
info->name = query_config[i].name;
info->query_type = query_config[i].type;
info->group_id = query_config[i].group_id;
+ info->type = PIPE_DRIVER_QUERY_TYPE_UINT;
+ info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE;
+ info->max_value.u32 = 0;
+ info->flags = 0;
return 1;
}