public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_exec_flush: Require mapapble aperture when needed
Date: Wed, 29 Jan 2020 11:29:14 -0800	[thread overview]
Message-ID: <20200129192914.26341-2-antonio.argenziano@intel.com> (raw)
In-Reply-To: <20200129192914.26341-1-antonio.argenziano@intel.com>

The test goes through multiple mapping so require mappable aperture when
going through GTT. Also use any coherent mapping not just GTT.

Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 tests/i915/gem_exec_flush.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_exec_flush.c b/tests/i915/gem_exec_flush.c
index 28708460..778bc18c 100644
--- a/tests/i915/gem_exec_flush.c
+++ b/tests/i915/gem_exec_flush.c
@@ -152,9 +152,10 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
 			       I915_GEM_DOMAIN_WC,
 			       I915_GEM_DOMAIN_WC);
 
-		/* Prepara a mappable binding to prevent pread mighrating */
+		/* Prepare a mappable binding to prevent pread migrating */
 		if (!snoop) {
-			ptr = gem_mmap__gtt(fd, obj[0].handle, 4096, PROT_READ);
+			ptr = gem_mmap__device_coherent(fd, obj[0].handle, 0,
+							4096, PROT_READ);
 			igt_assert_eq_u32(ptr[0], 0xabcdabcd);
 			munmap(ptr, 4096);
 		}
@@ -357,6 +358,9 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
 {
 	const int gen = intel_gen(intel_get_drm_devid(fd));
 
+	if (mode == BATCH_GTT)
+		gem_require_mappable_ggtt(fd);
+
 	if (flags & CMDPARSER) {
 		int cmdparser = -1;
                 drm_i915_getparam_t gp;
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-01-29 19:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 19:29 [igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_exec_reloc: Require mappable gtt when necessary Antonio Argenziano
2020-01-29 19:29 ` Antonio Argenziano [this message]
2020-01-29 21:13   ` [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_exec_flush: Require mapapble aperture when needed Chris Wilson
2020-01-29 20:39 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/i915/gem_exec_reloc: Require mappable gtt when necessary Patchwork
2020-02-01  3:27 ` [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=20200129192914.26341-2-antonio.argenziano@intel.com \
    --to=antonio.argenziano@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