If we've gotten this far then we must have already checked if the
vma can fit into the vm when we inserted the mm node, and in turn
must have also checked for the overflow.

Cc: Chris Wilson <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 02fb063302bf..a3c17a04b883 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1304,15 +1304,6 @@ static int gen8_alloc_va_range_3lvl(struct 
i915_address_space *vm,
        uint32_t pdpes = I915_PDPES_PER_PDP(dev_priv);
        int ret;
 
-       /* Wrap is never okay since we can only represent 48b, and we don't
-        * actually use the other side of the canonical address space.
-        */
-       if (WARN_ON(start + length < start))
-               return -ENODEV;
-
-       if (WARN_ON(start + length > vm->total))
-               return -ENODEV;
-
        ret = alloc_gen8_temp_bitmaps(&new_page_dirs, &new_page_tables, pdpes);
        if (ret)
                return ret;
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to