i965: perf: ensure isolated timer reports while idle don't confuse filtering
authorRobert Bragg <robert@sixbynine.org>
Thu, 13 Apr 2017 18:50:37 +0000 (19:50 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 27 Jun 2017 11:10:29 +0000 (14:10 +0300)
commite277ff41c0aafa6bd213da058b0256ddccbde6ae
tree4c4f939f0cb27ef0ac8df436e3a26bfa8f68e3a9
parent31b11f69f75ff92cb42a13bb2f6740c183f761df
i965: perf: ensure isolated timer reports while idle don't confuse filtering

From experimentation in IGT, we found that the OA unit might label
some report as "idle" (using an invalid context ID), right after a
report for a given context. Deltas generated by those reports actually
belong to the previous context, even though they're not labelled as
such.

This change makes ensure that while reading OA reports, we only
consider the GPU actually idle after 2 reports with an invalid context
ID.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_performance_query.c