[Intel-gfx] [PATCH i-g-t 20/29] igt/perf: add utility function for checking periodic reports

Matthew Auld matthew.william.auld at gmail.com
Fri Jun 16 14:41:27 UTC 2017


On 25 April 2017 at 23:32, Lionel Landwerlin
<lionel.g.landwerlin at intel.com> wrote:
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  tests/perf.c | 55 +++++++++++++++++++++++++++++--------------------------
>  1 file changed, 29 insertions(+), 26 deletions(-)
>
> diff --git a/tests/perf.c b/tests/perf.c
> index d057d943..f8ac06c3 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -450,6 +450,29 @@ gen8_read_report_reason(const uint32_t *report)
>                 return "unknown";
>  }
>
> +static bool
> +oa_report_is_periodic(uint32_t oa_exponent, const uint32_t *report)
> +{
> +
spurious newline.

> +       if (IS_HASWELL(devid)) {
> +               /* For Haswell we don't have a documented report reason field
> +                * (though empirically report[0] bit 10 does seem to correlate
> +                * with a timer trigger reason) so we instead infer which
> +                * reports are timer triggered by checking if the least
> +                * significant bits are zero and the exponent bit is set.
> +                */
> +               uint32_t oa_exponent_mask = (1 << (oa_exponent + 1)) - 1;
newline.

Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list