Skip to contentSkip to conversation

tests/i915/gem_userptr_blits: Added XY_FAST_COPY_BLT Command for MTL

PATCH Superseded Vikas Srivastava 3 participants 3 messages Nov 21, 2022

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_userptr_blits: Added XY_FAST_COPY_BLT Command for MTL

From: Arjun Melkaveri <[email protected]>

Test case uses legacy command which is not supported on MTL. Modified test to use XY_FAST_COPY_BLT.

---
 tests/i915/gem_userptr_blits.c | 128 +++++++++++++++++++++------------
 1 file changed, 83 insertions(+), 45 deletions(-)
tests/i915/gem_userptr_blits.c +83 -45
index 698508669..22cbd5e02 100644
@@ -99,6 +99,7 @@ static int copy(int fd, uint32_t dst, uint32_t src)
 	struct drm_i915_gem_relocation_entry reloc[2];
 	struct drm_i915_gem_exec_object2 obj[3];
 	struct drm_i915_gem_execbuffer2 exec;
+	static uint32_t devid;
 	uint32_t handle;
 	int ret, i=0;
 	uint64_t dst_offset, src_offset, bb_offset;
@@ -108,29 +109,47 @@ static int copy(int fd, uint32_t dst, uint32_t src)
 	dst_offset = bb_offset + 4096;
 	src_offset = dst_offset + WIDTH * HEIGHT * sizeof(uint32_t) * (src != dst);
 
