[PATCH i-g-t 1/4] lib/intel_batchbuffer: add create without relocs
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Jan 26 17:48:27 UTC 2022
There is create function with relocations, so add its
counterpart without it.
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
lib/intel_batchbuffer.c | 9 ++++++++-
lib/intel_batchbuffer.h | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 10d8a6e0..ad72b3f9 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1471,7 +1471,14 @@ struct intel_bb *intel_bb_create(int i915, uint32_t size)
return __intel_bb_create(i915, 0, size,
relocs && !aux_needs_softpin(i915), 0, 0,
INTEL_ALLOCATOR_SIMPLE,
- ALLOC_STRATEGY_HIGH_TO_LOW);
+ ALLOC_STRATEGY_LOW_TO_HIGH);
+}
+
+struct intel_bb *intel_bb_create_no_relocs(int i915, uint32_t size)
+{
+ return __intel_bb_create(i915, 0, size, false, 0, 0,
+ INTEL_ALLOCATOR_SIMPLE,
+ ALLOC_STRATEGY_LOW_TO_HIGH);
}
/**
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index e7606307..067d8189 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -520,6 +520,7 @@ 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_no_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);
--
2.32.0
More information about the Intel-gfx-trybot
mailing list