[Intel-gfx] [RFC PATCH i-g-t v4 0/4] Calculate softpin offsets from minimum GTT alignment
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Thu Oct 31 15:28:53 UTC 2019
Some tests assume 4kB page size while using softpin. That assumption
may be wrong on future GEM backends with possibly larger minimum page
sizes. As a result, those tests may either fail on softpin at offsets
which are incorrectly aligned, may silently skip such incorrectly
aligned addresses assuming them occupied by other users, or may always
succeed when examining invalid use patterns.
Provide a helper function that detects minimum page size and returns
the size order. Use it in test which perform softpin to calculate
offsets suitable for actually used backing store.
Changelog:
v2: Don't skip failing offsets only when on full PPGTT,
- simplify the code by reversing the size->order conversion,
- drop irrelevant modifications of requested object sizes.
v3: Drop patch 1/2 "Don't filter out addresses when on PPGTT" - I don't
know how to detect if the kernel is interfering with the user's GTT,
- introduce patch 1/4 "lib: Move redundant local helpers to lib/",
subsequent patch will use the helper,
- introduce patch 2/4 "lib: Add GEM minimum page size helper",
subsequent patches will use the new helper (inspired by Chris),
- in former patch 2/2, now 3/4, initialize page size order with an
actual minimum returned by the new helper (inspired by Chris),
- add a new fix for gem_ctx_shared test (patch 4/4).
v4: Rename the helper, use 'minimum GTT alignment' term across the
changes (Chris),
- update variable names accordingly,
- use error numbers to distinguish between invalid offsets and
addresses occupied by other users, then
- simplify the helper code (Chris),
- drop no longer required patch 1/4 "lib: Move redundant local
helpers to lib/",
- reintroduce former patch 1/2 as 1/4 "tests/gem_exec_reloc: Don't
filter out invalid addresses" with the former not on full PPGTT
requirement for skipping now replaced with error code checking.
Janusz Krzysztofik (4):
tests/gem_exec_reloc: Don't filter out invalid addresses
lib: Add minimum GTT alignment helper
tests/gem_exec_reloc: Calculate offsets from minimum GTT alignment
tests/gem_ctx_shared: Align objects using minimum GTT alignment
lib/ioctl_wrappers.c | 46 +++++++++++++++++++++++++++++++++++++
lib/ioctl_wrappers.h | 2 ++
tests/i915/gem_ctx_shared.c | 6 +++--
tests/i915/gem_exec_reloc.c | 22 ++++++++++++------
4 files changed, 67 insertions(+), 9 deletions(-)
--
2.21.0
More information about the Intel-gfx
mailing list