-	batch[i++] = XY_SRC_COPY_BLT_CMD |
-		  XY_SRC_COPY_BLT_WRITE_ALPHA |
-		  XY_SRC_COPY_BLT_WRITE_RGB;
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i - 1] |= 8;
-	else
-		batch[i - 1] |= 6;
-
-	batch[i++] = (3 << 24) | /* 32 bits */
-		  (0xcc << 16) | /* copy ROP */
-		  WIDTH*4;
-	batch[i++] = 0; /* dst x1,y1 */
-	batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
-	batch[i++] = dst_offset; /* dst reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = dst_offset >> 32;
-	batch[i++] = 0; /* src x1,y1 */
-	batch[i++] = WIDTH*4;
-	batch[i++] = src_offset; /* src reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = src_offset >> 32;
-	batch[i++] = MI_BATCH_BUFFER_END;
-	batch[i++] = MI_NOOP;
+	devid = intel_get_drm_devid(fd);
+
+	if (IS_PONTEVECCHIO(devid)) {
+		batch[i++] = XY_FAST_COPY_BLT;
+		batch[i++] = XY_FAST_COPY_COLOR_DEPTH_32 | WIDTH*4;
+		batch[i++] = 0;/* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH;/* dst x2,y2 */
+		batch[i++] = 0;/* dst address lower bits */
+		batch[i++] = 0;/* dst address upper bits */
+		batch[i++] = 0;/* src x1,y1 */
+		batch[i++] = WIDTH*4;/* src pitch */
+		batch[i++] = 0;// src address lower bits
+		batch[i++] = 0;// src address upper bits
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	} else {
+		batch[i++] = XY_SRC_COPY_BLT_CMD |
+			     XY_SRC_COPY_BLT_WRITE_ALPHA |
+			     XY_SRC_COPY_BLT_WRITE_RGB;
+
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i - 1] |= 8;
+		else
+			batch[i - 1] |= 6;
+
+		batch[i++] = (3 << 24) | /* 32 bits */
+			  (0xcc << 16) | /* copy ROP */
+			  WIDTH*4;
+		batch[i++] = 0; /* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
+		batch[i++] = dst_offset; /* dst reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = dst_offset >> 32;
+		batch[i++] = 0; /* src x1,y1 */
+		batch[i++] = WIDTH*4;
+		batch[i++] = src_offset; /* src reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = src_offset >> 32;
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	}
 
 	handle = gem_create(fd, 4096);
 	gem_write(fd, handle, 0, batch, sizeof(batch));
@@ -204,31 +223,50 @@ blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo)
 	struct drm_i915_gem_relocation_entry reloc[2];
 	struct drm_i915_gem_exec_object2 *obj;
 	struct drm_i915_gem_execbuffer2 exec;
+	static uint32_t devid;
+
 	uint32_t handle;
 	int n, ret, i=0;
 
-	batch[i++] = XY_SRC_COPY_BLT_CMD |
-		  XY_SRC_COPY_BLT_WRITE_ALPHA |
-		  XY_SRC_COPY_BLT_WRITE_RGB;
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i - 1] |= 8;
-	else
-		batch[i - 1] |= 6;
-	batch[i++] = (3 << 24) | /* 32 bits */
-		  (0xcc << 16) | /* copy ROP */
-		  WIDTH*4;
-	batch[i++] = 0; /* dst x1,y1 */
-	batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
-	batch[i++] = 0; /* dst reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = 0;
-	batch[i++] = 0; /* src x1,y1 */
-	batch[i++] = WIDTH*4;
-	batch[i++] = 0; /* src reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = 0;
-	batch[i++] = MI_BATCH_BUFFER_END;
-	batch[i++] = MI_NOOP;
+	devid = intel_get_drm_devid(fd);
+
+	if (IS_PONTEVECCHIO(devid)) {
+		batch[i++] = XY_FAST_COPY_BLT;
+		batch[i++] = XY_FAST_COPY_COLOR_DEPTH_32 | WIDTH*4;
+		batch[i++] = 0;/* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH;/* dst x2,y2 */
+		batch[i++] = 0;/* dst address lower bits */
+		batch[i++] = 0;/* dst address upper bits */
+		batch[i++] = 0;/* src x1,y1 */
+		batch[i++] = WIDTH*4;/* src pitch */
+		batch[i++] = 0;// src address lower bits
+		batch[i++] = 0;// src address upper bits
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	} else {
+		batch[i++] = XY_SRC_COPY_BLT_CMD |
+			     XY_SRC_COPY_BLT_WRITE_ALPHA |
+			     XY_SRC_COPY_BLT_WRITE_RGB;
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i - 1] |= 8;
+		else
+			batch[i - 1] |= 6;
+		batch[i++] = (3 << 24) | /* 32 bits */
+			     (0xcc << 16) | /* copy ROP */
+			     WIDTH*4;
+		batch[i++] = 0; /* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
+		batch[i++] = 0; /* dst reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = 0;
+		batch[i++] = 0; /* src x1,y1 */
+		batch[i++] = WIDTH*4;
+		batch[i++] = 0; /* src reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = 0;
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	}
 
 	handle = gem_create(fd, 4096);
 	gem_write(fd, handle, 0, batch, sizeof(batch));
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✗ Fi.CI.BUILD: failure for tests/i915/gem_userptr_blits: Added XY_FAST_COPY_BLT Command for MTL

== Series Details ==

== Series Details ==

Series: tests/i915/gem_userptr_blits: Added XY_FAST_COPY_BLT Command for MTL
URL : https://patchwork.freedesktop.org/series/111133/
State : failure

== Summary ==

IGT patchset build failed on latest successful build 40a2de5cc6a6b43af7da7905bfe1ede9d9a3200c tests/i915/gem_exec_fence: Replacing custom spinner with igt_spin

[194/554] Linking target tests/gem_lmem_swapping.
[195/554] Linking target tests/gem_lut_handle.
[196/554] Linking target tests/gem_madvise.
[197/554] Linking target tests/gem_media_fill.
[198/554] Linking target tests/gem_media_vme.
[199/554] Linking target tests/gem_mmap.
[200/554] Linking target tests/gem_mmap_gtt.
[201/554] Linking target tests/gem_partial_pwrite_pread.
[202/554] Linking target tests/gem_ppgtt.
[203/554] Linking target tests/gem_pread.
[204/554] Linking target tests/gem_pread_after_blit.
[205/554] Linking target tests/gem_pwrite.
[206/554] Linking target tests/gem_pwrite_snooped.
[207/554] Linking target tests/gem_pxp.
[208/554] Linking target tests/gem_read_read_speed.
[209/554] Linking target tests/gem_readwrite.
[210/554] Linking target tests/gem_reg_read.
[211/554] Linking target tests/gem_render_copy.
[212/554] Linking target tests/gem_render_copy_redux.
[213/554] Linking target tests/gem_request_retire.
[214/554] Linking target tests/gem_render_tiled_blits.
[215/554] Linking target tests/gem_render_linear_blits.
[216/554] Linking target tests/gem_ringfill.
[217/554] Linking target tests/gem_reset_stats.
[218/554] Linking target tests/gem_set_tiling_vs_blt.
[219/554] Linking target tests/gem_set_tiling_vs_gtt.
[220/554] Linking target tests/gem_set_tiling_vs_pwrite.
[221/554] Linking target tests/gem_shrink.
[222/554] Linking target tests/gem_softpin.
[223/554] Linking target tests/gem_spin_batch.
[224/554] Linking target tests/gem_streaming_writes.
[225/554] Linking target tests/gem_sync.
[226/554] Linking target tests/gem_tiled_blits.
[227/554] Linking target tests/gem_tiled_partial_pwrite_pread.
[228/554] Linking target tests/gem_tiled_fence_blits.
[229/554] Linking target tests/gem_tiled_pread_basic.
[230/554] Linking target tests/gem_tiled_pread_pwrite.
[231/554] Linking target tests/gem_tiled_swapping.
[232/554] Linking target tests/gem_tiled_wb.
[233/554] Linking target tests/gem_tiled_wc.
[234/554] Compiling C object 'tests/59830eb@@gem_userptr_blits@exe/i915_gem_userptr_blits.c.o'.
FAILED: tests/59830eb@@gem_userptr_blits@exe/i915_gem_userptr_blits.c.o
cc -Itests/59830eb@@gem_userptr_blits@exe -Itests -I../../../usr/src/igt-gpu-tools/tests -I../../../usr/src/igt-gpu-tools/include/drm-uapi -I../../../usr/src/igt-gpu-tools/include/linux-uapi -Ilib -I../../../usr/src/igt-gpu-tools/lib -I../../../usr/src/igt-gpu-tools/lib/stubs/syscalls -I. -I../../../usr/src/igt-gpu-tools/ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/x86_64-linux-gnu -I/usr/include/valgrind -I/usr/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-address-of-packed-member -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -pthread -MD -MQ 'tests/59830eb@@gem_userptr_blits@exe/i915_gem_userptr_blits.c.o' -MF 'tests/59830eb@@gem_userptr_blits@exe/i915_gem_userptr_blits.c.o.d' -o 'tests/59830eb@@gem_userptr_blits@exe/i915_gem_userptr_blits.c.o' -c ../../../usr/src/igt-gpu-tools/tests/i915/gem_userptr_blits.c ../../../usr/src/igt-gpu-tools/tests/i915/gem_userptr_blits.c: In function ‘copy’:
../../../usr/src/igt-gpu-tools/tests/i915/gem_userptr_blits.c:114:6: error: implicit declaration of function ‘IS_PONTEVECCHIO’ [-Werror=implicit-function-declaration]

  114 |  if (IS_PONTEVECCHIO(devid)) {
      |      ^~~~~~~~~~~~~~~

../../../usr/src/igt-gpu-tools/tests/i915/gem_userptr_blits.c:114:6: warning: nested extern declaration of ‘IS_PONTEVECCHIO’ [-Wnested-externs]
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.

#2 lore raw
In reply to Vikas Srivastava

Hi,

Quoted 43 lines · Vikas Srivastava

From: Arjun Melkaveri <[email protected]>

Test case uses legacy command which is not supported on MTL. Modified test to use XY_FAST_COPY_BLT.

---
 tests/i915/gem_userptr_blits.c | 128 +++++++++++++++++++++------------
 1 file changed, 83 insertions(+), 45 deletions(-)
tests/i915/gem_userptr_blits.c +1 -16
index 698508669..22cbd5e02 100644
@@ -99,6 +99,7 @@ static int copy(int fd, uint32_t dst, uint32_t src)
 	struct drm_i915_gem_relocation_entry reloc[2];
 	struct drm_i915_gem_exec_object2 obj[3];
 	struct drm_i915_gem_execbuffer2 exec;
+	static uint32_t devid;
 	uint32_t handle;
 	int ret, i=0;
 	uint64_t dst_offset, src_offset, bb_offset;
@@ -108,29 +109,47 @@ static int copy(int fd, uint32_t dst, uint32_t src)
 	dst_offset = bb_offset + 4096;
 	src_offset = dst_offset + WIDTH * HEIGHT * sizeof(uint32_t) * (src != dst);
 
-	batch[i++] = XY_SRC_COPY_BLT_CMD |
-		  XY_SRC_COPY_BLT_WRITE_ALPHA |
-		  XY_SRC_COPY_BLT_WRITE_RGB;
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i - 1] |= 8;
-	else
-		batch[i - 1] |= 6;
-
-	batch[i++] = (3 << 24) | /* 32 bits */
-		  (0xcc << 16) | /* copy ROP */
-		  WIDTH*4;
-	batch[i++] = 0; /* dst x1,y1 */
-	batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
-	batch[i++] = dst_offset; /* dst reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = dst_offset >> 32;

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 114

Quoted 10 lines
tests/i915/gem_userptr_blits.c +3 -7
-	batch[i++] = 0; /* src x1,y1 */
-	batch[i++] = WIDTH*4;
-	batch[i++] = src_offset; /* src reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = src_offset >> 32;
-	batch[i++] = MI_BATCH_BUFFER_END;
-	batch[i++] = MI_NOOP;
+	devid = intel_get_drm_devid(fd);
+
+	if (IS_PONTEVECCHIO(devid)) {

----------- ^
imho here check for >= gen12

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 119

Quoted 5 lines
tests/i915/gem_userptr_blits.c +5 -0
+		batch[i++] = XY_FAST_COPY_BLT;
+		batch[i++] = XY_FAST_COPY_COLOR_DEPTH_32 | WIDTH*4;
+		batch[i++] = 0;/* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH;/* dst x2,y2 */
+		batch[i++] = 0;/* dst address lower bits */

