[PATCH i-g-t v8 32/33] lib/intel_batchbuffer: Don't truncate gtt_size, to be squashed

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Oct 19 15:59:32 UTC 2020


For !ppgtt we can incidentally truncate proper addresses

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 lib/intel_batchbuffer.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 8311fec8..d28180ab 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1270,7 +1270,6 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t size, bool do_relocs,
 {
 	struct drm_i915_gem_exec_object2 *object;
 	struct intel_bb *ibb = calloc(1, sizeof(*ibb));
-	uint64_t gtt_size;
 
 	igt_assert(ibb);
 
@@ -1304,15 +1303,10 @@ __intel_bb_create(int i915, uint32_t ctx, uint32_t size, bool do_relocs,
 	ibb->ptr = ibb->batch;
 	ibb->fence = -1;
 
-	gtt_size = gem_aperture_size(i915);
-	if (!gem_uses_full_ppgtt(i915))
-		gtt_size /= 2;
-
-	if ((gtt_size - 1) >> 32)
+	ibb->gtt_size = gem_aperture_size(i915);
+	if ((ibb->gtt_size - 1) >> 32)
 		ibb->supports_48b_address = true;
 
-	ibb->gtt_size = gtt_size;
-
 	object = intel_bb_add_object(ibb, ibb->handle, ibb->size,
 				     INTEL_BUF_INVALID_ADDRESS, ibb->alignment,
 				     false);
-- 
2.26.0



More information about the Intel-gfx-trybot mailing list