<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [BDW] igt_ppgtt_lowlevel, GEM_BUG_ON(num_entries > pt->used_ptes)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99947#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [BDW] igt_ppgtt_lowlevel, GEM_BUG_ON(num_entries > pt->used_ptes)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99947">bug 99947</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index e23753181720..6bac267914df 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -237,18 +237,19 @@ static int lowlevel_hole(struct drm_i915_private *i915,

                        GEM_BUG_ON(addr + BIT_ULL(size) > vm->total);

+                       if (igt_timeout(end_time,
+                                       "%s timed out before %d/%d\n",
+                                       __func__, n, count)) {
+                               hole_end = hole_start; /* quit */
+                               break;
+                       }
+
                        if (vm->allocate_va_range &&
                            vm->allocate_va_range(vm, addr, BIT_ULL(size)))
                                break;

                        vm->insert_entries(vm, obj->mm.pages, addr,
                                           I915_CACHE_NONE, 0);
-                       if (igt_timeout(end_time,
-                                       "%s timed out after %d/%d\n",
-                                       __func__, n, count)) {
-                               hole_end = hole_start; /* quit */
-                               break;
-                       }
                }
                count = n;</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>