---------------------------- ^

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 120

Quoted 1 line
tests/i915/gem_userptr_blits.c +1 -0
+		batch[i++] = 0;/* dst address upper bits */

---------------------------- ^
Use dst_offset

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 123

Quoted 3 lines
tests/i915/gem_userptr_blits.c +3 -0
+		batch[i++] = 0;/* src x1,y1 */
+		batch[i++] = WIDTH*4;/* src pitch */
+		batch[i++] = 0;// src address lower bits

---------------------------- ^

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 124

Quoted 1 line
tests/i915/gem_userptr_blits.c +1 -0
+		batch[i++] = 0;// src address upper bits

---------------------------- ^
Use src_offset

Quoted 55 lines
tests/i915/gem_userptr_blits.c +30 -15
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	} else {
+		batch[i++] = XY_SRC_COPY_BLT_CMD |
+			     XY_SRC_COPY_BLT_WRITE_ALPHA |
+			     XY_SRC_COPY_BLT_WRITE_RGB;
+
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i - 1] |= 8;
+		else
+			batch[i - 1] |= 6;
+
+		batch[i++] = (3 << 24) | /* 32 bits */
+			  (0xcc << 16) | /* copy ROP */
+			  WIDTH*4;
+		batch[i++] = 0; /* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
+		batch[i++] = dst_offset; /* dst reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = dst_offset >> 32;
+		batch[i++] = 0; /* src x1,y1 */
+		batch[i++] = WIDTH*4;
+		batch[i++] = src_offset; /* src reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = src_offset >> 32;
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	}
 
 	handle = gem_create(fd, 4096);
 	gem_write(fd, handle, 0, batch, sizeof(batch));
@@ -204,31 +223,50 @@ blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo)
 	struct drm_i915_gem_relocation_entry reloc[2];
 	struct drm_i915_gem_exec_object2 *obj;
 	struct drm_i915_gem_execbuffer2 exec;
+	static uint32_t devid;
+
 	uint32_t handle;
 	int n, ret, i=0;
 
-	batch[i++] = XY_SRC_COPY_BLT_CMD |
-		  XY_SRC_COPY_BLT_WRITE_ALPHA |
-		  XY_SRC_COPY_BLT_WRITE_RGB;
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i - 1] |= 8;
-	else
-		batch[i - 1] |= 6;
-	batch[i++] = (3 << 24) | /* 32 bits */
-		  (0xcc << 16) | /* copy ROP */
-		  WIDTH*4;
-	batch[i++] = 0; /* dst x1,y1 */
-	batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
-	batch[i++] = 0; /* dst reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = 0;

tests/i915/gem_userptr_blits.c blit(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo) · line 233

Quoted 10 lines
tests/i915/gem_userptr_blits.c +3 -7
-	batch[i++] = 0; /* src x1,y1 */
-	batch[i++] = WIDTH*4;
-	batch[i++] = 0; /* src reloc */
-	if (intel_gen(intel_get_drm_devid(fd)) >= 8)
-		batch[i++] = 0;
-	batch[i++] = MI_BATCH_BUFFER_END;
-	batch[i++] = MI_NOOP;
+	devid = intel_get_drm_devid(fd);
+
+	if (IS_PONTEVECCHIO(devid)) {

Same here.

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 120

Quoted 6 lines
tests/i915/gem_userptr_blits.c +6 -0
+		batch[i++] = XY_FAST_COPY_BLT;
+		batch[i++] = XY_FAST_COPY_COLOR_DEPTH_32 | WIDTH*4;
+		batch[i++] = 0;/* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH;/* dst x2,y2 */
+		batch[i++] = 0;/* dst address lower bits */
+		batch[i++] = 0;/* dst address upper bits */

Same here.

tests/i915/gem_userptr_blits.c static int copy(int fd, uint32_t dst, uint32_t src) · line 124

Quoted 4 lines
tests/i915/gem_userptr_blits.c +4 -0
+		batch[i++] = 0;/* src x1,y1 */
+		batch[i++] = WIDTH*4;/* src pitch */
+		batch[i++] = 0;// src address lower bits
+		batch[i++] = 0;// src address upper bits

Same here.

Regards,
Kamil

Quoted 32 lines
tests/i915/gem_userptr_blits.c +26 -0
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	} else {
+		batch[i++] = XY_SRC_COPY_BLT_CMD |
+			     XY_SRC_COPY_BLT_WRITE_ALPHA |
+			     XY_SRC_COPY_BLT_WRITE_RGB;
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i - 1] |= 8;
+		else
+			batch[i - 1] |= 6;
+		batch[i++] = (3 << 24) | /* 32 bits */
+			     (0xcc << 16) | /* copy ROP */
+			     WIDTH*4;
+		batch[i++] = 0; /* dst x1,y1 */
+		batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
+		batch[i++] = 0; /* dst reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = 0;
+		batch[i++] = 0; /* src x1,y1 */
+		batch[i++] = WIDTH*4;
+		batch[i++] = 0; /* src reloc */
+		if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+			batch[i++] = 0;
+		batch[i++] = MI_BATCH_BUFFER_END;
+		batch[i++] = MI_NOOP;
+	}
 
 	handle = gem_create(fd, 4096);
 	gem_write(fd, handle, 0, batch, sizeof(batch));
Signature · 1 line
2.25.1