[igt-dev] [PATCH i-g-t 2/2] lib + tests: Remove possibility to use other than intel_bb context
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Wed Sep 30 10:38:44 UTC 2020
To avoid problems with addresses acquired from allocator in the
future we need to use intel_bb context. That's why all exec calls
which could pass different context id were removed. Update libraries
and tests to not to use that API anymore.
Depends on changes in intel_bb so must be merged together.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
lib/gpgpu_fill.c | 6 +--
lib/igt_draw.c | 5 +-
lib/igt_fb.c | 2 +-
lib/media_fill.c | 17 ++++---
lib/media_spin.c | 4 +-
lib/rendercopy.h | 9 ----
lib/rendercopy_gen4.c | 8 ++--
lib/rendercopy_gen6.c | 8 ++--
lib/rendercopy_gen7.c | 8 ++--
lib/rendercopy_gen8.c | 8 ++--
lib/rendercopy_gen9.c | 17 +++----
lib/rendercopy_i830.c | 3 +-
lib/rendercopy_i915.c | 3 +-
lib/veboxcopy_gen12.c | 7 ++-
tests/i915/api_intel_bb.c | 55 +++++++++++++++-------
tests/i915/gem_concurrent_all.c | 2 +-
tests/i915/gem_mmap_offset.c | 4 +-
tests/i915/gem_ppgtt.c | 9 ++--
tests/i915/gem_read_read_speed.c | 2 +-
tests/i915/gem_render_copy.c | 14 +++---
tests/i915/gem_render_copy_redux.c | 8 ++--
tests/i915/gem_render_linear_blits.c | 6 +--
tests/i915/gem_render_tiled_blits.c | 8 ++--
tests/i915/gem_stress.c | 2 +-
tests/i915/perf.c | 69 ++++++++++++----------------
tests/kms_big_fb.c | 2 +-
tests/kms_psr.c | 2 +-
27 files changed, 137 insertions(+), 151 deletions(-)
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index aa2ffa8d..0f031a52 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -140,7 +140,7 @@ gen7_gpgpu_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -190,7 +190,7 @@ gen8_gpgpu_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -239,7 +239,7 @@ __gen9_gpgpu_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 7a30340f..353467a2 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -601,10 +601,9 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
src = create_buf(fd, cmd_data->bops, &tmp, I915_TILING_NONE);
dst = create_buf(fd, cmd_data->bops, buf, tiling);
- ibb = intel_bb_create(fd, PAGE_SIZE);
+ ibb = intel_bb_create_with_context(fd, cmd_data->ctx, PAGE_SIZE);
- rendercopy(ibb, cmd_data->ctx, src, 0, 0, rect->w,
- rect->h, dst, rect->x, rect->y);
+ rendercopy(ibb, src, 0, 0, rect->w, rect->h, dst, rect->x, rect->y);
intel_bb_destroy(ibb);
intel_buf_destroy(src);
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index c6c35ace..8f20463c 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2267,7 +2267,7 @@ static void copy_with_engine(struct fb_blit_upload *blit,
dst_fb->plane_width[0], dst_fb->plane_height[0],
dst);
else
- render_copy(blit->ibb, 0,
+ render_copy(blit->ibb,
src,
0, 0,
dst_fb->plane_width[0], dst_fb->plane_height[0],
diff --git a/lib/media_fill.c b/lib/media_fill.c
index c21de54b..8e4da4ec 100644
--- a/lib/media_fill.c
+++ b/lib/media_fill.c
@@ -155,7 +155,7 @@ gen7_media_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -198,7 +198,7 @@ gen8_media_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -242,7 +242,7 @@ __gen9_media_fillfunc(int i915,
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
/* setup states */
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -310,9 +310,9 @@ __gen11_media_vme_func(int i915,
struct intel_bb *ibb;
uint32_t curbe_buffer, interface_descriptor;
- ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, dst->handle, 0, true);
- intel_bb_add_object(ibb, src->handle, 0, false);
+ ibb = intel_bb_create_with_context(i915, ctx, PAGE_SIZE);
+ intel_bb_add_intel_buf(ibb, dst, true);
+ intel_bb_add_intel_buf(ibb, src, false);
/* setup states */
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -351,9 +351,8 @@ __gen11_media_vme_func(int i915,
intel_bb_out(ibb, MI_BATCH_BUFFER_END);
intel_bb_ptr_align(ibb, 32);
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
intel_bb_destroy(ibb);
}
diff --git a/lib/media_spin.c b/lib/media_spin.c
index 6e81a13d..5da469a5 100644
--- a/lib/media_spin.c
+++ b/lib/media_spin.c
@@ -102,7 +102,7 @@ gen8_media_spinfunc(int i915, struct intel_buf *buf, uint32_t spins)
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
/* setup states */
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
@@ -143,7 +143,7 @@ gen9_media_spinfunc(int i915, struct intel_buf *buf, uint32_t spins)
uint32_t curbe_buffer, interface_descriptor;
ibb = intel_bb_create(i915, PAGE_SIZE);
- intel_bb_add_object(ibb, buf->handle, 0, true);
+ intel_bb_add_intel_buf(ibb, buf, true);
/* setup states */
intel_bb_ptr_set(ibb, BATCH_STATE_SPLIT);
diff --git a/lib/rendercopy.h b/lib/rendercopy.h
index 1bf8859c..7d5f0802 100644
--- a/lib/rendercopy.h
+++ b/lib/rendercopy.h
@@ -24,47 +24,38 @@ static inline void emit_vertex_normalized(struct intel_bb *ibb,
}
void gen12_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen11_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen9_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen8_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen7_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen6_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen4_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen3_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
void gen2_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src, uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
struct intel_buf *dst, uint32_t dst_x, uint32_t dst_y);
diff --git a/lib/rendercopy_gen4.c b/lib/rendercopy_gen4.c
index 279067ce..8536d6b6 100644
--- a/lib/rendercopy_gen4.c
+++ b/lib/rendercopy_gen4.c
@@ -626,7 +626,6 @@ static uint32_t gen4_emit_primitive(struct intel_bb *ibb)
}
void gen4_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
@@ -641,7 +640,7 @@ void gen4_render_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush_render_with_context(ibb, ctx);
+ intel_bb_flush_render(ibb);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -699,8 +698,7 @@ void gen4_render_copyfunc(struct intel_bb *ibb,
/* Position to valid batch end position for batch reuse */
intel_bb_ptr_set(ibb, batch_end);
- intel_bb_exec_with_context(ibb, batch_end, ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, batch_end,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
intel_bb_reset(ibb, false);
}
diff --git a/lib/rendercopy_gen6.c b/lib/rendercopy_gen6.c
index 4b7ed966..e941257e 100644
--- a/lib/rendercopy_gen6.c
+++ b/lib/rendercopy_gen6.c
@@ -510,7 +510,6 @@ static uint32_t gen6_emit_primitive(struct intel_bb *ibb)
}
void gen6_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
@@ -523,7 +522,7 @@ void gen6_render_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush_render_with_context(ibb, ctx);
+ intel_bb_flush_render(ibb);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -585,8 +584,7 @@ void gen6_render_copyfunc(struct intel_bb *ibb,
/* Position to valid batch end position for batch reuse */
intel_bb_ptr_set(ibb, batch_end);
- intel_bb_exec_with_context(ibb, batch_end, ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, batch_end,
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
intel_bb_reset(ibb, false);
}
diff --git a/lib/rendercopy_gen7.c b/lib/rendercopy_gen7.c
index 62ef4325..267f6f80 100644
--- a/lib/rendercopy_gen7.c
+++ b/lib/rendercopy_gen7.c
@@ -507,7 +507,6 @@ gen7_emit_null_depth_buffer(struct intel_bb *ibb)
#define BATCH_STATE_SPLIT 2048
void gen7_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
@@ -520,7 +519,7 @@ void gen7_render_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush_render_with_context(ibb, ctx);
+ intel_bb_flush_render(ibb);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -575,9 +574,8 @@ void gen7_render_copyfunc(struct intel_bb *ibb,
intel_bb_out(ibb, 0); /* index buffer offset, ignored */
intel_bb_emit_bbe(ibb);
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
dump_batch(ibb);
intel_bb_reset(ibb, false);
}
diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c
index 95c3c497..ba7897fb 100644
--- a/lib/rendercopy_gen8.c
+++ b/lib/rendercopy_gen8.c
@@ -780,7 +780,6 @@ static void gen8_emit_primitive(struct intel_bb *ibb, uint32_t offset)
#define BATCH_STATE_SPLIT 2048
void gen8_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
unsigned int src_x, unsigned int src_y,
unsigned int width, unsigned int height,
@@ -793,7 +792,7 @@ void gen8_render_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush_render_with_context(ibb, ctx);
+ intel_bb_flush_render(ibb);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -874,9 +873,8 @@ void gen8_render_copyfunc(struct intel_bb *ibb,
gen8_emit_primitive(ibb, vertex_buffer);
intel_bb_emit_bbe(ibb);
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC, false);
dump_batch(ibb);
intel_bb_reset(ibb, false);
}
diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
index 6bad7bb6..ef6855c9 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -877,7 +877,6 @@ static void gen8_emit_primitive(struct intel_bb *ibb, uint32_t offset)
static
void _gen9_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
unsigned int src_x, unsigned int src_y,
unsigned int width, unsigned int height,
@@ -894,7 +893,7 @@ void _gen9_render_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush_render_with_context(ibb, ctx);
+ intel_bb_flush_render(ibb);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -978,15 +977,13 @@ void _gen9_render_copyfunc(struct intel_bb *ibb,
gen8_emit_primitive(ibb, vertex_buffer);
intel_bb_emit_bbe(ibb);
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), ctx,
- I915_EXEC_RENDER | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_RENDER | I915_EXEC_NO_RELOC, false);
dump_batch(ibb);
intel_bb_reset(ibb, false);
}
void gen9_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
unsigned int src_x, unsigned int src_y,
unsigned int width, unsigned int height,
@@ -994,26 +991,24 @@ void gen9_render_copyfunc(struct intel_bb *ibb,
unsigned int dst_x, unsigned int dst_y)
{
- _gen9_render_copyfunc(ibb, ctx, src, src_x, src_y,
+ _gen9_render_copyfunc(ibb, src, src_x, src_y,
width, height, dst, dst_x, dst_y, NULL,
ps_kernel_gen9, sizeof(ps_kernel_gen9));
}
void gen11_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
unsigned int src_x, unsigned int src_y,
unsigned int width, unsigned int height,
struct intel_buf *dst,
unsigned int dst_x, unsigned int dst_y)
{
- _gen9_render_copyfunc(ibb, ctx, src, src_x, src_y,
+ _gen9_render_copyfunc(ibb, src, src_x, src_y,
width, height, dst, dst_x, dst_y, NULL,
ps_kernel_gen11, sizeof(ps_kernel_gen11));
}
void gen12_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
unsigned int src_x, unsigned int src_y,
unsigned int width, unsigned int height,
@@ -1024,7 +1019,7 @@ void gen12_render_copyfunc(struct intel_bb *ibb,
gen12_aux_pgtable_init(&pgtable_info, ibb, src, dst);
- _gen9_render_copyfunc(ibb, ctx, src, src_x, src_y,
+ _gen9_render_copyfunc(ibb, src, src_x, src_y,
width, height, dst, dst_x, dst_y,
pgtable_info.pgtable_buf,
gen12_render_copy,
diff --git a/lib/rendercopy_i830.c b/lib/rendercopy_i830.c
index e755706e..4c427149 100644
--- a/lib/rendercopy_i830.c
+++ b/lib/rendercopy_i830.c
@@ -235,7 +235,6 @@ static void gen2_emit_copy_pipeline(struct intel_bb *ibb)
}
void gen2_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
@@ -277,5 +276,5 @@ void gen2_render_copyfunc(struct intel_bb *ibb,
emit_vertex_normalized(ibb, src_x, intel_buf_width(src));
emit_vertex_normalized(ibb, src_y, intel_buf_height(src));
- intel_bb_flush_blit_with_context(ibb, ctx);
+ intel_bb_flush_blit(ibb);
}
diff --git a/lib/rendercopy_i915.c b/lib/rendercopy_i915.c
index b16d4f12..3e421301 100644
--- a/lib/rendercopy_i915.c
+++ b/lib/rendercopy_i915.c
@@ -20,7 +20,6 @@
#include "rendercopy.h"
void gen3_render_copyfunc(struct intel_bb *ibb,
- uint32_t ctx,
struct intel_buf *src,
uint32_t src_x, uint32_t src_y,
uint32_t width, uint32_t height,
@@ -229,5 +228,5 @@ void gen3_render_copyfunc(struct intel_bb *ibb,
emit_vertex(ibb, src_x);
emit_vertex(ibb, src_y);
- intel_bb_flush_blit_with_context(ibb, ctx);
+ intel_bb_flush_blit(ibb);
}
diff --git a/lib/veboxcopy_gen12.c b/lib/veboxcopy_gen12.c
index a44e2bff..b4cd7bdd 100644
--- a/lib/veboxcopy_gen12.c
+++ b/lib/veboxcopy_gen12.c
@@ -248,7 +248,7 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
igt_assert(src->bpp == dst->bpp);
- intel_bb_flush(ibb, ibb->ctx, I915_EXEC_VEBOX);
+ intel_bb_flush(ibb, I915_EXEC_VEBOX);
intel_bb_add_intel_buf(ibb, dst, true);
intel_bb_add_intel_buf(ibb, src, false);
@@ -304,9 +304,8 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
intel_bb_out(ibb, MI_BATCH_BUFFER_END);
intel_bb_ptr_align(ibb, 8);
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), 0,
- I915_EXEC_VEBOX | I915_EXEC_NO_RELOC,
- false);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_VEBOX | I915_EXEC_NO_RELOC, false);
intel_bb_reset(ibb, false);
diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index dacf05c0..965a7dde 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -158,10 +158,15 @@ static void simple_bb(struct buf_ops *bops, bool use_context)
intel_bb_out(ibb, MI_BATCH_BUFFER_END);
intel_bb_ptr_align(ibb, 8);
- if (use_context)
- intel_bb_exec_with_context(ibb, intel_bb_offset(ibb), ctx,
- I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
- true);
+ if (use_context) {
+ intel_bb_destroy(ibb);
+ ibb = intel_bb_create_with_context(i915, ctx, PAGE_SIZE);
+ intel_bb_out(ibb, MI_BATCH_BUFFER_END);
+ intel_bb_ptr_align(ibb, 8);
+ intel_bb_exec(ibb, intel_bb_offset(ibb),
+ I915_EXEC_DEFAULT | I915_EXEC_NO_RELOC,
+ true);
+ }
intel_bb_destroy(ibb);
if (use_context)
@@ -429,6 +434,10 @@ static void blit(struct buf_ops *bops,
if (debug_bb)
intel_bb_set_debug(ibb, true);
+
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, dst, true);
+
__emit_blit(ibb, src, dst);
/* We expect initial addresses are zeroed for relocs */
@@ -458,6 +467,11 @@ static void blit(struct buf_ops *bops,
fill_buf(src, COLOR_77);
fill_buf(dst, COLOR_00);
+ if (purge_cache && !do_relocs) {
+ intel_bb_add_intel_buf(ibb, src, false);
+ intel_bb_add_intel_buf(ibb, dst, true);
+ }
+
__emit_blit(ibb, src, dst);
poff2_bb = intel_bb_get_object_offset(ibb, ibb->handle);
@@ -478,8 +492,8 @@ static void blit(struct buf_ops *bops,
igt_assert(poff2_dst == 0);
} else {
igt_assert(poff_bb != poff2_bb);
- igt_assert(poff_src != poff2_src);
- igt_assert(poff_dst != poff2_dst);
+ igt_assert(poff_src == poff2_src);
+ igt_assert(poff_dst == poff2_dst);
}
} else {
igt_assert(poff_bb == poff2_bb);
@@ -781,9 +795,12 @@ static void offset_control(struct buf_ops *bops)
dst1 = create_buf(bops, WIDTH, HEIGHT, COLOR_00);
dst2 = create_buf(bops, WIDTH, HEIGHT, COLOR_77);
- intel_bb_add_object(ibb, src->handle, src->addr.offset, false);
- intel_bb_add_object(ibb, dst1->handle, dst1->addr.offset, true);
- intel_bb_add_object(ibb, dst2->handle, dst2->addr.offset, true);
+ intel_bb_add_object(ibb, src->handle, intel_buf_bo_size(src),
+ src->addr.offset, false);
+ intel_bb_add_object(ibb, dst1->handle, intel_buf_bo_size(dst1),
+ dst1->addr.offset, true);
+ intel_bb_add_object(ibb, dst2->handle, intel_buf_bo_size(dst2),
+ dst2->addr.offset, true);
intel_bb_out(ibb, MI_BATCH_BUFFER_END);
intel_bb_ptr_align(ibb, 8);
@@ -806,10 +823,14 @@ static void offset_control(struct buf_ops *bops)
intel_bb_reset(ibb, true);
dst3 = create_buf(bops, WIDTH, HEIGHT, COLOR_33);
- intel_bb_add_object(ibb, dst3->handle, dst3->addr.offset, true);
- intel_bb_add_object(ibb, src->handle, src->addr.offset, false);
- intel_bb_add_object(ibb, dst1->handle, dst1->addr.offset, true);
- intel_bb_add_object(ibb, dst2->handle, dst2->addr.offset, true);
+ intel_bb_add_object(ibb, dst3->handle, intel_buf_bo_size(dst3),
+ dst3->addr.offset, true);
+ intel_bb_add_object(ibb, src->handle, intel_buf_bo_size(src),
+ src->addr.offset, false);
+ intel_bb_add_object(ibb, dst1->handle, intel_buf_bo_size(dst1),
+ dst1->addr.offset, true);
+ intel_bb_add_object(ibb, dst2->handle, intel_buf_bo_size(dst2),
+ dst2->addr.offset, true);
intel_bb_out(ibb, MI_BATCH_BUFFER_END);
intel_bb_ptr_align(ibb, 8);
@@ -902,13 +923,13 @@ static int render(struct buf_ops *bops, uint32_t tiling, bool do_reloc,
render_copy = igt_get_render_copyfunc(devid);
igt_assert(render_copy);
- render_copy(ibb, 0,
+ render_copy(ibb,
&src,
0, 0, width, height,
&dst,
0, 0);
- render_copy(ibb, 0,
+ render_copy(ibb,
&dst,
0, 0, width, height,
&final,
@@ -1003,13 +1024,13 @@ static void render_ccs(struct buf_ops *bops)
0, 0, width, height,
0, 0, width, height, 0);
- render_copy(ibb, 0,
+ render_copy(ibb,
&src,
0, 0, width, height,
&dst,
0, 0);
- render_copy(ibb, 0,
+ render_copy(ibb,
&dst,
0, 0, width, height,
&final,
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index 6609e1df..865da3f8 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -874,7 +874,7 @@ typedef igt_hang_t (*do_hang)(void);
static void render_copy_bo(struct buffers *b, struct intel_buf *dst,
struct intel_buf *src)
{
- rendercopy(b->ibb, 0,
+ rendercopy(b->ibb,
src, 0, 0,
b->width, b->height,
dst, 0, 0);
diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
index 82203bce..8b29d0a0 100644
--- a/tests/i915/gem_mmap_offset.c
+++ b/tests/i915/gem_mmap_offset.c
@@ -614,8 +614,8 @@ static void blt_coherency(int i915)
dst = create_bo(bops, 1, width, height);
size = src->surface[0].size;
- intel_bb_add_object(ibb, src->handle, src->addr.offset, false);
- intel_bb_add_object(ibb, dst->handle, dst->addr.offset, true);
+ intel_bb_add_object(ibb, src->handle, size, src->addr.offset, false);
+ intel_bb_add_object(ibb, dst->handle, size, dst->addr.offset, true);
intel_bb_blt_copy(ibb,
src, 0, 0, src->surface[0].stride,
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index e81620ac..73bd19c5 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -110,16 +110,17 @@ static void fork_rcs_copy(int timeout, uint32_t final,
struct intel_buf *src;
unsigned long i;
- ibb = intel_bb_create(buf_ops_get_fd(dst[child]->bops), 4096);
-
if (flags & CREATE_CONTEXT)
ctx = gem_context_create(buf_ops_get_fd(dst[child]->bops));
+ ibb = intel_bb_create_with_context(buf_ops_get_fd(dst[child]->bops),
+ ctx, 4096);
+
i = 0;
igt_until_timeout(timeout) {
src = create_bo(dst[child]->bops,
i++ | child << 16);
- render_copy(ibb, ctx,
+ render_copy(ibb,
src, 0, 0,
WIDTH, HEIGHT,
dst[child], 0, 0);
@@ -129,7 +130,7 @@ static void fork_rcs_copy(int timeout, uint32_t final,
src = create_bo(dst[child]->bops,
final | child << 16);
- render_copy(ibb, ctx,
+ render_copy(ibb,
src, 0, 0,
WIDTH, HEIGHT,
dst[child], 0, 0);
diff --git a/tests/i915/gem_read_read_speed.c b/tests/i915/gem_read_read_speed.c
index 40494566..7c5c90f7 100644
--- a/tests/i915/gem_read_read_speed.c
+++ b/tests/i915/gem_read_read_speed.c
@@ -66,7 +66,7 @@ static struct intel_bb *rcs_copy_bo(struct intel_buf *dst,
/* enforce batch won't be recreated after execution */
intel_bb_ref(ibb);
- rendercopy(ibb, 0,
+ rendercopy(ibb,
src, 0, 0,
width, height,
dst, 0, 0);
diff --git a/tests/i915/gem_render_copy.c b/tests/i915/gem_render_copy.c
index 7f425dcd..ae6e1833 100644
--- a/tests/i915/gem_render_copy.c
+++ b/tests/i915/gem_render_copy.c
@@ -456,12 +456,12 @@ static void test(data_t *data, uint32_t src_tiling, uint32_t dst_tiling,
*/
if (src_mixed_tiled) {
if (dst_compressed)
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&dst, 0, 0, WIDTH, HEIGHT,
&dst_ccs, 0, 0);
for (int i = 0; i < num_src; i++) {
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&src[i].buf,
WIDTH/4, HEIGHT/4, WIDTH/2-2, HEIGHT/2-2,
dst_compressed ? &dst_ccs : &dst,
@@ -469,13 +469,13 @@ static void test(data_t *data, uint32_t src_tiling, uint32_t dst_tiling,
}
if (dst_compressed)
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&dst_ccs, 0, 0, WIDTH, HEIGHT,
&dst, 0, 0);
} else {
if (src_compression == I915_COMPRESSION_RENDER) {
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&src_tiled, 0, 0, WIDTH, HEIGHT,
&src_ccs,
0, 0);
@@ -498,13 +498,13 @@ static void test(data_t *data, uint32_t src_tiling, uint32_t dst_tiling,
}
if (dst_compression == I915_COMPRESSION_RENDER) {
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
src_compressed ? &src_ccs : &src_tiled,
0, 0, WIDTH, HEIGHT,
&dst_ccs,
0, 0);
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&dst_ccs,
0, 0, WIDTH, HEIGHT,
&dst,
@@ -525,7 +525,7 @@ static void test(data_t *data, uint32_t src_tiling, uint32_t dst_tiling,
WIDTH, HEIGHT,
&dst);
} else {
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
src_compressed ? &src_ccs : &src_tiled,
0, 0, WIDTH, HEIGHT,
&dst,
diff --git a/tests/i915/gem_render_copy_redux.c b/tests/i915/gem_render_copy_redux.c
index 3f9f926c..8e633567 100644
--- a/tests/i915/gem_render_copy_redux.c
+++ b/tests/i915/gem_render_copy_redux.c
@@ -134,7 +134,7 @@ static void copy(data_t *data)
scratch_buf_check(data, &src, WIDTH / 2, HEIGHT / 2, SRC_COLOR);
scratch_buf_check(data, &dst, WIDTH / 2, HEIGHT / 2, DST_COLOR);
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&src, 0, 0, WIDTH, HEIGHT,
&dst, WIDTH / 2, HEIGHT / 2);
@@ -158,14 +158,14 @@ static void copy_flink(data_t *data)
scratch_buf_init(data, &src, WIDTH, HEIGHT, STRIDE, 0);
scratch_buf_init(data, &dst, WIDTH, HEIGHT, STRIDE, DST_COLOR);
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&src, 0, 0, WIDTH, HEIGHT,
&dst, WIDTH, HEIGHT);
scratch_buf_init(&local, &local_src, WIDTH, HEIGHT, STRIDE, 0);
scratch_buf_init(&local, &local_dst, WIDTH, HEIGHT, STRIDE, SRC_COLOR);
- local.render_copy(local.ibb, 0,
+ local.render_copy(local.ibb,
&local_src, 0, 0, WIDTH, HEIGHT,
&local_dst, WIDTH, HEIGHT);
@@ -173,7 +173,7 @@ static void copy_flink(data_t *data)
flink = local_dst;
flink.handle = gem_open(data->fd, name);
- data->render_copy(data->ibb, 0,
+ data->render_copy(data->ibb,
&flink, 0, 0, WIDTH, HEIGHT,
&dst, WIDTH / 2, HEIGHT / 2);
diff --git a/tests/i915/gem_render_linear_blits.c b/tests/i915/gem_render_linear_blits.c
index 8d044e9e..8e646127 100644
--- a/tests/i915/gem_render_linear_blits.c
+++ b/tests/i915/gem_render_linear_blits.c
@@ -111,7 +111,7 @@ static void run_test (int fd, int count)
src = &bufs[i % count];
dst = &bufs[(i + 1) % count];
- render_copy(ibb, 0, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
+ render_copy(ibb, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
start_val[(i + 1) % count] = start_val[i % count];
}
@@ -128,7 +128,7 @@ static void run_test (int fd, int count)
src = &bufs[(i + 1) % count];
dst = &bufs[i % count];
- render_copy(ibb, 0, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
+ render_copy(ibb, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
start_val[i % count] = start_val[(i + 1) % count];
}
for (i = 0; i < count; i++)
@@ -146,7 +146,7 @@ static void run_test (int fd, int count)
src = &bufs[s];
dst = &bufs[d];
- render_copy(ibb, 0, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
+ render_copy(ibb, src, 0, 0, WIDTH, HEIGHT, dst, 0, 0);
start_val[d] = start_val[s];
}
for (i = 0; i < count; i++)
diff --git a/tests/i915/gem_render_tiled_blits.c b/tests/i915/gem_render_tiled_blits.c
index 5a92a471..187714d6 100644
--- a/tests/i915/gem_render_tiled_blits.c
+++ b/tests/i915/gem_render_tiled_blits.c
@@ -66,7 +66,7 @@ check_buf(struct intel_bb *ibb, struct intel_buf *buf, uint32_t val)
uint32_t *ptr;
int i;
- render_copy(ibb, 0, buf, 0, 0, WIDTH, HEIGHT, &linear, 0, 0);
+ render_copy(ibb, buf, 0, 0, WIDTH, HEIGHT, &linear, 0, 0);
if (snoop) {
ptr = gem_mmap__cpu_coherent(i915, linear.handle, 0,
@@ -148,7 +148,7 @@ static void run_test (int fd, int count)
int src = i % count;
int dst = (i + 1) % count;
- render_copy(ibb, 0, &bufs[src], 0, 0, WIDTH, HEIGHT,
+ render_copy(ibb, &bufs[src], 0, 0, WIDTH, HEIGHT,
&bufs[dst], 0, 0);
start_val[dst] = start_val[src];
}
@@ -161,7 +161,7 @@ static void run_test (int fd, int count)
int src = (i + 1) % count;
int dst = i % count;
- render_copy(ibb, 0, &bufs[src], 0, 0, WIDTH, HEIGHT,
+ render_copy(ibb, &bufs[src], 0, 0, WIDTH, HEIGHT,
&bufs[dst], 0, 0);
start_val[dst] = start_val[src];
}
@@ -176,7 +176,7 @@ static void run_test (int fd, int count)
if (src == dst)
continue;
- render_copy(ibb, 0, &bufs[src], 0, 0, WIDTH, HEIGHT,
+ render_copy(ibb, &bufs[src], 0, 0, WIDTH, HEIGHT,
&bufs[dst], 0, 0);
start_val[dst] = start_val[src];
}
diff --git a/tests/i915/gem_stress.c b/tests/i915/gem_stress.c
index 0d513709..3e4d4907 100644
--- a/tests/i915/gem_stress.c
+++ b/tests/i915/gem_stress.c
@@ -377,7 +377,7 @@ static void render_copyfunc(struct intel_buf *src, unsigned src_x, unsigned src_
*/
intel_bb_flush_blit(ibb);
- rendercopy(ibb, 0, src, src_x, src_y,
+ rendercopy(ibb, src, src_x, src_y,
options.tile_size, options.tile_size,
dst, dst_x, dst_y);
} else
diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index 474c3388..a5c4adc3 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -1538,7 +1538,6 @@ static void load_helper_run(enum load load)
while (!lh.exit) {
render_copy(lh.ibb,
- lh.context_id,
&lh.src, 0, 0, 1920, 1080,
&lh.dst, 0, 0);
@@ -1572,7 +1571,7 @@ static void load_helper_init(void)
lh.context_id = gem_context_create(drm_fd);
igt_assert_neq(lh.context_id, 0xffffffff);
- lh.ibb = intel_bb_create(drm_fd, BATCH_SZ);
+ lh.ibb = intel_bb_create_with_context(drm_fd, lh.context_id, BATCH_SZ);
scratch_buf_init(lh.bops, &lh.dst, 1920, 1080, 0);
scratch_buf_init(lh.bops, &lh.src, 1920, 1080, 0);
@@ -2915,7 +2914,7 @@ gen12_test_mi_rpc(void)
igt_assert_neq(ctx_id, INVALID_CTX_ID);
properties[1] = ctx_id;
- ibb = intel_bb_create(drm_fd, BATCH_SZ);
+ ibb = intel_bb_create_with_context(drm_fd, ctx_id, BATCH_SZ);
buf = intel_buf_create(bops, 4096, 1, 8, 64,
I915_TILING_NONE, I915_COMPRESSION_NONE);
@@ -2931,7 +2930,7 @@ gen12_test_mi_rpc(void)
buf,
REPORT_OFFSET,
REPORT_ID);
- intel_bb_flush_render_with_context(ibb, ctx_id);
+ intel_bb_flush_render(ibb);
intel_bb_sync(ibb);
intel_buf_cpu_map(buf, false);
@@ -2994,7 +2993,7 @@ test_mi_rpc(void)
ctx_id = gem_context_create(drm_fd);
- ibb = intel_bb_create(drm_fd, BATCH_SZ);
+ ibb = intel_bb_create_with_context(drm_fd, ctx_id, BATCH_SZ);
buf = intel_buf_create(bops, 4096, 1, 8, 64,
I915_TILING_NONE, I915_COMPRESSION_NONE);
@@ -3007,7 +3006,7 @@ test_mi_rpc(void)
0, /* dst offset in bytes */
0xdeadbeef); /* report ID */
- intel_bb_flush_render_with_context(ibb, ctx_id);
+ intel_bb_flush_render(ibb);
intel_bb_sync(ibb);
intel_buf_cpu_map(buf, false);
@@ -3119,10 +3118,10 @@ hsw_test_single_ctx_counters(void)
* We currently cache addresses for buffers within
* intel_bb, so use separate batches for different contexts
*/
- ibb0 = intel_bb_create(drm_fd, BATCH_SZ);
- ibb1 = intel_bb_create(drm_fd, BATCH_SZ);
context0_id = gem_context_create(drm_fd);
context1_id = gem_context_create(drm_fd);
+ ibb0 = intel_bb_create_with_context(drm_fd, context0_id, BATCH_SZ);
+ ibb1 = intel_bb_create_with_context(drm_fd, context1_id, BATCH_SZ);
igt_debug("submitting warm up render_copy\n");
@@ -3147,13 +3146,12 @@ hsw_test_single_ctx_counters(void)
* hook callback.
*/
render_copy(ibb0,
- context0_id,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
properties[1] = context0_id;
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
intel_bb_sync(ibb0);
scratch_buf_memset(&src[0], width, height, 0xff0000ff);
@@ -3181,32 +3179,29 @@ hsw_test_single_ctx_counters(void)
* that the PIPE_CONTROL + MI_RPC commands will be in a
* separate batch from the copy.
*/
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
render_copy(ibb0,
- context0_id,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
/* Another redundant flush to clarify batch bo is free to reuse */
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
/* submit two copies on the other context to avoid a false
* positive in case the driver somehow ended up filtering for
* context1
*/
render_copy(ibb1,
- context1_id,
&src[1], 0, 0, width, height,
&dst[1], 0, 0);
render_copy(ibb1,
- context1_id,
&src[2], 0, 0, width, height,
&dst[2], 0, 0);
/* And another */
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
emit_stall_timestamp_and_rpc(ibb0,
dst_buf,
@@ -3214,7 +3209,7 @@ hsw_test_single_ctx_counters(void)
256, /* report dst offset */
0xbeefbeef); /* report id */
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
intel_bb_sync(ibb0);
intel_buf_cpu_map(dst_buf, false /* write enable */);
@@ -3367,10 +3362,10 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
scratch_buf_init(bops, &dst[i], width, height, 0x00ff00ff);
}
- ibb0 = intel_bb_create(drm_fd, BATCH_SZ);
- ibb1 = intel_bb_create(drm_fd, BATCH_SZ);
context0_id = gem_context_create(drm_fd);
context1_id = gem_context_create(drm_fd);
+ ibb0 = intel_bb_create_with_context(drm_fd, context0_id, BATCH_SZ);
+ ibb1 = intel_bb_create_with_context(drm_fd, context1_id, BATCH_SZ);
igt_debug("submitting warm up render_copy\n");
@@ -3395,7 +3390,6 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
* hook callback.
*/
render_copy(ibb0,
- context0_id,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
intel_bb_sync(ibb0);
@@ -3427,32 +3421,29 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
* that the PIPE_CONTROL + MI_RPC commands will be in a
* separate batch from the copy.
*/
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
render_copy(ibb0,
- context0_id,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
/* Another redundant flush to clarify batch bo is free to reuse */
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
/* submit two copies on the other context to avoid a false
* positive in case the driver somehow ended up filtering for
* context1
*/
render_copy(ibb1,
- context1_id,
&src[1], 0, 0, width, height,
&dst[1], 0, 0);
render_copy(ibb1,
- context1_id,
&src[2], 0, 0, width, height,
&dst[2], 0, 0);
/* And another */
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
emit_stall_timestamp_and_rpc(ibb1,
dst_buf,
@@ -3460,7 +3451,7 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
256, /* report dst offset */
0xbeefbeef); /* report id */
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
intel_bb_sync(ibb1);
intel_bb_sync(ibb0);
@@ -3774,10 +3765,10 @@ static void gen12_single_ctx_helper(void)
scratch_buf_init(bops, &dst[i], width, height, 0x00ff00ff);
}
- ibb0 = intel_bb_create(drm_fd, BATCH_SZ);
- ibb1 = intel_bb_create(drm_fd, BATCH_SZ);
context0_id = gem_context_create(drm_fd);
context1_id = gem_context_create(drm_fd);
+ ibb0 = intel_bb_create_with_context(drm_fd, context0_id, BATCH_SZ);
+ ibb1 = intel_bb_create_with_context(drm_fd, context1_id, BATCH_SZ);
igt_debug("submitting warm up render_copy\n");
@@ -3801,7 +3792,7 @@ static void gen12_single_ctx_helper(void)
* up pinning the context since there won't ever be a pinning
* hook callback.
*/
- render_copy(ibb0, context0_id,
+ render_copy(ibb0,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
@@ -3830,13 +3821,13 @@ static void gen12_single_ctx_helper(void)
BO_TIMESTAMP_OFFSET0,
BO_REPORT_OFFSET0,
BO_REPORT_ID0);
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
/* This is the work/context that is measured for counter increments */
- render_copy(ibb0, context0_id,
+ render_copy(ibb0,
&src[0], 0, 0, width, height,
&dst[0], 0, 0);
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
/* Submit an mi-rpc to context1 before work
*
@@ -3852,20 +3843,20 @@ static void gen12_single_ctx_helper(void)
BO_TIMESTAMP_OFFSET2,
BO_REPORT_OFFSET2,
BO_REPORT_ID2);
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
/* Submit two copies on the other context to avoid a false
* positive in case the driver somehow ended up filtering for
* context1
*/
- render_copy(ibb1, context1_id,
+ render_copy(ibb1,
&src[1], 0, 0, width, height,
&dst[1], 0, 0);
- render_copy(ibb1, context1_id,
+ render_copy(ibb1,
&src[2], 0, 0, width, height,
&dst[2], 0, 0);
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
/* Submit an mi-rpc to context1 after all work */
#define BO_TIMESTAMP_OFFSET3 1048
@@ -3876,7 +3867,7 @@ static void gen12_single_ctx_helper(void)
BO_TIMESTAMP_OFFSET3,
BO_REPORT_OFFSET3,
BO_REPORT_ID3);
- intel_bb_flush_render_with_context(ibb1, context1_id);
+ intel_bb_flush_render(ibb1);
/* Submit an mi-rpc to context0 after all measurable work */
#define BO_TIMESTAMP_OFFSET1 1032
@@ -3887,7 +3878,7 @@ static void gen12_single_ctx_helper(void)
BO_TIMESTAMP_OFFSET1,
BO_REPORT_OFFSET1,
BO_REPORT_ID1);
- intel_bb_flush_render_with_context(ibb0, context0_id);
+ intel_bb_flush_render(ibb0);
intel_bb_sync(ibb0);
intel_bb_sync(ibb1);
diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index 175ffa88..02e9915b 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -102,7 +102,7 @@ static void copy_pattern(data_t *data,
* rendered with the blitter/render engine.
*/
if (data->render_copy) {
- data->render_copy(data->ibb, 0, src, sx, sy, w, h, dst, dx, dy);
+ data->render_copy(data->ibb, src, sx, sy, w, h, dst, dx, dy);
} else {
w = min(w, src_fb->width - sx);
w = min(w, dst_fb->width - dx);
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 1448d24d..af81a259 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -203,7 +203,7 @@ static void fill_render(data_t *data, const struct igt_fb *fb,
0, tiling, 0);
gem_write(data->drm_fd, src->handle, 0, buf, 4);
- rendercopy(ibb, 0,
+ rendercopy(ibb,
src, 0, 0, 0xff, 0xff,
dst, 0, 0);
--
2.26.0
More information about the igt-dev
mailing list