<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - [PNV/ILK Regression]X will be no response when run all piglit cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76671#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO --- - [PNV/ILK Regression]X will be no response when run all piglit cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76671">bug 76671</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>I think:

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c
b/drivers/gpu/drm/i915/i915_gem_context.c
index 021e21223c9c..91000ff1b626 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -506,9 +506,6 @@ int i915_gem_context_enable(struct drm_i915_private
*dev_priv)
     struct intel_ring_buffer *ring;
     int ret, i;

-    if (!HAS_HW_CONTEXTS(dev_priv->dev))
-        return 0;
-
     /* This is the only place the aliasing PPGTT gets enabled, which means
      * it has to happen before we bail on reset */
     if (dev_priv->mm.aliasing_ppgtt) {
@@ -833,7 +830,13 @@ int i915_switch_context(struct intel_ring_buffer *ring,

     /* We have the fake context */
     if (!HAS_HW_CONTEXTS(ring->dev)) {
-        ring->last_context = to;
+        if (to != ring->last_context) {
+            if (to)
+                i915_gem_context_reference(to);
+            if (ring->last_context)
+                i915_gem_context_unreference(ring->last_context);
+            ring->last_context = to;
+        }
         return 0;
     }</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>