From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: [RFC PATCH i-g-t v3 0/4] Calculate softpin offsets from actual page size Date: Mon, 28 Oct 2019 16:53:14 +0100 [thread overview] Message-ID: <20191028155318.23416-1-janusz.krzysztofik@linux.intel.com> (raw) 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). Janusz Krzysztofik (4): lib/i915: Move redundant local helpers to lib/ lib/i915: Add GEM minimum page size helper tests/gem_exec_reloc: Calculate softpin offsets from actual page size tests/gem_ctx_shared: Calculate object attributes from actual page size lib/igt_x86.c | 13 ++++++ lib/igt_x86.h | 5 +++ lib/ioctl_wrappers.c | 82 +++++++++++++++++++++++++++++++++++++ lib/ioctl_wrappers.h | 1 + tests/i915/gem_ctx_shared.c | 6 ++- tests/i915/gem_exec_reloc.c | 26 ++++-------- tests/i915/gem_softpin.c | 13 +----- 7 files changed, 115 insertions(+), 31 deletions(-) -- 2.21.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [RFC PATCH i-g-t v3 0/4] Calculate softpin offsets from actual page size Date: Mon, 28 Oct 2019 16:53:14 +0100 [thread overview] Message-ID: <20191028155318.23416-1-janusz.krzysztofik@linux.intel.com> (raw) Message-ID: <20191028155314.u-2tOfU_MvinKeisfZ7erWwH1OhyHZV2ZeVnWHYUdJo@z> (raw) 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). Janusz Krzysztofik (4): lib/i915: Move redundant local helpers to lib/ lib/i915: Add GEM minimum page size helper tests/gem_exec_reloc: Calculate softpin offsets from actual page size tests/gem_ctx_shared: Calculate object attributes from actual page size lib/igt_x86.c | 13 ++++++ lib/igt_x86.h | 5 +++ lib/ioctl_wrappers.c | 82 +++++++++++++++++++++++++++++++++++++ lib/ioctl_wrappers.h | 1 + tests/i915/gem_ctx_shared.c | 6 ++- tests/i915/gem_exec_reloc.c | 26 ++++-------- tests/i915/gem_softpin.c | 13 +----- 7 files changed, 115 insertions(+), 31 deletions(-) -- 2.21.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2019-10-28 15:53 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-28 15:53 Janusz Krzysztofik [this message] 2019-10-28 15:53 ` [Intel-gfx] [RFC PATCH i-g-t v3 0/4] Calculate softpin offsets from actual page size Janusz Krzysztofik 2019-10-28 15:53 ` [RFC PATCH i-g-t v3 1/4] lib: Move redundant local helpers to lib/ Janusz Krzysztofik 2019-10-28 15:53 ` [Intel-gfx] " Janusz Krzysztofik 2019-10-28 15:53 ` [RFC PATCH i-g-t v3 2/4] lib: Add GEM minimum page size helper Janusz Krzysztofik 2019-10-28 15:53 ` [Intel-gfx] " Janusz Krzysztofik 2019-10-28 15:53 ` [RFC PATCH i-g-t v3 3/4] tests/gem_exec_reloc: Calculate softpin offsets from actual page size Janusz Krzysztofik 2019-10-28 15:53 ` [Intel-gfx] " Janusz Krzysztofik 2019-10-28 15:53 ` [RFC PATCH i-g-t v3 4/4] tests/gem_ctx_shared: Calculate object attributs " Janusz Krzysztofik 2019-10-28 15:53 ` [Intel-gfx] " Janusz Krzysztofik 2019-10-28 17:20 ` [igt-dev] ✗ Fi.CI.BAT: failure for Calculate softpin offsets " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191028155318.23416-1-janusz.krzysztofik@linux.intel.com \ --to=janusz.krzysztofik@linux.intel.com \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.