summaryrefslogtreecommitdiff
path: root/tests/i915/sysfs_clients.c
AgeCommit message (Collapse)Author
2021-07-08tests/i915/sysfs_clients: Convert to intel_ctx_tJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew KempczyƄski <zbigniew.kempczynski@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.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-02-01i915/sysfs_clients: Restrict recycling to one clientChris Wilson
Let's see if the directory is stable when just one client is looking. Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2021-02-01i915/sysfs_clients: Bump the number of recycle search retriesChris Wilson
A small bump to try again in the face of delayed appearance of directory entries. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2021-01-29i915/sysfs_clients: Check that client ids are cyclicChris Wilson
The client id used is a cyclic allocator as that reduces the likelihood of userspace seeing the same id used again (and so confusing the new client as the old). Verify that each new client has an id greater than the last. v2: Use (int)(b - a) > 0 to handle wraparound 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>
2021-01-27i915/sysfs_client: Ignore clients being closed as we read their sysfsChris Wilson
An earlier client from an old test may still be lingering and disappear as we scan the sysfs. Be graceful and let it go without tripping over it. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3008 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2021-01-25i915/sysfs_clients: Replace usleep(0) with sched_yield()Chris Wilson
To kick RCU, we go to sleep and hope the system finishes a RCU grace period before returning. Use sched_yield() in place of usleep(0) to encourage a pass through schedule(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Use the centre-point of read_runtime()Chris Wilson
Compare the runtime against the centre of the read_runtime, to try and compensate for scheduling delays. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_client: Reject split clients if CPU side too slowChris Wilson
If even the CPU is too slow to submit at the require rate to generate the workload, skip the test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Avoid skips inside forksChris Wilson
Handle the unusable engines on Sandybridge by avoiding the dynamic engine subtests that require them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Repeat checks on idling monotocityChris Wilson
Do a few more executions to make sure idle <-> transitions are monotonic. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Tare the execution overheadChris Wilson
CI is not nearly as instantaneous as we would ideally like, and so we need to compensate for the delays in execution. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Only compare relative runtimesChris Wilson
In the split clients, focus on comparing the relative runtimes of the two clients match our expectations. Under CI debug conditions the overhead of each switch is too large to make accurate estimates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-24i915/sysfs_clients: Correct timeslicing switchChris Wilson
We only expect to timeslice if there are more than one client available to run on a single engine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-23i915/sysfs_clients: Restore initialisation of 'old' in busy_oneChris Wilson
Set old to 0 before using it for the first time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-23i915/sysfs_client: Increase leniency at smaller splitsChris Wilson
For the smaller splits, an absolute error is a much greater relative error so increase the relative tolerance. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2021-01-23i915: Exercise sysfs client propertiesChris Wilson
We store every client name, pid and runtime under sysfs. Better check that matches with the actual client. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>