[igt-dev] [PATCH i-g-t] i915/gem_ctx_engine: Skip redundant clear of a fresh buffer

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 7 11:29:13 UTC 2020


No need to memset(0) the mapping of a fresh buffer, as we expect it to
be 0 already.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/gem_ctx_engines.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
index 55794a438..86c4bea5a 100644
--- a/tests/i915/gem_ctx_engines.c
+++ b/tests/i915/gem_ctx_engines.c
@@ -454,7 +454,6 @@ static void independent(int i915)
 	map = gem_mmap__cpu(i915, results.handle, 0, 4096, PROT_READ);
 	gem_set_domain(i915, results.handle,
 		       I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
-	memset(map, 0, 4096);
 
 	for (int i = 0; i < I915_EXEC_RING_MASK + 1; i++) {
 		struct drm_i915_gem_exec_object2 obj[2] = {
-- 
2.25.0.rc1



More information about the igt-dev mailing list