Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/batchbuffer: Ensure obj.alignment is zeroed for softpinning
@ 2022-07-28 12:06 Zbigniew Kempczyński
  2022-07-28 13:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Zbigniew Kempczyński @ 2022-07-28 12:06 UTC (permalink / raw)
  To: igt-dev

Passing obj.alignment doesn't make sense for softpinning as offsets
are under full control of allocator.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/intel_batchbuffer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 36cb55048d..ef1b594771 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1346,7 +1346,6 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t size, bool do_relocs,
 
 	igt_assert(ibb);
 
-	ibb->allows_obj_alignment = gem_allows_obj_alignment(i915);
 	ibb->uses_full_ppgtt = gem_uses_full_ppgtt(i915);
 	ibb->devid = intel_get_drm_devid(i915);
 	ibb->gen = intel_gen(ibb->devid);
@@ -1359,6 +1358,13 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t size, bool do_relocs,
 	if (!ibb->uses_full_ppgtt)
 		do_relocs = true;
 
+	/*
+	 * For softpin mode allocator has full control over offsets allocation
+	 * so we want kernel to not interfere with this.
+	 */
+	if (do_relocs)
+		ibb->allows_obj_alignment = gem_allows_obj_alignment(i915);
+
 	/* Use safe start offset instead assuming 0x0 is safe */
 	start = max_t(uint64_t, start, gem_detect_safe_start_offset(i915));
 
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-01 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-28 12:06 [igt-dev] [PATCH i-g-t] lib/batchbuffer: Ensure obj.alignment is zeroed for softpinning Zbigniew Kempczyński
2022-07-28 13:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-07-28 17:34 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
2022-07-28 18:39 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
     [not found]   ` <YudtBLxphmNC/5hM@zkempczy-mobl2>
2022-08-01 17:16     ` Vudum, Lakshminarayana
2022-08-01 14:43 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox