<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - missed hangcheck wakeup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104840#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - missed hangcheck wakeup"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104840">bug 104840</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>commit 889230489b6b138ba97ba2f13fc9644a3d16d0d2
Author: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
Date:   Mon Jan 29 14:41:04 2018 +0000

    drm/i915: Always run hangcheck while the GPU is busy

    Previously, we relied on only running the hangcheck while somebody was
    waiting on the GPU, in order to minimise the amount of time hangcheck
    had to run. (If nobody was watching the GPU, nobody would notice if the
    GPU wasn't responding -- eventually somebody would care and so kick
    hangcheck into action.) However, this falls apart from around commit
    4680816be336 ("drm/i915: Wait first for submission, before waiting for
    request completion"), as not all waiters declare themselves to hangcheck
    and so we could switch off hangcheck and miss GPU hangs even when
    waiting under the struct_mutex.

    If we enable hangcheck from the first request submission, and let it run
    until the GPU is idle again, we forgo all the complexity involved with
    only enabling around waiters. We just have to remember to be careful that
    we do not declare a GPU hang when idly waiting for the next request to
    be come ready, as we will run hangcheck continuously even when the
    engines are stalled waiting for external events. This should be true
    already as we should only be tracking requests submitted to hardware for
    execution as an indicator that the engine is busy.

    Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting
for request completion"
    Bugzilla: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - missed hangcheck wakeup"
   href="show_bug.cgi?id=104840">https://bugs.freedesktop.org/show_bug.cgi?id=104840</a>
    Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
    Cc: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
    Cc: Mika Kuoppala <<a href="mailto:mika.kuoppala@linux.intel.com">mika.kuoppala@linux.intel.com</a>>
    Link:
<a href="https://patchwork.freedesktop.org/patch/msgid/20180129144104.3921-1-chris@chris-wilson.co.uk">https://patchwork.freedesktop.org/patch/msgid/20180129144104.3921-1-chris@chris-wilson.co.uk</a>
    Reviewed-by: Mika Kuoppala <<a href="mailto:mika.kuoppala@linux.intel.com">mika.kuoppala@linux.intel.com</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 on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>