[PATCH i-g-t 12/13] NORELOC - gem_exec_gttfill - FIX 3

Andrzej Turko andrzej.turko at linux.intel.com
Fri Apr 30 11:07:05 UTC 2021


From: Andrzej Turko <andrzej.turko at intel.com>

---
 tests/i915/gem_exec_gttfill.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index a82678856..b20cfaddd 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -116,23 +116,14 @@ static void submit(int fd, int gen,
 			}
 
 			reloc[0].presumed_offset = obj.offset;
-			reloc[1].presumed_offset = obj.offset;
 			address = obj.offset + reloc[0].delta;
-			value = obj.offset + reloc[1].delta;
+			batch[1] = address;
+			batch[2] = address >> 32;
 
-			if (gen >= 8) {
-				batch[1] = address;
-				batch[2] = address >> 32;
-
-				batch[3] = value;
-				batch[4] = value >> 32;
-			} else if (gen >=4) {
-				batch[2] = address;
-				batch[3] = value;
-			} else {
-				batch[1] = address;
-				batch[3] = value;
-			}
+			reloc[1].presumed_offset = obj.offset;
+			value = obj.offset + reloc[1].delta;
+			batch[3] = value;
+			batch[4] = value >> 32;
 		}
 
 		memcpy(batches[i].ptr + eb->batch_start_offset,
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list