<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [PATCH] Fix_stuck_on_bsd_ring for Clarkdale/Ironlake and kernel 4.4.x"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99737">99737</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[PATCH] Fix_stuck_on_bsd_ring for Clarkdale/Ironlake and kernel 4.4.x
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>XOrg git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jrf@mailbox.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=129445" name="attach_129445" title="Fixes "stuck on bsd ring" for Intel-Clarkdale/Ironlake and kernel 4.4.x">attachment 129445</a> <a href="attachment.cgi?id=129445&action=edit" title="Fixes "stuck on bsd ring" for Intel-Clarkdale/Ironlake and kernel 4.4.x">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=99737&attachment=129445'>[review]</a>
Fixes "stuck on bsd ring" for Intel-Clarkdale/Ironlake and kernel 4.4.x

A while ago I noticed (and reported) that longterm-kernel 4.4 doesn't work
properly with a/m CPU (and perhaps other older Intel-CPU/GPUs). The system
produces certain messages after resume from s2disk and becomes unstable after
repeated s2disk. The problems are still there in 4.4.47 (see 1).

Based on two committs by Chris Wilson (see 2)) - and with considerable effort
;) - I have created a patch that fixes the problem. I have used it with
4.4.22/38 for months now without any problems. 

Today I have applied it to 4.4.47 (see 3)) and it works there, too. So I'm
confident enough now to think that others may benefit as well and a review may
be justified. 

Accordingly, I have attached the patch for review/testing or whatever seems
appropriate to you.

Regards!

Rainer Fiebig


-----

1)
...
Restarting tasks ... done.
r8169 0000:03:00.0 eth0: link up
[drm] stuck on bsd ring
[drm] GPU HANG: ecode 5:1:0x01000000, reason: Ring hung, action: reset
[drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including
userspace.
[drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI ->
DRM/Intel
[drm] drm/i915 developers can then reassign to the right component if it's not
a kernel issue.
[drm] The gpu crash dump is required to analyze gpu hangs, so please always
attach it.
[drm] GPU crash dump saved to /sys/class/drm/card0/error
drm/i915: Resetting chip after gpu hang
~> uname -r
4.4.47-1.g8038aea-desktop+

2)
[f9326be5f1d3ff2c689de8a1754bdafd03879b58]
[62e6300768f6550ba24fa3ba2d4c66d725e3c890]

3)
~/Downloads/Kernel/linux-4.4.47> patch -p1 <
../patch-fix_stuck_on_bsd_ring_for_4.4.x --dry-run
checking file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 succeeded at 3142 (offset -2 lines).
checking file drivers/gpu/drm/i915/i915_gem.c
checking file drivers/gpu/drm/i915/i915_gem_context.c
checking file drivers/gpu/drm/i915/i915_gem_gtt.c
checking file drivers/gpu/drm/i915/i915_gem_gtt.h</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 the assignee for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>