summaryrefslogtreecommitdiff
path: root/tests/i915/perf_pmu.c
AgeCommit message (Collapse)Author
2022-05-18lib/igt_kmod: don't leak who from module unload routinesMauro Carvalho Chehab
Add code to free allocated strings at the module unload routines from igt_kmod. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-02-22test/perf_pmu: Change module unload assertionAnshuman Gupta
Update the module unload assertion values according to to returned values from igt_i915_driver_unload() and __igt_i915_driver_unload() instead of IGT process exit values. v2: - Use igt_assert_neq(__igt_i915_driver_unload(NULL), 0). [Petri] v3: - Use igt_assert(ret !=0 && !(strcmp(who, "i915"))). [Ashutosh] Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2022-02-15perf/perf_pmu: Nuke unload_i915Anshuman Gupta
Nuke unload_i915, instead use lib igt_i915_driver_unload() and __igt_i915_driver_unload(). Cc: Chris Wilson <chris.p.wilson@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2022-01-06tests/i915/perf_pmu: Fix allow hang handlingTvrtko Ursulin
Commit d7a74b959eea ("tests/i915/perf_pmu: Convert to intel_ctx_t (v3)") broke the test when it is run in its entirety. Correct context id needs to be used with igt_allow_hang to avoid context ban preventing the test to run to completion. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Fixes: d7a74b959eea ("tests/i915/perf_pmu: Convert to intel_ctx_t (v3)") Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-10-11igt: s/DRM_FORMAT_MOD_NONE/DRM_FORMAT_MOD_LINEAR/Ville Syrjälä
DRM_FORMAT_MOD_LINEAR is the more sensible name for DRM_FORMAT_MOD_NONE. Use the better name. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-10-08lib: Typechecking minmaxChris Wilson
Add typechecking to the min/max macros and make their locals truly unique-ish to reduce the risk of shadowing. v2: small bug fix, write also height coordinate on rotation test. (jheikkil) v3: Fix up a couple of other max/max_t instances (Ashutosh) Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-10-04tests/i915: use device_coherent mmapPriyanka Dandamudi
Update mmap__wc with mmap__device_coherent, as it works on discrete platforms, while still using an explicit WC mmap on integrated platforms. Below are the updated tests: gem_exec_capture gem_exec_nop perf_pmu prime_busy Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2021-08-10tests/perf_pmu: Adopt to use allocatorZbigniew Kempczyński
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@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-15Nuke local versions of DRM_FORMAT and DRM_MODELucas De Marchi
Use the definition from kernel headers. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-08tests/i915/perf_pmu: Convert to intel_ctx_t (v3)Jason Ekstrand
v2 (Ashutosh Dixit): - Pass the context to the init() tests - Iterate over render_ctx when using render_fd v3 (Jason Ekstrand): - Pass a context config to gem_submission_measure() Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-07-08lib/i915/gem_submission_measure: Take an optional intel_ctx_cfg_tJason Ekstrand
If provided, the engine (or ALL_ENGINES) is relative to the given context config. This is intended to be transitional. We'll get rid of all the __for_each_physical_engine stuff later. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-06-10lib/dummyload: Rename igt_spin_factory::ctx to ctx_idJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko
Add a wrapper for gem_create_ext ioctl (a version of gem_create that accepts extensions). In preparation for the driver change implementing it, a local definition of its id and necessary structs have been added, which are to be erased as soon as those definitions appear in the i915_drm.h file. The new ioctl wrapper is added to a separate file. For consistency the wrapper of the old ioctl, gem_create is moved from ioctl_wrappers to gem_create. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris P Wilson <chris.p.wilson@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-01-30meson: Turn on -WerrorAshutosh Dixit
We can choose which compile warnings to enable, but once they are enabled treat all warnings as error. This enforces stricter checks against compile warnings creeping in. v2: Fix redefinition warning errors from i915/gem_userptr_blits v3: Fix the even more pedantic clang compilation v4: Do not alter whitespace in lib/tests/igt_describe! Note: clang does not build assembler/ Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2021-01-01i915/perf_pmu: Pass the right fd to has_secure_batchesChris Wilson
../tests/i915/perf_pmu.c:1014:33: warning: variable 'fd' is uninitialized when used here [-Wuninitialized] igt_require(has_secure_batches(fd)); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-30i915: Drop gem_cs_prefetchChris Wilson
Covered with more accuracy with selftests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-12-17i915/perf_pmu: Exercise I915_PMU_SOFTWARE_GT_AWAKE_TIMEChris Wilson
Measure the sample gt-awake time while each engine and every engine is busy. They should all report the same duration, the elapsed runtime of the batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2020-12-17i915/perf_pmu: Replace init/read-other with a pleaChris Wilson
We cannot assume we know how many PMU there are exactly, so pick -1ULL to represent all invalid metrics. Similarly, we have to rely on explicit testing for each PMU to prove their existence and correct functioning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-12-15i915/perf_pmu: Verify RC6 measurements before/after suspendChris Wilson
RC6 should work before suspend, and continue to increment while idle after suspend. Should. v2: Include a longer sleep after suspend; it appears we are reticent to idle so soon after waking up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-10-14i915/perf_pmu: Fix perf fd leakTvrtko Ursulin
As it turns out opening the perf fd in group mode still produces separate file descriptors for all members of the group, which in turn need to be closed manually to avoid leaking them. v2: * Fix array sizing unload. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-08-21i915/perf_pmu: Emit a semaphore to measureChris Wilson
Don't assume the kernel will emit a semaphore to synchronise between two engines, and emit the semaphore ourselves for the basis of our measurements. The purpose of the test is to try and ascertain the accuracy of the two sampling methods, semaphore busyness uses register polling, whereas the engine busyness may use ktime_t of the CS events. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
2020-07-21tests/kms: Use crtc offset to read vblank event for a pipeMohammed Khajapasha
Pass crtc_offset parameter to read a vblank event for a pipe to vblank helper functions. Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-06-19tests: Move perf/perf_pmu under i915Chris Wilson
These are i915 specific tests of the perf and perf-workalike interfaces, so move them under i915/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>