[igt-dev] [PATCH i-g-t v2 14/52] tests/gem_ctx_freq: Adopt to use allocator
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Jul 26 13:45:38 UTC 2021
For newer gens we're not able to rely on relocations. Adopt to use
offsets acquired from the allocator.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
tests/i915/gem_ctx_freq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_freq.c b/tests/i915/gem_ctx_freq.c
index a34472de5..a29fe68b7 100644
--- a/tests/i915/gem_ctx_freq.c
+++ b/tests/i915/gem_ctx_freq.c
@@ -124,6 +124,7 @@ static void sysfs_range(int i915)
igt_spin_t *spin;
double measured;
int pmu;
+ uint64_t ahnd = get_reloc_ahnd(i915, 0);
/*
* The sysfs interface sets the global limits and overrides the
@@ -145,7 +146,7 @@ static void sysfs_range(int i915)
uint32_t cur, discard;
gem_quiescent_gpu(i915);
- spin = igt_spin_new(i915);
+ spin = igt_spin_new(i915, .ahnd = ahnd);
usleep(10000);
set_sysfs_freq(sys_freq, sys_freq);
@@ -164,6 +165,7 @@ static void sysfs_range(int i915)
gem_quiescent_gpu(i915);
close(pmu);
+ put_ahnd(ahnd);
#undef N_STEPS
}
--
2.26.0
More information about the igt-dev
mailing list