From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/gem_pread/pwrite: Skip gtt test on self for missing mappable gtt
Date: Thu, 14 Nov 2019 18:08:30 +0100 [thread overview]
Message-ID: <20191114170830.9620-1-zbigniew.kempczynski@intel.com> (raw)
Some tests are designed to use GGTT API which should be skipped
when HW doesn't support mappable aperture.
Gem pread / pwrite "self" test is one of them.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/i915/gem_pread.c | 3 ++-
tests/i915/gem_pwrite.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/i915/gem_pread.c b/tests/i915/gem_pread.c
index 0d3e10b8..5b926ab0 100644
--- a/tests/i915/gem_pread.c
+++ b/tests/i915/gem_pread.c
@@ -52,13 +52,14 @@ static void *wrap_gem_mmap__gtt(int i915, uint32_t handle,
static void pread_self(int i915)
{
+ int start = gem_has_mappable_ggtt(i915) ? 0 : 1;
static const mmap_fn_t mmap_fn[] = {
wrap_gem_mmap__gtt,
gem_mmap__cpu,
gem_mmap__wc,
NULL
};
- for (const mmap_fn_t *fn = mmap_fn; *fn; fn++) {
+ for (const mmap_fn_t *fn = mmap_fn + start; *fn; fn++) {
uint32_t handle = gem_create(i915, MiB(4));
void *ptr = (*fn)(i915, handle, 0, MiB(4), PROT_WRITE);
diff --git a/tests/i915/gem_pwrite.c b/tests/i915/gem_pwrite.c
index 37e97879..69f823d5 100644
--- a/tests/i915/gem_pwrite.c
+++ b/tests/i915/gem_pwrite.c
@@ -52,13 +52,14 @@ static void *wrap_gem_mmap__gtt(int i915, uint32_t handle,
static void pwrite_self(int i915)
{
+ int start = gem_has_mappable_ggtt(i915) ? 0 : 1;
static const mmap_fn_t mmap_fn[] = {
wrap_gem_mmap__gtt,
gem_mmap__cpu,
gem_mmap__wc,
NULL
};
- for (const mmap_fn_t *fn = mmap_fn; *fn; fn++) {
+ for (const mmap_fn_t *fn = mmap_fn + start; *fn; fn++) {
uint32_t handle = gem_create(i915, MiB(4));
void *ptr = (*fn)(i915, handle, 0, MiB(4), PROT_READ);
--
2.23.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-11-14 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 17:08 Zbigniew Kempczyński [this message]
2019-11-14 17:12 ` [igt-dev] [PATCH i-g-t] i915/gem_pread/pwrite: Skip gtt test on self for missing mappable gtt Chris Wilson
2019-11-14 17:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-11-15 18:37 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20191114170830.9620-1-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox