[PATCH i-g-t 2/4] tests/intel/xe_oa: Fix waiting for mmaped reports
Dixit, Ashutosh
ashutosh.dixit at intel.com
Sat Aug 23 18:47:35 UTC 2025
On Fri, 22 Aug 2025 17:34:04 -0700, Umesh Nerlige Ramappa wrote:
>
> When iterating over reports using a uint32_t pointer, ensure that the
> report size is expressed in 32 bits.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> ---
> tests/intel/xe_oa.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 35d25150ec7d..745f364e52e9 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -4448,6 +4448,7 @@ static void mmap_wait_for_periodic_reports(void *oa_vaddr, uint32_t n,
> struct intel_xe_perf_metric_set *test_set = metric_set(hwe);
> uint64_t fmt = test_set->perf_oa_format;
> uint32_t num_periodic_reports = 0;
> + uint32_t report_words = get_oa_format(fmt).size >> 2;
> uint32_t *reports;
>
> while (num_periodic_reports < n) {
> @@ -4455,7 +4456,7 @@ static void mmap_wait_for_periodic_reports(void *oa_vaddr, uint32_t n,
> num_periodic_reports = 0;
> for (reports = (uint32_t *)oa_vaddr;
> reports[0] && oa_timestamp(reports, fmt) && oa_report_is_periodic(reports);
> - reports += get_oa_format(fmt).size) {
> + reports += report_words) {
> num_periodic_reports++;
> }
> }
> --
> 2.43.0
>
More information about the igt-dev
mailing list