<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HSW] GPU HANG: ecode 0:0x87d3bffa on ctx load"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83677#c56">Comment # 56</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HSW] GPU HANG: ecode 0:0x87d3bffa on ctx load"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83677">bug 83677</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>(In reply to Rainer Hochecker from <a href="show_bug.cgi?id=83677#c55">comment #55</a>)
<span class="quote">> This patch seems to introduce new problems for me. I place fences into the
> render pipeline and after a glFlush I don't get all of them into the
> signaled state. This procedure worked without this patch and with other
> driver like NVidia and AMD so the issue most likely got introduced with this
> huge patch.</span >


diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6bf2dcf67bf2..158abb4c322a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2544,13 +2544,16 @@ i915_gem_idle_work_handler(struct work_struct *work)
 static int
 i915_gem_object_flush_active(struct drm_i915_gem_object *obj)
 {
-       int ret;
+       int ret, n;

        if (!obj->active)
                return 0;

-       if (obj->last_write.request) {
-               ret = i915_request_emit_breadcrumb(obj->last_write.request);
+       for (n = 0; < I915_NUM_ENGINES; n++) {
+               if (obj->last_read[n].request == NULL)
+                       continue;
+
+               ret = i915_request_emit_breadcrumb(obj->last_read[n].request);
                if (ret)
                        return ret;


which I hope is overkill. If you have a snippet demonstrating the fences I can
trace through mesa and see if there is a more precise flush we can do.</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>
      </ul>
    </body>
</html>