diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2020-09-30 14:09:45 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-10-01 13:21:29 +0100 |
commit | 1a7ef7eb5e99c9a8f4ffbc13cdae399a01a9aa12 (patch) | |
tree | 6f6d16ad2ac076d3d98373adcc0a93c7daec21de /lib/intel_batchbuffer.h | |
parent | 19ae9421a5af7b03a1c9a577c57f2cf8b16a0116 (diff) |
lib/intel_batchbuffer: Prepare batch to use in allocator infrastructure
With upcoming of allocator code we need to ensure batch will execute
with appropriate context. If mismatch between allocator data and batch
could lead to strange or wrong results. All functions which could change
context in execbuf called from intel_bb were removed.
As an allocator requires size (which was not previously required in
intel_bb) adding object to intel_bb is now mandatory.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/intel_batchbuffer.h')
-rw-r--r-- | lib/intel_batchbuffer.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index 8b9c1ed9..d20b4e66 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -341,7 +341,6 @@ struct intel_bb; struct intel_buf; typedef void (*igt_render_copyfunc_t)(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, @@ -478,7 +477,11 @@ struct intel_bb { }; struct intel_bb *intel_bb_create(int i915, uint32_t size); +struct intel_bb * +intel_bb_create_with_context(int i915, uint32_t ctx, uint32_t size); struct intel_bb *intel_bb_create_with_relocs(int i915, uint32_t size); +struct intel_bb * +intel_bb_create_with_relocs_and_context(int i915, uint32_t ctx, uint32_t size); void intel_bb_destroy(struct intel_bb *ibb); static inline void intel_bb_ref(struct intel_bb *ibb) @@ -562,9 +565,8 @@ static inline void intel_bb_out(struct intel_bb *ibb, uint32_t dword) igt_assert(intel_bb_offset(ibb) <= ibb->size); } - struct drm_i915_gem_exec_object2 * -intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, +intel_bb_add_object(struct intel_bb *ibb, uint32_t handle, uint32_t size, uint64_t offset, bool write); struct drm_i915_gem_exec_object2 * intel_bb_add_intel_buf(struct intel_bb *ibb, struct intel_buf *buf, bool write); @@ -615,25 +617,17 @@ uint64_t intel_bb_offset_reloc_to_object(struct intel_bb *ibb, uint32_t offset, uint64_t presumed_offset); -int __intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset, - uint32_t ctx, uint64_t flags, bool sync); - void intel_bb_exec(struct intel_bb *ibb, uint32_t end_offset, uint64_t flags, bool sync); -void intel_bb_exec_with_context(struct intel_bb *ibb, uint32_t end_offset, - uint32_t ctx, uint64_t flags, bool sync); - uint64_t intel_bb_get_object_offset(struct intel_bb *ibb, uint32_t handle); bool intel_bb_object_offset_to_buf(struct intel_bb *ibb, struct intel_buf *buf); uint32_t intel_bb_emit_bbe(struct intel_bb *ibb); uint32_t intel_bb_emit_flush_common(struct intel_bb *ibb); -void intel_bb_flush(struct intel_bb *ibb, uint32_t ctx, uint32_t ring); +void intel_bb_flush(struct intel_bb *ibb, uint32_t ring); void intel_bb_flush_render(struct intel_bb *ibb); -void intel_bb_flush_render_with_context(struct intel_bb *ibb, uint32_t ctx); void intel_bb_flush_blit(struct intel_bb *ibb); -void intel_bb_flush_blit_with_context(struct intel_bb *ibb, uint32_t ctx); uint32_t intel_bb_copy_data(struct intel_bb *ibb, const void *data, unsigned int bytes, |