public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/i915/gem_exec_reloc: Require mappable gtt when necessary
@ 2020-01-29 19:29 Antonio Argenziano
  2020-01-29 19:29 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_exec_flush: Require mapapble aperture when needed Antonio Argenziano
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Antonio Argenziano @ 2020-01-29 19:29 UTC (permalink / raw)
  To: igt-dev

The test loops across several mappings so, when explicitly asking for a
GTT mapping it has to make sure such mapping is available.

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_reloc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index ef995a67..bc904a0a 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -110,6 +110,9 @@ static void from_mmap(int fd, uint64_t size, enum mode mode)
 	uint64_t max, i;
 	int retry = 2;
 
+	if ((mode & ~RO) == GTT)
+		gem_require_mappable_ggtt(fd);
+
 	/* Worst case is that the kernel has to copy the entire incoming
 	 * reloc[], so double the memory requirements.
 	 */
@@ -387,6 +390,9 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags)
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
 	unsigned int reloc_offset;
 
+	if ((before | after) & I915_GEM_DOMAIN_GTT)
+		gem_require_mappable_ggtt(fd);
+
 	memset(&obj, 0, sizeof(obj));
 	obj.handle = gem_create(fd, OBJSZ);
 	obj.relocs_ptr = to_user_pointer(&reloc);
-- 
2.21.0

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-01  3:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_exec_flush: Require mapapble aperture when needed Antonio Argenziano
2020-01-29 21:13   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox