[igt-dev] [PATCH i-g-t v6 19/36] lib/i915/perf: fixup report validity
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Mon Oct 10 22:08:06 UTC 2022
On Mon, Oct 10, 2022 at 09:41:58PM +0000, Umesh Nerlige Ramappa wrote:
>From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
>It appears that on Gfx12+ there is no more validity bit in the
>reports.
>
>Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
>---
> lib/i915/perf_data_reader.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
>diff --git a/lib/i915/perf_data_reader.c b/lib/i915/perf_data_reader.c
>index e69189ac..857bcd3a 100644
>--- a/lib/i915/perf_data_reader.c
>+++ b/lib/i915/perf_data_reader.c
>@@ -45,13 +45,14 @@ oa_report_ctx_is_valid(const struct intel_perf_devinfo *devinfo,
> {
> const uint32_t *report = (const uint32_t *) _report;
>
>- if (devinfo->graphics_ver < 8) {
>+ if (devinfo->graphics_ver < 8)
> return false; /* TODO */
>- } else if (devinfo->graphics_ver == 8) {
>+ if (devinfo->graphics_ver >= 12)
>+ return true; /* Always valid */
>+ if (devinfo->graphics_ver == 8)
> return report[0] & (1ul << 25);
>- } else if (devinfo->graphics_ver > 8) {
>+ if (devinfo->graphics_ver > 8)
> return report[0] & (1ul << 16);
>- }
>
> return false;
> }
>--
>2.25.1
>
More information about the igt-dev
mailing list