<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [BAT BYT] "HW access outside of RPM atomic section" on driver unload"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95634#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [BAT BYT] "HW access outside of RPM atomic section" on driver unload"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95634">bug 95634</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>Oh, fun.

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f78d4ca..981d279 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3428,6 +3428,9 @@ int i915_gpu_idle(struct drm_device *dev)

        /* Flush everything onto the inactive list. */
        for_each_engine(engine, dev_priv) {
+               if (engine->last_context == NULL)
+                       continue;
+
                if (!i915.enable_execlists) {
                        struct drm_i915_gem_request *req;</pre>
        </div>
      </p>


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

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