<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><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> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [regression] [bisected] i915 GPU HANG: ecode 7:1:0xfffffffe on Kernel 5.1.x and 5.2rc1 to 5.2rc6"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111014">bug 111014</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [regression] [bisected] i915 GPU HANG: ecode 7:1:0xfffffffe on Kernel 5.1.x and 5.2rc1 to 5.2rc6"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111014#c24">Comment # 24</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [regression] [bisected] i915 GPU HANG: ecode 7:1:0xfffffffe on Kernel 5.1.x and 5.2rc1 to 5.2rc6"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111014">bug 111014</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>On its way back to v5.1:

commit c84c9029d782a3a0d2a7f0522ecb907314d43e2c
Author: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
Date:   Fri Apr 19 12:17:47 2019 +0100

    drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context

    Despite what I think the prm recommends, commit f2253bd9859b
    ("drm/i915/ringbuffer: EMIT_INVALIDATE after switch context") turned out
    to be a huge mistake when enabling Ironlake contexts as the GPU would
    hang on either a MI_FLUSH or PIPE_CONTROL immediately following the
    MI_SET_CONTEXT of an active mesa context (more vanilla contexts, e.g.
    simple rendercopies with igt, do not suffer).

    Ville found the following clue,

      "[DevCTG+]: For the invalidate operation of the pipe control, the
       following pointers are affected. The
       invalidate operation affects the restore of these packets. If the pipe
       control invalidate operation is completed
       before the context save, the indirect pointers will not be restored from
       memory.
       1. Pipeline State Pointer
       2. Media State Pointer
       3. Constant Buffer Packet"

    which suggests by us emitting the INVALIDATE prior to the MI_SET_CONTEXT,
    we prevent the context-restore from chasing the dangling pointers within
    the image, and explains why this likely prevents the GPU hang.

    Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
    Reviewed-by: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>>
    Link:
<a href="https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-1-chris@chris-wilson.co.uk">https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-1-chris@chris-wilson.co.uk</a>
    (cherry picked from commit 928f8f42310f244501a7c70daac82c196112c190 in
drm-intel-next)
    Cc: <a href="mailto:stable@vger.kernel.org">stable@vger.kernel.org</a>
    Bugzilla: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [regression] [bisected] i915 GPU HANG: ecode 7:1:0xfffffffe on Kernel 5.1.x and 5.2rc1 to 5.2rc6"
   href="show_bug.cgi?id=111014">https://bugs.freedesktop.org/show_bug.cgi?id=111014</a>
    Fixes: f2253bd9859b ("drm/i915/ringbuffer: EMIT_INVALIDATE after switch
context")
    Signed-off-by: Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>></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 the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>